From 9f4eb525c30a0afd3359b1d7ebe1e3948f53b737 Mon Sep 17 00:00:00 2001 From: Offending Commit Date: Mon, 21 Sep 2026 16:25:13 -0500 Subject: [PATCH] fix(release): gate releases on the deployed pin, not upstream The release workflow's contract job ran the upstream lane, so any upstream break blocked every release -- including one deliberately scoped out of this repository's work. That is not hypothetical. Hermes #99220 landed 2026-09-08 and the job has been failing since; nobody saw it until today's release run, because the last one was 2026-08-24. Two weeks of a blocked release lane, invisible because nothing ran in between. The scheduled drift workflow now closes that window to 24 hours, which is the right home for a moving target. A release promises conformance at the revision the kit claims to support. Gating it on whatever upstream happens to be that morning promises something else and blocks on news the release cannot act on. Verified both directions: the pinned lane passes at f80f453 with executed=16, and the upstream lane still fails on the known #99220 break -- which is now reported by the drift workflow instead of blocking a release. The release-contract assertion is tightened to match. `test-contract` alone is a prefix of both lanes, so it would have passed on a silent revert to upstream; it now names the pinned lane and rules out the other two spellings. Mutation-tested: reverting to either fails. --- .github/workflows/release.yml | 11 +++++++++-- tests/test_release_contract.py | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdbb17c..3c0f306 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -289,7 +289,14 @@ jobs: test "$(git rev-parse HEAD^)" = "$TRIGGER_SHA" test "$(git rev-list -n 1 "$TAG")" = "$RELEASE_SHA" test -z "$(git status --porcelain --untracked-files=no)" - - name: Prove the exact SHA against mutable upstream Hermes + # Gate the release on the revision this kit claims to support, not on + # whatever upstream happens to be today. A release promises conformance + # at the deployed pin; upstream drift is the scheduled hermes-drift + # lane's job, and gating here on a moving target means an upstream break + # we have deliberately scoped out blocks every release. That is not + # hypothetical: #99220 landed 2026-09-08 and silently blocked this lane + # until the next release run two weeks later. + - name: Prove the exact SHA against the deployed Hermes pin env: RELEASE_SHA: ${{ needs.materialize.outputs.release_sha }} TAG: ${{ needs.materialize.outputs.tag }} @@ -297,7 +304,7 @@ jobs: run: | test "$(git rev-parse HEAD)" = "$RELEASE_SHA" test -z "$(git status --porcelain --untracked-files=no)" - just test-contract + just test-contract-pinned git -C .hermes-agent rev-parse HEAD > hermes-source-sha.txt test "$(git rev-parse HEAD)" = "$RELEASE_SHA" test "$(git rev-parse HEAD^)" = "$TRIGGER_SHA" diff --git a/tests/test_release_contract.py b/tests/test_release_contract.py index f93c70a..34441a0 100644 --- a/tests/test_release_contract.py +++ b/tests/test_release_contract.py @@ -504,7 +504,14 @@ def test_exact_release_source_is_tested_and_built_once_in_isolated_jobs(self) -> ) build_text = yaml.safe_dump(build) hermes_text = yaml.safe_dump(jobs["hermes-contract"]) - self.assertIn("just test-contract", hermes_text) + # Specifically the pinned lane. A release promises conformance at the + # revision the kit supports; gating on upstream lets a break we + # deliberately scoped out block every release. `test-contract` alone + # would match either lane, so assert the pinned one and rule out the + # upstream alias. + self.assertIn("just test-contract-pinned", hermes_text) + self.assertNotIn("just test-contract-upstream", hermes_text) + self.assertNotIn("just test-contract\n", hermes_text) self.assertNotIn("just test-contract", build_text) self.assertNotIn(".hermes-agent", build_text) self.assertIn("just build", build_text)