fix(loop): resolve P0-1 (B-7) git diff CWD isolation and untracked file capture (20/20 PASS)

This commit is contained in:
2026-08-11 09:39:57 +09:00
parent 64cde54e89
commit f8084cd927
8 changed files with 533 additions and 23 deletions
+8
View File
@@ -339,6 +339,14 @@ d['herdr_sessions'] = [
json.dump(herdr_state, f, indent=2)
fcntl.flock(lock_f, fcntl.LOCK_UN)
# Initialize git repo in sandbox for e2e loop review
subprocess.run(["git", "init"], cwd=str(tmp_path), capture_output=True)
subprocess.run(["git", "config", "user.email", "test@example.com"], cwd=str(tmp_path), capture_output=True)
subprocess.run(["git", "config", "user.name", "Test User"], cwd=str(tmp_path), capture_output=True)
(tmp_path / "README.md").write_text("# Test Repo\n")
subprocess.run(["git", "add", "."], cwd=str(tmp_path), capture_output=True)
subprocess.run(["git", "commit", "-m", "initial commit"], cwd=str(tmp_path), capture_output=True)
# Define mock reviewer and planner outputs
# Let's mock a scenario:
# Critique: worker challenge