Skip to content

ci: hackathon P0 — snapshot guard + release recipe + branch protection guide#41

Open
keanji-x wants to merge 3 commits into
mainfrom
chore/ci-p0-hackathon
Open

ci: hackathon P0 — snapshot guard + release recipe + branch protection guide#41
keanji-x wants to merge 3 commits into
mainfrom
chore/ci-p0-hackathon

Conversation

@keanji-x

@keanji-x keanji-x commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three Hackathon-week P0 CI/CD additions per the CI/CD audit:

  • forge snapshot --check in the contracts CI job + initial baseline (contracts/.gas-snapshot, 57 entries covering ArenaEngineTest + GameEngineTest)
  • just release recipe — chains forge buildforge test -vvforge snapshot --checkjust gravity-deploy → patch routerAddress into frontend/config/gravity.json → echo next-step bullets (commit / tag / push) for manual confirmation. Does not auto-commit, auto-tag, or auto-push.
  • paths-ignore: ['**.md', 'docs/**'] on push + pull_request triggers — docs-only changes no longer burn CI minutes.
  • docs/ci-branch-protection.md — admin checklist for the required GitHub UI configuration (required checks match the actual job name: fields).

Out of scope (intentional)

Test plan

  • CI green on this PR (contracts / frontend / mcp-server jobs)
  • forge snapshot --check matches baseline locally (cd contracts && forge snapshot --check)
  • just release dry-run: forge build + test pass; recipe halts cleanly if deployed-addresses.json is missing (it's gitignored — only present after a deploy)
  • paths-ignore works: edit a .md file in a follow-up PR, confirm CI does not trigger
  • Admin follows docs/ci-branch-protection.md to configure main (post-merge action)

Merge order with #38

This PR should merge first — paths-ignore is a base-level optimization that #38 inherits. After #38 lands, admin adds Agent Runner to required checks per docs/ci-branch-protection.md.

Review process

This PR went through codex implementation → dual-path review (independent code + design reviewers in parallel) → 1 round of fix-loop → re-review → both reviewers green. 4 blockers/gaps found and closed across the two rounds (router-grep fragility, snapshot drift escape hatch, branch-protection placeholder doc, "Now:" bullet completeness).

🤖 Generated with Claude Code

keanji-x and others added 3 commits June 3, 2026 15:21
- contracts CI: run forge snapshot --check after tests; commit baseline .gas-snapshot
- ci.yml on: trigger now skips **.md and docs/**
- justfile: add release recipe (build/test/snapshot-check/gravity-deploy/bump router in frontend/config/gravity.json), no auto commit/tag/push
Address review feedback on the release flow and branch protection setup
ahead of the hackathon demo.

- justfile release: extract router by field name ("routerAddress") instead
  of the first 0x-prefixed hex in deployed-addresses.json, so future
  additions (operator, deployer, tx hash) cannot silently leak through as
  the router address.
- justfile release: when forge snapshot --check fails, print the exact
  refresh command (forge snapshot && commit .gas-snapshot) so a baseline
  drift after PR #32 lands does not block the demo with a cryptic error.
- docs/ci-branch-protection.md: placeholder admin checklist for required
  status checks on main (Contracts, Frontend, MCP Server, and Agent Runner
  after PR #38), so branch protection does not get forgotten before the
  demo window.
Pin foundry-toolchain to the `stable` channel in CI so the runner no
longer pulls nightly and drifts vs the local baseline. Regenerate
.gas-snapshot using `ghcr.io/foundry-rs/foundry:stable` (forge 1.5.1)
to match the CI install, restoring `forge snapshot --check` parity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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