refactor: use tree hash + git diff for post-approval change detection

- Replace commit hash comparison with git tree hash (HEAD^{tree}) to
  avoid false re-review triggers on commit-only operations
- Use git diff --quiet for actual file change detection
- Update source_ref on failed reviewer execution with done verdict
- Add tests for empty-commit finalize and code-change re-review
- Document Codex reviewer bash mutation gap in reviewer-runtime
This commit is contained in:
Eyejoker
2026-03-29 23:23:30 +09:00
parent 2e4de9cca8
commit 504be9e41a
3 changed files with 213 additions and 21 deletions

View File

@@ -5,6 +5,9 @@ import path from 'path';
import type { RoomRoleContext } from './room-role-context.js';
// Codex app-server does not expose a BashTool-style pre-use hook, so reviewer
// mode can only hard-block mutating git via PATH interception here. Non-git
// shell mutation commands remain a known gap when REVIEWER_AGENT_TYPE=codex.
const BLOCKED_GIT_SUBCOMMANDS = new Set([
'add',
'am',