The deterministic half of protoAgent's PR-review QA tier (ADR 0078).
protopatch_review— runs the protoPatch (clawpatch) structural analysis engine over a pull request and returns its findings in the ADR 0077 findings contract withsource: "protopatch".- Head/base SHAs resolved server-side from the PR (never model-supplied refs).
- A content-addressed checkout cache: blobless partial clones (
--filter=blob:none) keyed onrepo@headSha, 1h TTL, LRUprune()under entry/byte caps. clawpatch ci --provider gateway --json --state-dir <per-repo> --since <baseSha>under a hard wall-clock budget (default 300s, SIGKILL past it).- Findings read from the per-repo state dir, confined to the PR's changed files, severity mapped (critical/high/medium/low → blocker/major/minor/nit), category preserved verbatim.
- Every failure degrades (
PROTOPATCH UNAVAILABLE+ a prescribed Gap line) — a starved structural pass must never void the panel review (ADR 0078 D3).
structural-finder— the subagent seat: calls the tool once, relays the findings verbatim, reports the Gap on unavailability. A relay, not a reviewer.workflows/code-review-structural.yaml— the five-finder panel recipe: the four core LLM finders + the structural seat → dedup/rank → independent verify → report. protoPatch findings get the same adversarial verify as everything else — the edge over wiring the engine straight into a verdict.
Later phases (ADR 0078 C): webhook chokepoint, structural-trigger dispatch, approve-on-green + sweep, the review eval.
- protoAgent ≥ the version carrying the findings
sourcefield (see the manifest pin). git,gh(authenticated, orGITHUB_TOKEN/GH_TOKEN), and theclawpatchCLI (npm i -g @protolabsai/protopatch).- Gateway credentials in the host env:
GATEWAY_API_KEYorOPENAI_API_KEY(+OPENAI_BASE_URL/pr_reviewer.gateway_base_urlfor a non-default gateway).
pip install -r requirements-dev.txt
ruff check . && pytest -q
Host-free: the suite stubs graph.subagents.config and never shells out.
Reviewed by its own machinery — see ADR 0078.