Skip to content

Fix the publish gate: it skipped on every tag push - #97

Merged
aterga merged 1 commit into
mainfrom
claude/mcp-production-deployment-d74205
Jul 29, 2026
Merged

aterga merged 1 commit into
mainfrom
claude/mcp-production-deployment-d74205

Conversation

@aterga

@aterga aterga commented Jul 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

release-2026-07-29 deployed successfully but left no Release page. The publish job was skipped, not failed — and it turns out it could never have run. It has been dead since it merged in #93.

if: github.event_name == 'push'    # no status function

An if: with no status check function gets an implicit success() applied 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 all along; the invisible half never was.

This is exactly the trap the deploy job immediately above documents and works around. I wrote that comment and then didn't carry the fix one job down.

Related issues

None. Fixes the publish job added in #93; surfaced by run 30441720101.

Changes

  • deploy-release.yml: combine both halves so the status function suppresses the implicit success():
    if: ${{ !failure() && !cancelled() && github.event_name == 'push' }}
  • Comment records the concrete run it was diagnosed from, so the next person sees evidence rather than an assertion.

needs: deploy is unchanged, so a failed rollout still stops the publish — an asset never claims to be what production runs when it isn't.

The generated release notes are unchanged and already match the house pattern (a headerless Commit / Target / Run table plus the sha256sum -c line), so once this merges the notes come out right automatically.

Testing

  • YAML parses; publish resolves to needs: deploy and the combined if: above.
  • Diagnosis grounded in the live run, not inferred from the condition alone — publish shows conclusion: skipped with completed_at in the same second it was created (10:03:14Z), i.e. a gate evaluation rather than a step failure, while deploy / build and deploy / ship both succeeded and the run's event is unambiguously push.
  • Cannot be exercised until the next release tag. publish only runs on a tag push, so the fix is unverifiable end to end before then — the same caveat Attach the deployed binary to the release page #93 carried, which is how this got through.

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change — reasoning recorded at the gate.
  • No secrets, credentials, or internal-only information are included.

release-2026-07-29 — backfill done, notes need correcting

The assets were backfilled by hand at 11:05Z (imcp2-linux-arm64 + .sha256). The notes on that Release are wrong, though: they carry a flat one-liner rather than the table, because the --notes shortcut in the original backfill command here produced it. That was a defect in these instructions, not in the workflow — publish generates the table correctly.

To bring it in line (note the quoted heredoc — unquoted, the backticks become command substitution):

cat > /tmp/notes.md <<'EOF'
Rolled out to production.

| | |
|---|---|
| Commit | `48f1ed67de24412652bc9530bad338890cfd9c2d` |
| Target | `linux/arm64` (Amazon Linux 2023, Graviton) |
| Run | [30441720101](https://github.com/dfinity/imcp2/actions/runs/30441720101) |

The attached binary is the one that was shipped: the deploy asserts
`GET /version` on the host reports this commit before the run is allowed
to pass. Verify with `sha256sum -c imcp2-linux-arm64.sha256`.
EOF
gh release edit release-2026-07-29 -R dfinity/imcp2 --notes-file /tmp/notes.md

For reference, any future manual backfill should use --notes-file with the block above rather than an inline --notes string, for the same reason.

The rest of the release verified clean

Production is on 48f1ed6 and healthy — the skipped publish was the only thing that went wrong:

Check Result
/version commit 48f1ed6 ✅
/version instances[] [{prod, /mcp, https://id.ai, rdmx6-…}] ✅ — production II, no beta entry
/mcp-prod 404 ✅ removed as intended
/mcp-beta 404 ✅ correctly staging-only
POST /mcp 401 OAuth challenge ✅
/status/ dashboard overall: pass ✅ — II section green, ending the false failure

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
@aterga
aterga marked this pull request as ready for review July 29, 2026 11:14
@aterga
aterga requested a review from a team as a code owner July 29, 2026 11:14
Copilot AI review requested due to automatic review settings July 29, 2026 11:14

Copilot AI 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.

Pull request overview

This PR fixes a GitHub Actions gating bug where the publish job in the production release workflow was always being skipped on release-* tag pushes due to the implicit success() behavior interacting with a deliberately-skipped upstream job (validate-ref).

Changes:

  • Updates the publish job condition to explicitly include status checks (!failure() && !cancelled()) alongside the event check, preventing the implicit success() from skipping publish when validate-ref is skipped on tag pushes.
  • Adds an inline comment documenting the root cause and referencing the concrete failing run for future debugging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aterga
aterga merged commit 119562c into main Jul 29, 2026
2 checks passed
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.

3 participants