{"record":{"id":"570b63c39757bba8","repo":"Hmbown/CodeWhale","slug":"fleet-worker-worker-id-exhausted-launch-generati","errorCode":null,"errorMessage":"Fleet worker {worker_id} exhausted launch generations","messagePattern":"Fleet worker (.+?) exhausted launch generations","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":1188,"sourceCode":"                    task_spec,\n                    &worker_spec,\n                    self.run_model(),\n                    &cwd,\n                    &self.workspace,\n                    roster.members(),\n                    None,\n                )?,\n                &self.exec_config,\n            ),\n            task.entry.attempts,\n        );\n        let record = coordination\n            .get_worker_record(worker_id)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} has no registered launch spec\"))?;\n        let current_generation = task.entry.attempts.max(1);\n        let next_generation = current_generation\n            .checked_add(1)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} exhausted launch generations\"))?;\n        let registered_generation = record\n            .spec\n            .launch_manifest\n            .as_ref()\n            .map(|manifest| manifest.generation)\n            .ok_or_else(|| anyhow!(\"Fleet worker {worker_id} has no persisted launch manifest\"))?;\n\n        match registered_generation {\n            generation if generation == current_generation => {\n                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 => {","sourceCodeStart":1170,"sourceCodeEnd":1206,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L1170-L1206","documentation":"Launch generations are bounded by the integer attempt counter; computing the next generation uses checked_add and fails with this error when attempts is at the numeric maximum (u64::MAX/usize::MAX). Restarting would overflow the generation counter, so the manager refuses rather than wrap and break the one-generation-ahead prepare/consume invariant.","triggerScenarios":"Only reachable when task.entry.attempts equals the maximum value of its integer type — practically only via corrupt/hand-edited ledger events or an unbounded retry loop that actually saturated attempts.","commonSituations":"Corrupted ledger attempt counters; a buggy retry driver incrementing attempts without bound in tests or synthetic ledgers.","solutions":["Cancel the task and enqueue a fresh one with attempts reset to 0","Repair the ledger's attempt counter for this task entry","Investigate what drove attempts to the maximum — an infinite retry loop must be bounded","Treat this as data corruption: rebuild the ledger state from authoritative events"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn attempts_sane(attempts: u64) -> bool { attempts < u64::MAX }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Bound retry attempts well below the integer maximum in scheduler policy","Treat a saturated attempt counter as ledger corruption and rebuild","Never hand-edit ledger attempt fields"],"tags":["fleet","overflow","generation-counter"],"backgroundTag":"value-out-of-range","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"}