feat(loop): gate target precedence + ecosystem-neutral gate docs#74
Merged
Conversation
The gate is the coder's FAST slice of CI (lint + typecheck + unit tests), not a full-CI replica — a complex CI's heavy jobs (matrix, integration, docker, release, deploy) stay CI-only and come back via the CI-bounce. So a repo with a big CI needs to point coders at a dedicated fast target, distinct from a heavy `ci`. - Resolve a declared `gate` target FIRST (before ci/check/verify), for both package.json scripts and Makefile/justfile targets. `make gate` / `pnpm run gate` / `just gate` is the unambiguous "this is the coder's pre-PR slice". - Document the model ecosystem-neutrally: node → `pnpm run <it>`, everything else (Python/Rust/Go) → `make/just <it>`. Worked example: a protoAgent-shaped 9-workflow CI whose only coder-relevant, PR-gating job is ruff+pytest → `make gate`. 2 new resolver tests (gate beats ci, in both package.json and Makefile). Suite green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #74 | feat(loop): gate target precedence + ecosystem-neutral gate docs
VERDICT: WARN (CI pending — comment only; auto-approve-on-green once CI settles)
CI Status
- test: ⏳ queued
Diff Review
- 3 files, +135/-19 — mostly docs (README, loop.py docstring) + a single-line logic change:
_GATE_TARGET_NAMES = ("gate", "ci", "check", "verify")replaces inline tuples in both thepackage.jsonandMakefile/justfileresolver paths. - Two new tests:
test_resolve_gate_auto_prefers_gate_over_ci_scriptandtest_resolve_gate_auto_makefile_gate_beats_ci.
Observations
- CLAWPATCH: structural pass across 18 features — zero findings. No correctness, concurrency, data-loss, or contract issues detected.
- The
_GATE_TARGET_NAMEStuple extraction is clean — DRYs the two resolver paths and makes thegate-first precedence explicit in one place. No risk of the two paths drifting. - Docs are thorough and ecosystem-neutral (Python/Rust/Go examples with Makefile/justfile, not just Node).
- LOW: the warning message in the gateless fallback case (
log.warning(...)) mentionsgate/ci/checkfor scripts andgate/cifor Makefile — slightly asymmetric vs the actual tuple("gate", "ci", "check", "verify")which is used for both paths. Not a bug, just a docs-log surface misalignment. The warning string is fine because Makefile targets won't practically be namedcheckorverify, but the log string doesn't reflect the actual code's behavior. Cosmetic.
test) is still queued. Per the approve-on-green policy, this review promotes to APPROVED automatically once every check settles terminal-green — no re-review needed.
— Quinn, QA Engineer
|
Submitted COMMENT review on #74. |
|
✅ CI went terminal-green with no blockers on the prior review — promoting it to APPROVED per the approve-on-green policy (#748). |
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.
Follow-up to the
autogate resolver (#73): make the model first-class for complex-CI, non-node repos.The insight
The pre-PR gate is the coder's fast slice of CI — lint + typecheck + unit tests — not a full-CI replica. A complex CI's heavy jobs (cross-platform matrix, integration, docker publish, release, deploy) stay CI-only: they run once on the PR as the human's merge gate, and anything the local slice misses returns to the coder via the CI-bounce. You never replicate heavy CI in a worktree.
Changes
gatetarget resolves first (beforeci/check/verify), for bothpackage.jsonscripts andMakefile/justfiletargets — so a repo whoseciis the whole heavy suite points coders at a dedicated fastgate, andautowon't grab the heavy one.pnpm run <it>; Python/Rust/Go →make/just <it>. Worked example — protoAgent: 9 workflows, but onlychecks.yml(ruff + pytest) ispull_request-gating and coder-relevant;desktop-build/docker-publish/release/marketing-deployarepush/tag/dispatchand never a coder gate. Its slice ismake gate=ruff check . && pytest -q -m "not integration".2 new resolver tests (
gatebeatsciin package.json and Makefile). Full suite green.🤖 Generated with Claude Code