feat(tools): add lane_completion module (P1.3)

Implement automatic lane completion detection:
- detect_lane_completion(): checks session-finished + tests-green + pushed
- evaluate_completed_lane(): triggers CloseoutLane + CleanupSession actions
- 6 tests covering all conditions

Bridges the gap where LaneContext::completed was a passive bool
that nothing automatically set. Now completion is auto-detected.

ROADMAP P1.3 marked done.
This commit is contained in:
Jobdori
2026-04-04 22:05:49 +09:00
parent ab778e7e3a
commit fc675445e6
3 changed files with 182 additions and 1 deletions

View File

@@ -275,7 +275,7 @@ Priority order: P0 = blocks CI/green state, P1 = blocks integration wiring, P2 =
**P1 — Next (integration wiring, unblocks verification)**
2. Add cross-module integration tests — **done**: 12 integration tests covering worker→recovery→policy, stale_branch→policy, green_contract→policy, reconciliation flows
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
3. Wire lane-completion emitter — **done**: `lane_completion` module with `detect_lane_completion()` auto-sets `LaneContext::completed` from session-finished + tests-green + push-complete → policy closeout
4. Wire `SummaryCompressor` into the lane event pipeline — **done**: `compress_summary_text()` feeds into `LaneEvent::Finished` detail field in `tools/src/lib.rs`
**P2 — Clawability hardening (original backlog)**