Skip to content

feat(loop): gate target precedence + ecosystem-neutral gate docs#74

Merged
protoquinn[bot] merged 1 commit into
mainfrom
feat/gate-ecosystem
Jul 7, 2026
Merged

feat(loop): gate target precedence + ecosystem-neutral gate docs#74
protoquinn[bot] merged 1 commit into
mainfrom
feat/gate-ecosystem

Conversation

@mabry1985

Copy link
Copy Markdown
Contributor

Follow-up to the auto gate 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

  • gate target resolves first (before ci/check/verify), for both package.json scripts and Makefile/justfile targets — so a repo whose ci is the whole heavy suite points coders at a dedicated fast gate, and auto won't grab the heavy one.
  • Ecosystem-neutral docs: node → pnpm run <it>; Python/Rust/Go → make/just <it>. Worked example — protoAgent: 9 workflows, but only checks.yml (ruff + pytest) is pull_request-gating and coder-relevant; desktop-build/docker-publish/release/marketing-deploy are push/tag/dispatch and never a coder gate. Its slice is make gate = ruff check . && pytest -q -m "not integration".

2 new resolver tests (gate beats ci in package.json and Makefile). Full suite green.

🤖 Generated with Claude Code

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>
@protoquinn

protoquinn Bot commented Jul 7, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn 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.

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 the package.json and Makefile/justfile resolver paths.
  • Two new tests: test_resolve_gate_auto_prefers_gate_over_ci_script and test_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_NAMES tuple extraction is clean — DRYs the two resolver paths and makes the gate-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(...)) mentions gate/ci/check for scripts and gate/ci for 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 named check or verify, but the log string doesn't reflect the actual code's behavior. Cosmetic.

⚠️ CI (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

@protoquinn

protoquinn Bot commented Jul 7, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #74.

@protoquinn protoquinn 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.

CI terminal-green, no blockers on prior review — auto-approving on green (#748).

@protoquinn

protoquinn Bot commented Jul 7, 2026

Copy link
Copy Markdown

✅ CI went terminal-green with no blockers on the prior review — promoting it to APPROVED per the approve-on-green policy (#748).

@protoquinn protoquinn Bot merged commit cd60ca3 into main Jul 7, 2026
1 check passed
@protoquinn protoquinn Bot deleted the feat/gate-ecosystem branch July 7, 2026 03:42
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.

1 participant