Skip to content

chore: rolling promotion dev -> main (consolidated release-chain fix) - #2650

Merged
namastex888 merged 6 commits into
mainfrom
promote/release-chain-fix
Jul 25, 2026
Merged

namastex888 merged 6 commits into
mainfrom
promote/release-chain-fix

Conversation

@automagik-genie

@automagik-genie automagik-genie commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Promotes the consolidated release-chain fix (#2648, 58500117) to main.

This is the promotion that matters. The release chain executes from main — sign-attest.yml, release-publish.yml and friends are always read from refs/heads/main, never from dev. So the fix has no effect until this lands, and the dev release firing right now will still fail.

What it carries

  • CRITICAL — TRIGGER_SHA reaches the env of the step that actually runs release-generic-provenance.sh verify-exact. The prior fix put it in the native-predicate step, whose script never reads it; verify_automated_event requires it on dev/homolog and exit 2s silently without it. Without this, the next dev release dies at the same place for the fourth time.
  • Dead TRIGGER_SHA removed from release-publish.yml prepare-delivery-evidence (no consumer); the live consumer in the security gate is untouched.
  • Dev version derivation uses max+1 instead of count+1, and a tag collision is now a hard error rather than being reported as a benign race that drops a release with a green run.
  • The wiring test is now step-aware — it resolves the step consuming each value and asserts that step's env. Verified to fail against the misplacement and pass once corrected, so this class cannot reach main again.

Audit basis

A full static audit of the chain at main@93243cf0 covered secrets, environment gates, verification-script satisfiability, permissions, the App-token push path, previous-release state and orphaned tags: 1 must-fix for dev (fixed here), 0 for stable.

Known risk after merge

PR #2624 grew release-publish.yml from 3 jobs to 10. Seven publish-side jobs have never executed — the last run to reach publish used the old 3-job workflow. The next dev release is their first production run, including a 4-platform native Codex dogfood. Static analysis found no unsatisfiable assertion in them, but treat that run as a shakeout of unexercised surface, not as verification of this fix.

Summary by CodeRabbit

  • Release

    • Updated Genie and related plugin packages to version 5.260725.8.
  • Bug Fixes

    • Improved development release versioning to avoid collisions when tag numbers are not consecutive.
    • Release automation now clearly reports tag-collision failures instead of silently skipping them.
    • Improved provenance verification by validating the originating workflow run’s commit.
  • Tests

    • Added coverage ensuring commit verification data flows correctly through the release process.

namastex888 and others added 6 commits July 25, 2026 18:32
The generic SLSA provenance embeds the workflow_run that TRIGGERED the
release, whose head is the commit CI ran on — one before the
[auto-version] bump the tarballs are built from. Nothing asserted that
this value is actually threaded through version.yml -> release.yml ->
sign-attest.yml + release-publish.yml, so dropping it from any single
'with:' block would silently re-break exact verification (or hard-fail
on an empty TRIGGER_SHA) exactly as it did on 2026-07-25.

Pins the full chain, the verifier comparing the trigger commit rather
than source_sha, and the per-channel descriptor comparison.
The previous fix wired trigger_sha into sign-attest.yml's native-predicate
step (line 340), whose script never reads it, while the step that actually
runs 'release-generic-provenance.sh verify-exact' had no TRIGGER_SHA at
all. verify_automated_event requires a well-formed one on dev/homolog and
exits 2 without it — so the next dev release would have died at the same
place with the same silent exit, a fourth consecutive broken release.

The wiring test did not catch it because it used a whole-file toContain(),
which the misplaced value satisfied. It now resolves the step that consumes
each value and asserts the env of THAT step; verified to fail against the
misplacement and pass once corrected.

- CRITICAL: TRIGGER_SHA into the 'Verify SLSA provenance (self-check)' env;
  dead assignment removed from the native-predicate step
- dead TRIGGER_SHA removed from release-publish prepare-delivery-evidence
  (no consumer); the live consumer in the security gate is untouched
- dev version derivation uses max+1 instead of count+1, so a burned build
  number cannot collide, and a tag collision is now a hard error instead of
  being reported as a benign race that drops the release with a green run
fix(release): deliver TRIGGER_SHA to the verifying step + consolidated chain fixes
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updates Genie version metadata, improves dev tag allocation and collision handling, and corrects TRIGGER_SHA placement for provenance verification with an end-to-end contract test.

Changes

Release updates

Layer / File(s) Summary
Plugin version metadata
.claude-plugin/marketplace.json, package.json, plugins/genie/*, plugins/hermes-genie/plugin.yaml
Genie plugin and package versions are updated from 5.260725.5 to 5.260725.8.
Dev version allocation and push handling
.github/workflows/version.yml
Dev versions derive from the highest matching tag suffix, while atomic push failures now distinguish tag collisions from other race conditions.
Provenance trigger SHA wiring
.github/workflows/release-publish.yml, .github/workflows/sign-attest.yml, scripts/release-docs.test.ts
TRIGGER_SHA is supplied to provenance verification rather than native predicate creation, and the complete wiring is tested from workflow_run.head_sha through publication gating.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant workflow_run
  participant sign-attest.yml
  participant release-generic-provenance.sh
  participant release-publish.yml
  workflow_run->>sign-attest.yml: pass trigger_sha
  sign-attest.yml->>release-generic-provenance.sh: verify-exact with TRIGGER_SHA
  release-generic-provenance.sh-->>sign-attest.yml: compare run.head_sha
  sign-attest.yml->>release-publish.yml: pass verified SHA inputs
  release-publish.yml->>release-publish.yml: evaluate generic_expected_sha
Loading

Possibly related PRs

Suggested reviewers: namastex888

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the promotion of a consolidated release-chain fix from dev to main.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch promote/release-chain-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/version.yml:
- Around line 183-190: Update the build-number calculation near HIGHEST and
BUILD_NUMBER so the emitted dev suffix never exceeds 9999, capping the next
value at the promotion limit before VERSION is constructed. Parse matching tag
suffixes explicitly as decimal to avoid leading-zero values being interpreted
unexpectedly, while preserving the highest-existing-suffix behavior.
- Around line 322-329: Restrict the collision check in the atomic push failure
handling to evidence involving the specific tag refs, rather than any generic
“cannot lock ref” message. Update the grep condition near the push_output
handling to match refs/tags/v${VERSION} or explicit existing-tag messages, while
allowing branch-side refs/heads/dev lock failures to follow the normal path.

In `@scripts/release-docs.test.ts`:
- Around line 504-506: Strengthen the test around verifyStep in
scripts/release-docs.test.ts by asserting the exact TRIGGER_SHA environment
assignment to inputs.trigger_sha, rather than relying on separate substring
checks. Also verify that TRIGGER_SHA is absent from the native-predicate step,
using the existing stepEnvFor helper and relevant step identifiers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2df15850-3661-43c8-8e58-581df9786148

📥 Commits

Reviewing files that changed from the base of the PR and between 93243cf and f6910b8.

📒 Files selected for processing (10)
  • .claude-plugin/marketplace.json
  • .github/workflows/release-publish.yml
  • .github/workflows/sign-attest.yml
  • .github/workflows/version.yml
  • package.json
  • plugins/genie/.claude-plugin/plugin.json
  • plugins/genie/.codex-plugin/plugin.json
  • plugins/genie/package.json
  • plugins/hermes-genie/plugin.yaml
  • scripts/release-docs.test.ts
💤 Files with no reviewable changes (1)
  • .github/workflows/release-publish.yml

Comment thread .github/workflows/version.yml Resolved
Comment thread .github/workflows/version.yml Resolved
Comment thread scripts/release-docs.test.ts Resolved
@namastex888
namastex888 merged commit 8ee5540 into main Jul 25, 2026
21 checks passed
@automagik-genie
automagik-genie deleted the promote/release-chain-fix branch September 25, 2026 04:51
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.

2 participants