mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-16 19:06:44 +00:00
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:
@@ -6177,6 +6177,13 @@ fn status_json_value(
|
||||
"cumulative_total": usage.cumulative.total_tokens(),
|
||||
"estimated_tokens": usage.estimated_tokens,
|
||||
},
|
||||
"lane_board": {
|
||||
"schema": "task_registry_v1",
|
||||
"status_json_supported": true,
|
||||
"heartbeat_freshness_supported": true,
|
||||
"states": ["active", "blocked", "finished"],
|
||||
"freshness_states": ["healthy", "stalled", "transport_dead", "unknown"],
|
||||
},
|
||||
"workspace": {
|
||||
"cwd": context.cwd,
|
||||
"project_root": context.project_root,
|
||||
@@ -11253,6 +11260,18 @@ mod tests {
|
||||
json.get("workspace").is_some(),
|
||||
"workspace field still reported"
|
||||
);
|
||||
assert_eq!(
|
||||
json.pointer("/lane_board/status_json_supported")
|
||||
.and_then(|v| v.as_bool()),
|
||||
Some(true),
|
||||
"status JSON should advertise lane board support: {json}"
|
||||
);
|
||||
assert_eq!(
|
||||
json.pointer("/lane_board/freshness_states/2")
|
||||
.and_then(|v| v.as_str()),
|
||||
Some("transport_dead"),
|
||||
"status JSON should advertise transport-dead freshness: {json}"
|
||||
);
|
||||
assert!(
|
||||
json.get("sandbox").is_some(),
|
||||
"sandbox field still reported"
|
||||
|
||||
Reference in New Issue
Block a user