{"record":{"id":"a7cb56997cae5df6","repo":"Hmbown/CodeWhale","slug":"fleet-worker-persisted-launch-spec-does-not-mat","errorCode":null,"errorMessage":"Fleet worker {} persisted launch spec does not match the exact task lease and attempt","messagePattern":"Fleet worker (.+?) persisted launch spec does not match the exact task lease and attempt","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":2457,"sourceCode":"            registered.worker_id\n        );\n    }\n\n    // Coordination may append a bounded decision projection to the prompt.\n    // Every identity, route, permission, workspace, scope, and attempt field\n    // must otherwise match a fresh derivation from this exact leased task.\n    let mut registered_identity = registered.clone();\n    let mut expected_identity = expected.clone();\n    registered_identity.objective.clear();\n    expected_identity.objective.clear();\n    if let Some(manifest) = registered_identity.launch_manifest.as_mut() {\n        manifest.prompt.clear();\n    }\n    if let Some(manifest) = expected_identity.launch_manifest.as_mut() {\n        manifest.prompt.clear();\n    }\n    if registered_identity != expected_identity {\n        bail!(\n            \"Fleet worker {} persisted launch spec does not match the exact task lease and attempt\",\n            registered.worker_id\n        );\n    }\n    Ok(())\n}\n\nfn registered_prompt_matches_expected(registered: &str, expected: &str) -> bool {\n    const HEADER: &str = \"Accepted coordination decisions relevant to this child (bounded):\\n\";\n    if registered == expected {\n        return true;\n    }\n    let Some(projection) = registered\n        .strip_prefix(expected)\n        .and_then(|suffix| suffix.strip_prefix(\"\\n\\n\"))\n    else {\n        return false;\n    };","sourceCodeStart":2439,"sourceCodeEnd":2475,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L2439-L2475","documentation":"Final identity comparison in validate_registered_launch_spec: after clearing the free-form objective/prompt projection, any mismatch in identity, route, permission, workspace, scope, or attempt fields means the persisted spec does not match the exact task lease and attempt, so the launch is refused.","triggerScenarios":"Thrown at crates/tui/src/fleet/manager.rs:2457 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the restart so the spec is re-derived from the exact current lease and attempt.","Avoid concurrent generation advances while a restart is being prepared."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}