Conversation
v1.11.6 produced **ten** pull requests that all said the same thing — #235 through #244, each bumping `github.com/Glyndor/authcore` in one example module, all of them already stale by one patch before anyone looked at them. That cost is mine. Dropping the `replace` in #213 was right — it stopped the examples claiming versions that never applied (v1.1.1, v1.2.2, v1.9.0, v1.10.6, all masked by the replace) and gave anyone copying a directory out of the tree a `require` that means something. But it also made authcore a tracked dependency of all nine example modules, so every release drifts them in lockstep. A group is what they were all along: they move together by construction. One group, one review, and the versions stay honest. The root module keeps its own ungrouped entry. A bump there changes what a consumer actually resolves and deserves to be looked at on its own — which is exactly what happened with `x/crypto` 0.54.0 this week. Validated the file parses and carries the group. The existing ten will close themselves once Dependabot regroups on its next daily run; I would rather let it do that than merge ten stale pull requests by hand. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
Fourth and last pass of #229, over `auth/email`, `auth/username`, `internal/keymanager` and the injected-material path in `keystore`. **Sixteen guards mutated, fifteen already covered.** That is the first pass that came back mostly clean, and it is worth saying plainly rather than presenting the one finding as though the module were riddled. `auth/username` and the key-material validation in `internal/keymanager` — private and public key lengths, the pair matching, the refresh-secret length, the partial-directory refusal — all detected their own deletion. ### The one survivor `auth/email`'s 254-character total length. `TestValidate_tooLong` built a 249-character local part, so the 64-character local-part rule refused it first and the total was never measured. Same shape as the size-cap tests in #227 and the PHC bounds in #234: **the fixture violated more than one rule, and an earlier guard fired.** An address that reaches it has to be assembled from parts that are each individually legal — a 60-character local part and 60-character DNS labels — with a companion test asserting the same shape just under the limit is accepted. Without that second assertion the first would be satisfied by any rejection at all, which is the whole failure mode being fixed. ### Loader gaps in `internal/keymanager` - **The cleanup that removes a freshly written private key when the public write fails** was the largest single gap in the package, at 55.6%. It is unreachable through `New` — `checkKeyDirConsistency` refuses a partial directory before generation is attempted — so it is driven directly, and asserts *the private key does not survive* rather than that an error came back. Planting a directory where a file should go makes the write fail on any platform, with no permission games. - **An unreadable descriptor is now distinguished from an absent one.** Absent means the pre-marker layout and is adopted in place; unreadable means the loader cannot tell what wrote the directory and has to fail closed. Those are opposite behaviours from one missing file. - **`KeyID` had been reading as 0%** while being exercised from the JWT module next door. It has its own assertion now, so the number stops lying. ### Measured | package | before | now | |---|---|---| | `internal/keymanager` | 88.9% | **92.0%** | | `auth/email` | 90.9% | **91.9%** | | total | 92.3% | **92.9%** | **Every package is over 90% for the first time**, which settles the substantive half of #218 — no package is hiding under the aggregate any more. The policy question there, whether the gate should be per-package, is unaffected and still open. `go vet`, `golangci-lint` (0 issues) and `go test -race ./...` pass. Each new test was confirmed by deleting the control it names and watching it fail. Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release PR for v1.11.7.
What changes for a consumer
Nothing — every commit is a test. Cut anyway so
maindoes not drift behinddevelop, which is the state that left the MIT relicence undelivered for a day earlier this week.What it is
The last pass of the sweep in #229 (#248), over
auth/email,auth/username,internal/keymanagerand the injected key material. Sixteen guards mutated, fifteen already covered — the first pass to come back mostly clean.The one survivor was
auth/email's 254-character address limit: its test built a 249-character local part, so the 64-character local-part rule refused it first and the total was never measured.Also closed the loader gaps in
internal/keymanager— most importantly the cleanup that removes a freshly written private key when the public write fails, which is unreachable throughNewbecause the consistency check refuses a partial directory before generation is attempted.Every package is over 90% for the first time, which settles the substantive half of #218:
internal/keymanagerauth/oauthauth/emailauth/jwtauth/passwordauth/apikeyauth/usernameauthcoreinternal/clockVerified on go1.26.5
go build,go vet,golangci-lint(0 issues),go test -race ./...across all nine packages. Every test added was confirmed by deleting the control it names and watching it fail.