Repository navigation
Attach the deployed binary to the release page - #93
Merged
Merged
Conversation
A release-* tag deployed to production and left nothing behind. The only copy of the binary was a workflow artifact with 7-day retention, so the revision running in production stopped being retrievable long before it stopped running, and the tag's Release page was empty. Add a publish job to deploy-release.yml that uploads the binary and its sha256 to the Release, creating it if absent. Three constraints shaped it: It needs deploy, so an asset only appears once the rollout succeeded. An attached binary asserts "this is what production is running", which would be false if ship had failed. It runs only on the tag push. A workflow_dispatch rollback re-deploys a tag whose Release already carries these assets, and github.ref_name on a dispatch is the branch rather than the tag, so there would be no correct release to attach to. It takes the commit from the reusable workflow rather than github.sha, which required adding a workflow_call output to deploy-native.yml. On a rollback github.sha is the default branch while the deployed ref is not — the same trap the build step already avoids, and it would have mislabelled exactly the release that most needs accurate provenance. Uses gh rather than a release action, since gh ships on the runner and the repo has no pinned SHA for such an action. Idempotent, so a re-run repairs a partial upload instead of failing. Verified against a stubbed gh that the notes interpolate, the glob picks up both files, and the create and upload branches each fire on the right condition. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
There was a problem hiding this comment.
Pull request overview
Adds a post-deploy publishing step to ensure production release-* tags retain a long-lived copy of the exact deployed binary (plus checksum) on the GitHub Release page, instead of relying on short-retention workflow artifacts.
Changes:
- Exposes the built commit SHA from the reusable
deploy-native.ymlworkflow viaworkflow_calloutputs. - Adds a
publishjob todeploy-release.yml(gated on successful deploy + tag push) that downloads the deployed artifact, renames it with a platform suffix, generates a.sha256, and uploads both to the Release (creating it if needed).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/deploy-release.yml | Adds a publish job to attach the deployed binary + checksum to the tag’s GitHub Release. |
| .github/workflows/deploy-native.yml | Exposes the built commit SHA as a reusable-workflow output for callers to reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The publish job set an explicit permissions: block, which replaces the default token permissions wholesale rather than adding to them — so contents: write alone left the artifact download without the actions: read it needs, and it would have failed with a 403 on the first release cut after this merged. Fetch the artifact with `gh run download` scoped to $GITHUB_RUN_ID instead of actions/download-artifact@v4. That settles the permissions question (actions: read is now stated for a reason that is visible in the file) and drops a third-party action pinned to a mutable major tag from a job that already had the CLI it needed. gh infers the repository from a checkout's git remote, and this job has none, so GH_REPO is set at job level — otherwise every gh call here, including the release upload that was already there, fails on "could not determine base repository". Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
aterga
pushed a commit
that referenced
this pull request
Jul 29, 2026
The release-2026-07-29 rollout succeeded but left no Release: `publish` was SKIPPED (run 30441720101), and it turns out it could never have run at all — it has been dead since it merged in #93. `if: github.event_name == 'push'` carries no status check function, so GitHub applies an implicit success() across the whole upstream chain. That chain includes validate-ref, which is deliberately SKIPPED on a tag push, and a skip is not a success — so the gate failed on the only path the job is restricted to. The event half of the condition was true the whole time; the invisible half was not. This is precisely the trap the deploy job immediately above documents and works around. I wrote that comment and then failed to carry the fix one job down. Combine both halves so the status function suppresses the implicit success(): if: ${{ !failure() && !cancelled() && github.event_name == 'push' }} `needs: deploy` still holds, so a failed rollout stops the publish and an asset never claims to be what production runs when it isn't. Not fixable retroactively for release-2026-07-29: the tag points at 48f1ed6, which predates this commit, so its workflow definition is the broken one. The run's artifact is still in its window (expires 2026-08-05T10:02:35Z), so that Release can be populated by hand — and unlike release-2026-07-28, no Release object exists for it yet, so that is a create, not an upload. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh
5 of 6 tasks
aterga
added a commit
that referenced
this pull request
Jul 29, 2026
The release-2026-07-29 rollout succeeded but left no Release: `publish` was SKIPPED (run 30441720101), and it turns out it could never have run at all — it has been dead since it merged in #93. `if: github.event_name == 'push'` carries no status check function, so GitHub applies an implicit success() across the whole upstream chain. That chain includes validate-ref, which is deliberately SKIPPED on a tag push, and a skip is not a success — so the gate failed on the only path the job is restricted to. The event half of the condition was true the whole time; the invisible half was not. This is precisely the trap the deploy job immediately above documents and works around. I wrote that comment and then failed to carry the fix one job down. Combine both halves so the status function suppresses the implicit success(): if: ${{ !failure() && !cancelled() && github.event_name == 'push' }} `needs: deploy` still holds, so a failed rollout stops the publish and an asset never claims to be what production runs when it isn't. Not fixable retroactively for release-2026-07-29: the tag points at 48f1ed6, which predates this commit, so its workflow definition is the broken one. The run's artifact is still in its window (expires 2026-08-05T10:02:35Z), so that Release can be populated by hand — and unlike release-2026-07-28, no Release object exists for it yet, so that is a create, not an upload. Claude-Session: https://claude.ai/code/session_01R8ZshwKmjD5fZ4Hs9dS6zh Co-authored-by: Claude <[email protected]>
aterga
pushed a commit
that referenced
this pull request
Aug 3, 2026
Post-audit merges (#87-#115) that changed user-visible or documented behavior, folded into the README: - II's consent screen requires an explicit access-level choice (Questions only vs Actions & questions); it is not a read-only-by-default opt-out. - Name the connect binding cookie correctly: mcp_connect, not sid, with Secure conditional on an https PUBLIC_URL. - Document the official pages (/privacy-policy, /support, /terms) and the OpenAI domain-verification endpoint with its env-gated 404 behavior (#109, #112, #115). - /version now reports the served II pairings via the instances array (#94). - CWE-674: note the post-parse depth bounds on interface alias chains (#87) and the type-less reply decode/render path (#108). - Companion-control note: percent-encoded slashes/dots in redirect paths are rejected (#107). - Deploy: describe the reference native deployment pipeline (staging tracks main, release-* tags ship production with the binary attached) (#81, #93). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TGhwpdTbUqQbR5AiiN8Ljw
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.
Summary
A
release-*tag deploys to production and leaves nothing behind. The only copy of the binary is a workflow artifact with 7-day retention, so the revision running in production stops being retrievable long before it stops running — and the tag's page (release-2026-07-28) carries notes but no assets.Adds a
publishjob that uploads the binary and its SHA-256 to the Release, creating the Release if it doesn't exist.Three constraints shaped it, each of which would be a bug if got wrong:
It
needs: deploy, so an asset only appears once the rollout succeeded. An attached binary asserts this is what production is running; publishing one whoseshipfailed would make the Release page lie.It runs only on the tag push (
if: github.event_name == 'push'). Aworkflow_dispatchrollback re-deploys an existing tag whose Release already carries these assets, andgithub.ref_nameon a dispatch is the branch, not the tag — so there would be no correct release to attach to.It takes the commit from the reusable workflow, not
github.sha. That required adding aworkflow_calloutput todeploy-native.yml. On a rollbackgithub.shais the default branch while the deployed ref is something else — the same trap the build step already avoids, and it would have mislabelled precisely the release that most needs accurate provenance.Related issues
None. Touches the same workflows as #84 and #81; #85 remains open on action pinning.
Changes
deploy-native.yml: exposeshaas aworkflow_calloutput, so callers can describe what was deployed without reaching forgithub.sha.deploy-release.yml: add apublishjob — downloads the artifact, renamesimcp2toimcp2-linux-arm64(a bareimcp2on a Release page doesn't say what platform it targets), writes a.sha256alongside it, and publishes both.sha256sum -cline so the download is checkable. On a Release that already exists the assets are uploaded with--clobberand existing notes are left alone.gh, which ships on the runner. Pin setup-node, upload-artifact and download-artifact to commit SHAs in deploy-native.yml #85 already tracks three floating action references; this adds none.permissions:on that job iscontents: write+actions: read, and nothing else in the repo gains write access.Two bugs found and fixed while addressing review (11847bc), both of which would only ever have surfaced on a real release cut:
actions/download-artifact@v4underpermissions: {contents: write}. An explicitpermissions:block replaces the default token scopes rather than adding to them, so the download had no Actions scope and would have 403'd. Switching togh run download "$GITHUB_RUN_ID"removes the floating dependency and makesactions: readrequired for a reason that is visible in the file.ghinfers the repository from a checkout's git remote, andpublishdeliberately has no checkout — it needs an artifact and a tag, not a worktree. Everyghcall would have failed on could not determine base repository.GH_REPOis now set at job level alongsideGH_TOKEN.Testing
deploy-native.ymlexposesoutputs.sha, andpublishresolves toneeds: deploy,if: github.event_name == 'push',permissions: {contents: write, actions: read},env: {GH_TOKEN, GH_REPO}.EOFterminator lands at column 0 — an easy way to produce a script that parses as YAML and then fails at run time.bash -non the extracted script passes.TAG=release-2026-07-28,BUILT_SHA=80b8586, run 30300549759): tag, commit and run ID interpolate with backticks intact and the table renders.gh:dist/*expands to both the binary and the checksum; absent release takes thecreatebranch and existing release takesupload --clobber, so a re-run repairs a partial upload instead of failing.publishonly runs on arelease-*tag push. The next release tag is the first real test, and neither fix above is verifiable before then.cargo build/cargo test/clippy— no Rust source changed.npm test --prefix monitoring/mcp-status— no dashboard code changed; the workflow runs it anyway.Checklist
The existing tag needs a one-off backfill
This cannot retroactively populate
release-2026-07-28. That tag points at80b8586, which predates thepublishjob, so re-running its workflow would use the old definition and publish nothing.The Release itself already exists ("Initial release", created manually) with no assets — so this is an upload, not a create. The artifact from run 30370182090 is confirmed still live and expires
2026-08-04T14:53:33Z:uploadleaves the existing notes untouched. After 2026-08-04 the binary is gone from Actions and the release can only ever carry notes.Generated by Claude Code