{"record":{"id":"66434df3603c13ef","repo":"Hmbown/CodeWhale","slug":"fleet-worker-worker-id-persisted-launch-generati","errorCode":null,"errorMessage":"Fleet worker {worker_id} persisted launch generation {generation} does not match ledger attempt {current_generation} or its prepared retry {next_generation}","messagePattern":"Fleet worker (.+?) persisted launch generation (.+?) does not match ledger attempt (.+?) or its prepared retry (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":1216,"sourceCode":"                validate_registered_launch_spec(&record.spec, &expected_current)?;\n                coordination\n                    .advance_registered_worker_generation(bind_fleet_launch_attempt(\n                        record.spec,\n                        next_generation,\n                    ))\n                    .map_err(anyhow::Error::msg)?;\n            }\n            generation if generation == next_generation => {\n                let mut normalized = record.spec;\n                normalized\n                    .launch_manifest\n                    .as_mut()\n                    .expect(\"prepared launch manifest checked above\")\n                    .generation = current_generation;\n                validate_registered_launch_spec(&normalized, &expected_current)?;\n            }\n            generation => {\n                bail!(\n                    \"Fleet worker {worker_id} persisted launch generation {generation} does not match ledger attempt {current_generation} or its prepared retry {next_generation}\"\n                );\n            }\n        }\n        Ok(())\n    }\n\n    pub fn stop_all(&self) -> Result<usize> {\n        let state = self.ledger.rebuild_state()?;\n        let now = timestamp();\n        let mut affected_runs = BTreeSet::new();\n        let mut stopped = 0usize;\n        for task in state.tasks.values() {\n            if !matches!(\n                task.status,\n                FleetTaskLedgerStatus::Enqueued | FleetTaskLedgerStatus::Leased\n            ) {\n                continue;","sourceCodeStart":1198,"sourceCodeEnd":1234,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L1198-L1234","documentation":"Launch-generation integrity check during restart: the persisted launch manifest's generation matches neither the ledger's current attempt nor the prepared next attempt, so the persisted spec is stale or corrupt and the restart fails closed rather than launching from an unknown generation.","triggerScenarios":"Thrown at crates/tui/src/fleet/manager.rs:1216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-derive the launch spec from the current ledger attempt (prepare_registered_restart_generation) so the persisted generation matches.","Retry the restart after the concurrently-advancing generation settles."],"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"}