Skip to content

chore: the trunk declares its lane too - #361

Open
captainpacket wants to merge 1 commit into
mainfrom
chore/release-lane-on-main
Open

chore: the trunk declares its lane too#361
captainpacket wants to merge 1 commit into
mainfrom
chore/release-lane-on-main

Conversation

@captainpacket

Copy link
Copy Markdown
Collaborator

Forward-ports the release-lane change from maint/2.9.x (#360) so both branches carry the same tooling. Without it the two lanes diverge in the release path itself — the part hardest to reason about and most expensive to get wrong — and a future 3.x maintenance branch would have to rediscover the whole change.

main's release behaviour does not change. Its lane names main, so every gate resolves to exactly the ref it resolved to before. This is a refactor with one new refusal, not a change to how a release works.

The trunk declares no series

LANE = ReleaseLane(branch="main", ruleset="main-release-integrity")

A maintenance lane exists to carry exactly one series; the trunk is where the next one is born. Pinning it would refuse 3.1.0 the day it is cut, and the failure would look like a bug in the guard rather than a stale declaration. series=None is the absence of a check that never applied here — ancestry stays the real gate.

The stale prior-release tag was worse on this branch

release.yml fetched refs/tags/v2.9.1 as a literal so the bridge check had an object to resolve, and nothing advanced it when the anchor moved. On the maintenance branch that was one release stale; here it was two — this branch has released 2.9.2 and 3.0.0 since, and PRIOR_RELEASE_TAG says v3.0.0. The next 3.0.x release would have failed fetching a tag it no longer needs while missing the one it does. Both the lane and the prior tag now come from the scripts.

How each file was ported

One literal legitimately differs between lanes

The provenance fixtures release 3.0.1 here and 2.9.3 on maint/2.9.x. That is required rather than incidental: the maintenance lane's series guard would refuse a 3.0.1 fixture, which is the guard working. Every other difference between the two copies is a declared lane value.

Verification

  • python -m pytest scripts/tests409 passed.
  • Live: python scripts/verify_release_provenance.py --controls-only against the real main-release-integrity ruleset — the check that refuses a release from an unprotected branch.
  • pre-commit run --all-files clean; check_harness.py --base origin/main passes.
  • The lane values are asserted directly: this branch's lane must name main and declare no series, so a merge carrying the maintenance lane's declaration here fails a test rather than a release.

No shipped code changes — packages = [{include = "forward_netbox"}].

Merge #360 first, so the maintenance lane is not left behind a trunk that already knows about lanes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DczGsTTkuwULnpcYX4qui6

Forward-ports the release-lane change from maint/2.9.x so both branches carry
the same tooling. Without it the two lanes diverge in the release path itself
- the part hardest to reason about and most expensive to get wrong - and a
future 3.x maintenance branch would have to rediscover the whole change.

main's release behaviour does not change. Its lane names `main`, so every
gate resolves to exactly the ref it resolved to before. This is a refactor
with one new refusal, not a change to how a release works.

The trunk declares NO series. A maintenance lane exists to carry exactly one
series; the trunk is where the next one is born. Pinning it would refuse
3.1.0 the day it is cut, and the failure would look like a bug in the guard
rather than a stale declaration.

The stale prior-release tag was worse here than on the maintenance branch.
release.yml fetched refs/tags/v2.9.1 as a literal; this branch has released
2.9.2 and 3.0.0 since, and PRIOR_RELEASE_TAG says v3.0.0 - so it was two
releases stale, and the next 3.0.x release would have failed fetching a tag
it no longer needs while missing the one it does.

The verifier was taken wholesale from the maintenance branch with this lane's
two anchor constants restored: the files differed by nothing else, so copying
is provably equivalent to re-applying and cannot drift. release.py was
re-applied instead, because it differs by ~300 lines of stage-idempotency
work that exists only here.

One test literal legitimately differs between lanes: the provenance fixtures
release 3.0.1 here and 2.9.3 on the maintenance branch. That is required
rather than incidental - the maintenance lane's series guard would refuse a
3.0.1 fixture, which is the guard working.

Verified live with `verify_release_provenance.py --controls-only` against the
real main-release-integrity ruleset. No shipped code changes: packages =
[{include = "forward_netbox"}].

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DczGsTTkuwULnpcYX4qui6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant