Make G006 task policy state machine executable

Typed task packets, policy decisions, lane board status, and session liveness now have concrete runtime contracts and focused regressions for Stream 4.

Constraint: G006 requires task/lane operation without pane scraping while preserving legacy task packet callers.
Rejected: waiting on stale worker worktrees | all G006 worker worktrees remained at main with no commits, so leader integrated the verified slice directly.
Confidence: high
Scope-risk: moderate
Directive: Keep task packet serde defaults when adding fields so older packets continue to deserialize.
Tested: git diff --check; cargo fmt --manifest-path rust/Cargo.toml --all -- --check; cargo check --manifest-path rust/Cargo.toml -p runtime -p tools -p rusty-claude-cli; cargo test --manifest-path rust/Cargo.toml -p runtime task_packet -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p runtime policy_engine -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p runtime task_registry -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p runtime session_heartbeat -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p tools run_task_packet_creates_packet_backed_task -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p tools lane_completion -- --nocapture; cargo test --manifest-path rust/Cargo.toml -p rusty-claude-cli status_json_surfaces -- --nocapture
Not-tested: full workspace test suite; PR/issue reconciliation deferred to G011/G012

Co-authored-by: OmX <omx@oh-my-codex.dev>
This commit is contained in:
bellman
2026-05-15 09:29:26 +09:00
parent 41b769fc5a
commit f7235ca932
9 changed files with 808 additions and 13 deletions

View File

@@ -63,6 +63,11 @@ pub(crate) fn detect_lane_completion(
diff_scope: runtime::DiffScope::Scoped,
completed: true,
reconciled: false,
retry_count: 0,
retry_limit: 1,
rebase_required: false,
stale_cleanup_required: false,
approval_token: None,
})
}
@@ -173,6 +178,11 @@ mod tests {
diff_scope: DiffScope::Scoped,
completed: true,
reconciled: false,
retry_count: 0,
retry_limit: 1,
rebase_required: false,
stale_cleanup_required: false,
approval_token: None,
};
let actions = evaluate_completed_lane(&context);