Skip to content

chore: add a justfile that mirrors the CI gate - #247

Merged
arcjet-rei merged 2 commits into
mainfrom
rei/fix/ENG-1485-justfile
Oct 7, 2026
Merged

arcjet-rei merged 2 commits into
mainfrom
rei/fix/ENG-1485-justfile

Conversation

@arcjet-rei

Copy link
Copy Markdown
Contributor

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 check runs lint, build, test, test-go and test-cli, the steps in ci.yml in the same order. lint also checks the justfile's own formatting. just clippy exists but is not part of check, because CI does not run clippy. just update-snapshots, just format and just clean-examples cover the other routine tasks.

The recipes unexport RUSTUP_TOOLCHAIN and CARGO_TARGET_DIR. The first would replace the toolchain pinned in rust-toolchain.toml. The second would move the target directory that examples/generate.go reads from, and go generate would then fail.

AGENTS.md now points at the recipes.

🤖 Generated with Claude Code

`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>
@arcjet-rei
arcjet-rei requested a review from a team as a code owner October 7, 2026 16:26

@arcjet-review arcjet-review Bot 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.

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

Review: cce799ba | Model: openai/gpt-5.5 | Powered by Arcjet Review

Comment thread justfile
Comment thread justfile
@arcjet-review arcjet-review Bot added needs review Awaiting human review and removed ai-review-in-progress labels Oct 7, 2026
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>
@arcjet-review arcjet-review Bot removed the needs review Awaiting human review label Oct 7, 2026
@arcjet-rei
arcjet-rei merged commit 36e4d0d into main Oct 7, 2026
4 checks passed
@arcjet-rei
arcjet-rei deleted the rei/fix/ENG-1485-justfile branch October 7, 2026 17:06
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