{"record":{"id":"37b149bc66b8392a","repo":"zeroclaw-labs/zeroclaw","slug":"scheduler-component-not-tracked-yet","errorCode":null,"errorMessage":"scheduler component not tracked yet","messagePattern":"scheduler component not tracked yet","errorType":"console","errorClass":"DiagItem","httpStatus":null,"severity":"warning","filePath":"crates/zeroclaw-runtime/src/doctor/mod.rs","lineNumber":1671,"sourceCode":"                .and_then(serde_json::Value::as_str)\n                .and_then(parse_rfc3339)\n                .map_or(i64::MAX, |dt| {\n                    Utc::now().signed_duration_since(dt).num_seconds()\n                });\n\n            if scheduler_ok && scheduler_age <= SCHEDULER_STALE_SECONDS {\n                items.push(DiagItem::ok(\n                    cat,\n                    format!(\"scheduler healthy (last ok {scheduler_age}s ago)\"),\n                ));\n            } else {\n                items.push(DiagItem::error(\n                    cat,\n                    format!(\"scheduler unhealthy (ok={scheduler_ok}, age={scheduler_age}s)\"),\n                ));\n            }\n        } else {\n            items.push(DiagItem::warn(cat, \"scheduler component not tracked yet\"));\n        }\n\n        // Channels\n        let mut channel_count = 0u32;\n        let mut stale = 0u32;\n        for (name, component) in components {\n            if !name.starts_with(\"channel:\") {\n                continue;\n            }\n            channel_count += 1;\n            let status_ok = component\n                .get(\"status\")\n                .and_then(serde_json::Value::as_str)\n                .is_some_and(|s| s == \"ok\");\n            let age = component\n                .get(\"last_ok\")\n                .and_then(serde_json::Value::as_str)\n                .and_then(parse_rfc3339)","sourceCodeStart":1653,"sourceCodeEnd":1689,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/doctor/mod.rs#L1653-L1689","documentation":"A `zeroclaw doctor` warning from `check_daemon_state`: the daemon state file exists and parses, and its `components` object is present, but there is no `scheduler` key inside it. Doctor therefore cannot judge scheduler health and warns that the component is not tracked yet — typical of a daemon version that predates component tracking, or a daemon that has not yet published its first scheduler status.","triggerScenarios":"Running `zeroclaw doctor` while the daemon state JSON's `components` map has no `\"scheduler\"` entry — right after daemon start before the first heartbeat write, or with an older daemon binary that never writes it.","commonSituations":"Upgrading zeroclaw but the still-running daemon is an older build; diagnosing immediately after `systemctl --user start` before the first state flush; state file written by a different component set.","solutions":["Restart the daemon with the current zeroclaw build so it registers the scheduler component.","Wait one heartbeat interval after start, then re-run `zeroclaw doctor`.","If the warning persists, inspect the state file's `components` object to confirm which components the daemon actually writes."],"exampleFix":"# before: state file has components but no scheduler entry\n# doctor: scheduler component not tracked yet\n\n# after\nsystemctl --user restart zeroclaw\nsleep 10 && zeroclaw doctor","handlingStrategy":"validation","validationCode":"let state: serde_json::Value =\n    serde_json::from_str(&std::fs::read_to_string(&state_path)?)?;\nlet scheduler_tracked = state\n    .get(\"components\")\n    .and_then(|c| c.get(\"scheduler\"))\n    .is_some();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restart the daemon with the current build after upgrading zeroclaw so component tracking stays in sync.","Run doctor only after one heartbeat interval post-start to avoid transient 'not tracked yet' states."],"tags":["daemon","scheduler","health","doctor","zeroclaw"],"backgroundTag":"missing-health-check-data","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}