ci: hackathon P0 — snapshot guard + release recipe + branch protection guide#41
Open
keanji-x wants to merge 3 commits into
Open
ci: hackathon P0 — snapshot guard + release recipe + branch protection guide#41keanji-x wants to merge 3 commits into
keanji-x wants to merge 3 commits into
Conversation
- 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>
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
Three Hackathon-week P0 CI/CD additions per the CI/CD audit:
forge snapshot --checkin thecontractsCI job + initial baseline (contracts/.gas-snapshot, 57 entries coveringArenaEngineTest+GameEngineTest)just releaserecipe — chainsforge build→forge test -vv→forge snapshot --check→just gravity-deploy→ patchrouterAddressintofrontend/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/**']onpush+pull_requesttriggers — 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 jobname:fields).Out of scope (intentional)
CardLedger.t.sol/GTreasury.t.sol— contracts don't exist yet (feat(arena/market): card 持久化 + 二级市场 (list/buy/cancel) #32).agent-runnerCI job + Dockerfile — handled by ci: add agent-runner type check + Docker image build #38 (avoids merge conflict).Test plan
forge snapshot --checkmatches baseline locally (cd contracts && forge snapshot --check)just releasedry-run: forge build + test pass; recipe halts cleanly ifdeployed-addresses.jsonis missing (it's gitignored — only present after a deploy)paths-ignoreworks: edit a.mdfile in a follow-up PR, confirm CI does not triggerdocs/ci-branch-protection.mdto configuremain(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 Runnerto required checks perdocs/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