Compare commits

..

5 Commits

Author SHA1 Message Date
Jobdori
6e239c0b67 merge: fix render_diff_report test isolation (P0 backlog item) 2026-04-04 05:33:35 +09:00
Jobdori
3327d0e3fe fix(tests): isolate render_diff_report tests from real working-tree state
Replace with_current_dir+render_diff_report() with direct render_diff_report_for(&root)
calls in the three diff-report tests. The env_lock mutex only serializes within one
test binary; cargo test --workspace runs binaries in parallel, so set_current_dir races
were possible across binaries. render_diff_report_for(cwd) accepts an explicit path
and requires no global state mutation, making the tests reliably green under full
workspace parallelism.
2026-04-04 05:33:18 +09:00
Jobdori
b6a1619e5f docs(roadmap): prioritize backlog — P0/P1/P2/P3 ordering with wiring items first 2026-04-04 04:31:38 +09:00
Jobdori
da8217dea2 docs(roadmap): add backlog item #13 — cross-module integration tests 2026-04-04 03:31:35 +09:00
Jobdori
e79d8dafb5 docs(roadmap): add backlog item #12 — wire SummaryCompressor into lane event pipeline 2026-04-04 03:01:59 +09:00
2 changed files with 26 additions and 21 deletions

View File

@ -268,17 +268,28 @@ Acceptance:
## Immediate Backlog (from current real pain)
1. Worker readiness handshake + trust resolution
2. Prompt misdelivery detection and recovery
3. Canonical lane event schema in clawhip
4. Failure taxonomy + blocker normalization
5. Stale-branch detection before workspace tests
6. MCP structured degraded-startup reporting
7. Structured task packet format
8. Lane board / machine-readable status API
9. Isolate `render_diff_report` tests into tmpdir — currently flaky under `cargo test --workspace` because they read real working-tree git state instead of an isolated repo; breaks CI whenever active worktree ops leave staged/unstaged changes
10. Swarm branch-lock protocol — when multiple claws target the same branch, add a lock or commit-detection signal so the second claw can skip redundant work instead of running the full explore-plan-implement-test-review cycle on already-committed code
11. Wire lane-completion emitter — `LaneContext::completed` is a passive bool set by callers; nothing fires it automatically; need a runtime path that sets `completed = true` and triggers the policy engine lane-closeout rule when a branch is pushed, tests pass, and session control reports done
Priority order: P0 = blocks CI/green state, P1 = blocks integration wiring, P2 = clawability hardening, P3 = swarm-efficiency improvements.
**P0 — Fix first (CI reliability)**
1. Isolate `render_diff_report` tests into tmpdir — flaky under `cargo test --workspace`; reads real working-tree state; breaks CI during active worktree ops
**P1 — Next (integration wiring, unblocks verification)**
2. Add cross-module integration tests — every Phase 1-2 module has unit tests but no integration test connects adjacent modules; wiring gaps are invisible to CI without these
3. Wire lane-completion emitter — `LaneContext::completed` is a passive bool; nothing sets it automatically; need a runtime path from push+green+session-done to policy engine lane-closeout
4. Wire `SummaryCompressor` into the lane event pipeline — exported but called nowhere; `LaneEvent` stream never fed through compressor
**P2 — Clawability hardening (original backlog)**
5. Worker readiness handshake + trust resolution
6. Prompt misdelivery detection and recovery
7. Canonical lane event schema in clawhip
8. Failure taxonomy + blocker normalization
9. Stale-branch detection before workspace tests
10. MCP structured degraded-startup reporting
11. Structured task packet format
12. Lane board / machine-readable status API
**P3 — Swarm efficiency**
13. Swarm branch-lock protocol — detect same-module/same-branch collision before parallel workers drift into duplicate implementation
## Suggested Session Split

View File

@ -5580,7 +5580,7 @@ mod tests {
format_unknown_slash_command_message, normalize_permission_mode, parse_args,
parse_git_status_branch, parse_git_status_metadata_for, parse_git_workspace_summary,
permission_policy, print_help_to, push_output_block, render_config_report,
render_diff_report, render_memory_report, render_repl_help, render_resume_usage,
render_diff_report, render_diff_report_for, render_memory_report, render_repl_help, render_resume_usage,
resolve_model_alias, resolve_session_reference, response_to_events,
resume_supported_slash_commands, run_resume_command,
slash_command_completion_candidates_with_sessions, status_context, validate_no_args,
@ -6632,9 +6632,7 @@ UU conflicted.rs",
git(&["add", "tracked.txt"], &root);
git(&["commit", "-m", "init", "--quiet"], &root);
let report = with_current_dir(&root, || {
render_diff_report().expect("diff report should render")
});
let report = render_diff_report_for(&root).expect("diff report should render");
assert!(report.contains("clean working tree"));
fs::remove_dir_all(root).expect("cleanup temp dir");
@ -6657,9 +6655,7 @@ UU conflicted.rs",
fs::write(root.join("tracked.txt"), "hello\nstaged\nunstaged\n")
.expect("update file twice");
let report = with_current_dir(&root, || {
render_diff_report().expect("diff report should render")
});
let report = render_diff_report_for(&root).expect("diff report should render");
assert!(report.contains("Staged changes:"));
assert!(report.contains("Unstaged changes:"));
assert!(report.contains("tracked.txt"));
@ -6684,9 +6680,7 @@ UU conflicted.rs",
fs::write(root.join("ignored.txt"), "secret\n").expect("write ignored file");
fs::write(root.join("tracked.txt"), "hello\nworld\n").expect("write tracked change");
let report = with_current_dir(&root, || {
render_diff_report().expect("diff report should render")
});
let report = render_diff_report_for(&root).expect("diff report should render");
assert!(report.contains("tracked.txt"));
assert!(!report.contains("+++ b/ignored.txt"));
assert!(!report.contains("+++ b/.omx/state.json"));