Repository navigation
chore: add a justfile that mirrors the CI gate - #247
Conversation
`just check` runs the steps in .github/workflows/ci.yml in the same order, and each step is its own recipe. The recipes unexport RUSTUP_TOOLCHAIN and CARGO_TARGET_DIR so that an inherited override cannot replace the pinned toolchain or move the target directory that examples/generate.go reads from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Arcjet Review — 🟡 Medium Risk
Decision: Needs Review
Rationale: This PR adds a new local command runner that is intended to mirror the CI gate and updates contributor guidance to use it. There are no apparent security issues, no secrets, and no escalation triggers fired. However, I am not confident the new Go-related recipes will work from the repository root: the existing AGENTS.md command ran Go generation and tests from the examples directory, while the new justfile runs go generate ./... and go test ./... from the justfile directory. If the Go module is under examples/ and there is no root go.mod or go.work, these recipes may fail and just check would not actually mirror CI.
Summary of Changes
Adds a root justfile with recipes for formatting, linting, building, Rust tests, Go example generation/tests, CLI snapshot tests, snapshot updates, and cleanup. Updates AGENTS.md to document just check and related recipes.
Review Focus Areas
- Should the Go generation recipe run from
examples/rather than the repository root?
The previous documented verification command used(cd examples && go generate ./... && go test ./...); runninggo generate ./...from the root may fail if the Go module/workspace is not rooted there. - Should the Go test recipe run from
examples/or otherwise set the working directory to match CI?
just checkis intended to mirror CI, so the Go commands need to use the same module context and working directory as the workflow.
Review: cce799ba | Model: openai/gpt-5.5 | Powered by Arcjet Review
AGENTS.md now names a recipe wherever it gave a manual command. Two operations it described by hand get recipes: `just run` passes its arguments to gravity, and `just new-snapshot` builds one example and writes its .toml, .stdout and .stderr snapshot files, which trycmd cannot create. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gravity had no single command for running the CI gate locally; each step had to be copied out of
.github/workflows/ci.yml. This adds a justfile in the style of the other Arcjet repos.just checkrunslint,build,test,test-goandtest-cli, the steps inci.ymlin the same order.lintalso checks the justfile's own formatting.just clippyexists but is not part ofcheck, because CI does not run clippy.just update-snapshots,just formatandjust clean-examplescover the other routine tasks.The recipes unexport
RUSTUP_TOOLCHAINandCARGO_TARGET_DIR. The first would replace the toolchain pinned inrust-toolchain.toml. The second would move the target directory thatexamples/generate.goreads from, andgo generatewould then fail.AGENTS.md now points at the recipes.
🤖 Generated with Claude Code