mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-07 16:44:50 +08:00
feat(mcp+lifecycle): MCP degraded-startup reporting, lane event schema, lane completion hardening
Add MCP structured degraded-startup classification (P2.10): - classify MCP failures as startup/handshake/config/partial - expose failed_servers + recovery_recommendations in tool output - add mcp_degraded output field with server_name, failure_mode, recoverable Canonical lane event schema (P2.7): - add LaneEventName variants for all lifecycle states - wire LaneEvent::new with full 3-arg signature (event, status, emitted_at) - emit typed events for Started, Blocked, Failed, Finished Fix let mut executor for search test binary Fix lane_completion unused import warnings Note: mcp_stdio::manager_discovery_report test has pre-existing failure on clean main, unrelated to this commit.
This commit is contained in:
@@ -30,7 +30,9 @@ pub(crate) fn detect_lane_completion(
|
||||
}
|
||||
|
||||
// Must have finished status
|
||||
if output.status != "Finished" {
|
||||
if !output.status.eq_ignore_ascii_case("completed")
|
||||
&& !output.status.eq_ignore_ascii_case("finished")
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
@@ -91,8 +93,7 @@ pub(crate) fn evaluate_completed_lane(
|
||||
mod tests {
|
||||
use super::*;
|
||||
use runtime::{DiffScope, LaneBlocker};
|
||||
use crate::LaneEvent;
|
||||
|
||||
|
||||
fn test_output() -> AgentOutput {
|
||||
AgentOutput {
|
||||
agent_id: "test-lane-1".to_string(),
|
||||
@@ -176,4 +177,4 @@ mod tests {
|
||||
assert!(actions.contains(&PolicyAction::CloseoutLane));
|
||||
assert!(actions.contains(&PolicyAction::CleanupSession));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user