feat: require validation cwd and HEAD proof in reviewer reports (Closes #398)

Add assess_validation_cwd_proof_report so reviewer final reports must prove
pwd, git rev-parse HEAD, git status, and expected PR head SHA before
claiming validation ran in a branches/ worktree. Wire the verifier into
final_report_validator and gitea_validate_review_final_report.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
2026-07-07 11:28:34 -04:00
co-authored by Claude Opus 4.8
parent 027a3cb92c
commit 8df795ef80
8 changed files with 447 additions and 0 deletions
@@ -574,6 +574,28 @@ Do not claim “full-suite failures are pre-existing” unless baseline proof is
## 23. Validation command proof rule
Before any diff, test, or compile validation, record in the same command
transcript or final report:
* `pwd` or explicit working directory
* `git rev-parse HEAD`
* `git status --short --branch`
* expected PR head SHA (candidate head SHA)
Validation commands must use one of:
* `git -C <review_worktree> ...`
* `cd <review_worktree> && ...` in the same command
* tool-provided explicit working-directory metadata
Do not rely on inferred shell cwd from a prior command in a different block.
`gitea_validate_review_final_report` rejects validation claims without
cwd/HEAD proof when `validation_session` is supplied.
Baseline validation must document baseline worktree path, baseline target SHA,
cwd proof, exact baseline command, and baseline result using the same rules.
Report the exact validation command as executed.
Report the working directory where validation ran.
@@ -1096,6 +1118,7 @@ Controller Handoff:
* Baseline worktree path:
* Files reviewed:
* Validation:
* Validation cwd/HEAD proof:
* Official validation integrity status:
* Terminal review mutation:
* Review decision: