Skip to content

release: v1.11.7 - #249

Merged
Jaro-c merged 2 commits into
mainfrom
develop
Jul 28, 2026
Merged

release: v1.11.7#249
Jaro-c merged 2 commits into
mainfrom
develop

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jul 28, 2026

Copy link
Copy Markdown
Member

Release PR for v1.11.7.

What changes for a consumer

Nothing — every commit is a test. Cut anyway so main does not drift behind develop, 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/keymanager and 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 through New because 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:

package now
internal/keymanager 92.0%
auth/oauth 90.2%
auth/email 91.9%
auth/jwt 95.0%
auth/password 95.8%
auth/apikey 94.6%
auth/username 97.5%
authcore 98.1%
internal/clock 100.0%
total 92.9%

Verified 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.

Jaro-c added 2 commits July 27, 2026 21:34
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>
@Jaro-c Jaro-c added type:chore Maintenance with no product impact prio:P3 Low priority status:review In review effort:XS Extra small labels Jul 28, 2026
@Jaro-c
Jaro-c merged commit ea75d92 into main Jul 28, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort:XS Extra small prio:P3 Low priority status:review In review type:chore Maintenance with no product impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant