Skip to content

docs(agents): scale the local gate to the diff - #696

Open
AprilNEA wants to merge 1 commit into
masterfrom
docs/tiered-local-gate
Open

docs(agents): scale the local gate to the diff#696
AprilNEA wants to merge 1 commit into
masterfrom
docs/tiered-local-gate

Conversation

@AprilNEA

Copy link
Copy Markdown
Owner

Summary

The local gate required full-workspace clippy + tests before every push —
20+ minutes in a cold worktree — while CI already runs the full matrix on
every push. For a one-crate change that duplicated CI instead of protecting
it, and it was slowing every iteration.

This makes the gate two-tier. Scoped diffs (one or two crates, nothing
workspace-level) run fmt plus crate-scoped clippy and tests, then push and
let CI sweep dependents and the other platforms. The full four-step gate
stays a hard stop exactly where historical CI reds have come from:

  • after any rebase or conflict resolution (including adopting contributor PRs);
  • workspace-level changes (root Cargo.toml, Cargo.lock,
    rust-toolchain.toml, CI workflows);
  • diffs spanning three or more crates.

The hid-crate rustdoc step attaches to diffs touching those three crates
rather than to every push. Pushing a known-red tree is still out, and the
prek push hook keeps full-workspace clippy as the backstop.

Changes

  • AGENTS.md (and CLAUDE.md via its symlink): rewrite the "Local gate"
    section as the two tiers above; align push-checklist item 2 with the
    tiered wording.

Testing

Docs-only; no code built. Verified CLAUDE.md is a symlink to AGENTS.md,
so one edit covers both entry points.

The gate demanded full-workspace clippy + tests before every push, even for
a one-crate change — 20+ minutes in a cold worktree — while CI runs the same
full matrix on every push anyway. That tax was slowing every iteration.

Keep the full gate as a hard stop only where local reds have actually come
from: after rebases/conflict resolution, for workspace-level changes (root
manifest, lockfile, toolchain, CI), and for diffs spanning three or more
crates. Scoped diffs run fmt plus crate-scoped clippy and tests, and lean on
CI for dependents and the other platforms. The hid-crate rustdoc step now
attaches to diffs that touch those crates instead of every push.
Copilot AI lite review requested due to automatic review settings August 20, 2026 02:48

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR replaces the mandatory full-workspace pre-push gate with scoped and full tiers based on a diff’s blast radius.

  • Adds crate-scoped formatting, linting, and testing instructions for one- or two-crate changes.
  • Retains the full gate for rebases, workspace-level changes, and changes spanning at least three crates.
  • Makes HID rustdoc checks conditional on changes to the HID crates.
  • Updates the agent push checklist to reference the tiered gate.

Confidence Score: 4/5

The documentation change is safe to merge after correcting the non-blocking inconsistency in the push checklist.

The main gate definition includes multi-crate diffs in the full tier, while the condensed checklist directs such diffs to scoped checks unless they also involve a rebase or workspace-level file.

Files Needing Attention: AGENTS.md

Important Files Changed

Filename Overview
AGENTS.md Documents the tiered local gate, but the push checklist omits the full-gate requirement for diffs spanning three or more crates.

Fix all with Greploop Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "docs(agents): scale the local gate to th..." | Re-trigger Greptile

Comment thread AGENTS.md
Comment on lines +312 to +314
2. Local gate green on the **final** tree, at the tier the diff calls for —
full gate after any rebase or for workspace-level changes; scoped
fmt + clippy + test otherwise.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Checklist omits multi-crate gate

The condensed checklist classifies every non-workspace, non-rebase diff as scoped, omitting the full-gate requirement for changes spanning three or more crates. An agent following this checklist can therefore run only scoped checks for a multi-crate change, weakening the intended local validation.

Suggested change
2. Local gate green on the **final** tree, at the tier the diff calls for —
full gate after any rebase or for workspace-level changes; scoped
fmt + clippy + test otherwise.
2. Local gate green on the **final** tree, at the tier the diff calls for —
full gate after any rebase, for workspace-level changes, or for diffs
spanning three or more crates; scoped fmt + clippy + test otherwise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex Fix in Claude Code

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.

2 participants