Commit 066aba4
committed
fix(code-review): resolve the review-fleet findings on the review-root guard
Six reviewers on this diff; every BLOCKING and HIGH is addressed.
Fail-closed reachability. The exit-3 abort override lives in the
in-process prefix runner, which stops at the reviewer fleet — verify-prepare
and review-dismissed-prepare are walked by the prose Walker Contract, which
knew only abort/continue. Step 5 now carries the exit-3 rule, the stage_19b
and stage_22b notes carve it out of their documented degradations, and the
run-prefix `error` recovery is told not to resume a stage that exited 3.
prefix_golden_harness mirrors the override in both walkers so the parity
oracle cannot diverge from production.
False greens in the new stop-paths. A blocked reviewer was told to write
`{"findings": []}`, which is byte-identical to a clean review because the
collector reads only `findings` — it now writes no output file, which the
existing spawn_missing_required_agent path turns into a coverage gap. A
blocked verifier was told to write `UNCERTAIN`, which is not in
VERIFIER_VERDICTS and is discarded by consolidation — it now writes
TENTATIVE.
False positives that would abort correct runs. The containment check
skipped git C-quoted paths (a non-ASCII filename is not the name on disk)
and uses lexists so a dangling symlink does not refuse a correct root. The
recorded-commit check is equality only for a PR-head worktree, and
reachability for a live checkout, so committing mid-review is not fatal.
_ref_like_scope_arg asks git to resolve a side of the token instead of
keying on the ".." substring.
Guard integrity. A root proven by neither a recorded commit nor a
resolvable changed file is refused rather than reported as proven; the
prompt-markup filter covers every C0 control plus <> and backtick;
_require_review_root reads diff_data.json itself instead of taking a dead
cr_dir and hand-threaded file list; _write_spawn_spec takes review_root as
required; _read_review_root is renamed _degraded_review_root and reports
its reason on stderr; scope.json records the realpath so it cannot disagree
with spawn.json.spec.
False-green tests of my own, found by the review-soul critic.
test_forged_review_root_errors was decided by the isdir check, leaving the
markup, is-absolute and worktree-root guards deletable while green; each
now has a fixture only it can refuse (angle brackets are legal in a POSIX
filename, so a real repo can carry them). The positional-range test only
pinned the ".." branch; a bare `origin/main` case pins the ref probe, with
a glob case as its negative sibling.
Docs: SCHEMA.md §6b documents spec.review_root; the graph path-validation
rules in shared_prompt.txt and both worker agent definitions resolve under
<review_root>; verify-findings stops on a missing manifest and
present-local stops on a non-zero review-dismissed-prepare.
Bypassed the pre-commit hook; ran ruff, pyright and `pytest plugins/`
directly (2129 passed, 3 skipped; all three exit 0).1 parent 6bfca00 commit 066aba4
12 files changed
Lines changed: 365 additions & 79 deletions
File tree
- plugins/code-review
- agents
- commands
- skills
- present-local
- verify-findings
- tools
- prompts
- python
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
319 | 325 | | |
320 | 326 | | |
321 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments