feat(reviewer): fail closed on dirty worktrees and forbidden git cleanup (closes #233) #234

Merged
sysadmin merged 1 commits from feat/issue-233-reviewer-worktree-gate into master 2026-07-06 01:06:24 -05:00
Owner

Implements issue #233 reviewer worktree safety walls.

Changes

  • Add reviewer_worktree.py with dirty-worktree detection, PR-scope comparison, forbidden git command classification (stash, checkout --, reset, clean, etc.), and scratch-worktree proof helpers
  • Integrate worktree proof into build_final_report (blocks merge when proof fails)
  • Extend review-role Controller Handoff required fields for worktree path, dirty status, scratch worktree use, and local mutation confirmation
  • Update review-pr.md template with explicit no-stash/no-reset rules
  • Add tests/test_reviewer_worktree.py (16 tests)

Validation

pytest tests/test_reviewer_worktree.py tests/test_review_proofs.py -q
133 passed

Closes #233.

Implements issue #233 reviewer worktree safety walls. ## Changes - Add `reviewer_worktree.py` with dirty-worktree detection, PR-scope comparison, forbidden git command classification (`stash`, `checkout --`, `reset`, `clean`, etc.), and scratch-worktree proof helpers - Integrate worktree proof into `build_final_report` (blocks merge when proof fails) - Extend review-role Controller Handoff required fields for worktree path, dirty status, scratch worktree use, and local mutation confirmation - Update `review-pr.md` template with explicit no-stash/no-reset rules - Add `tests/test_reviewer_worktree.py` (16 tests) ## Validation ``` pytest tests/test_reviewer_worktree.py tests/test_review_proofs.py -q 133 passed ``` Closes #233.
jcwalker3 added 1 commit 2026-07-06 01:04:52 -05:00
Add reviewer_worktree proofs that block stash/reset/checkout -- cleanup of
unrelated local files, require scratch worktree reporting when the main tree
is dirty outside PR scope, and integrate the gate into final report grading
and Controller Handoff review fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
sysadmin reviewed 2026-07-06 01:06:22 -05:00
sysadmin left a comment
Owner

Reviewed via gitea-reviewer. Scope matches #233: adds reviewer_worktree.py, integrates worktree proof into build_final_report, extends review handoff fields, updates review-pr.md, and adds 16 tests. Five files only; no unrelated changes. Eligibility passed; local diff validated at head 4f46655; pytest 133 passed in scratch worktree. Approved.

Reviewed via gitea-reviewer. Scope matches #233: adds `reviewer_worktree.py`, integrates worktree proof into `build_final_report`, extends review handoff fields, updates `review-pr.md`, and adds 16 tests. Five files only; no unrelated changes. Eligibility passed; local diff validated at head `4f46655`; pytest 133 passed in scratch worktree. Approved.
sysadmin merged commit 7966e70db6 into master 2026-07-06 01:06:24 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#234