fix(overseer): decouple meta-thread health from isolated act() errors (#4080) - #4214
Merged
rysweet merged 1 commit intoJul 16, 2026
Conversation
…#4080) The daemon derived the overseer meta-thread's `last_success` from `!panicked && report.errors == 0`, so a single transient per-intervention `act()` failure — documented as "isolated, never fatal" — pinned the meta-thread in "erroring", and a later healthy tick never cleared it. Add an additive `cycle_failed: bool` to `OverseerTickReport` that is set ONLY when the tick's OODA cycle itself fails (`run_cycle()` returns Err or the tick panics). Health is now derived from `!panicked && !cycle_failed`, so isolated act() errors are still counted in `errors` for feed visibility but no longer drive health. Because health is recomputed fresh each tick, the first clean tick flips the row from "erroring" back to "ok". - additive, `#[serde(default)]` — legacy feed records default to false, no SCHEMA_VERSION bump - structured tracing + daemon log now emit `cycle_failed` - regression tests cover erroring→ok recovery, run_cycle Err, panic, and legacy deserialization Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Coverage Summary
Coverage data from CI run. Test files matching |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem (#4080)
The primary overseer meta-thread reported
erroringat its last tick even though it was still intervening normally. Root cause: the daemon derived the meta-thread'slast_successfrom!report.panicked && report.errors == 0, so a single transient per-interventionact()failure — explicitly documented as "isolated, never fatal" — pinned the thread in"erroring", and a later healthy tick never cleared it.Fix (additive / non-breaking)
cycle_failed: booltoOverseerTickReport, set only when the tick's OODA cycle itself fails (run_cycle()returnsErr, or the tick panics — which also setspanicked).!panicked && !cycle_failed. Isolatedact()errors are still counted inerrors(feed/totals visibility) but no longer drive health.erroring → okautomatically — no latched-flag reset needed.#[serde(default)]covers the new field: legacy feed records deserialize withcycle_failed = false; noSCHEMA_VERSIONbump.cycle_failedadded to structured tracing + the daemon log line for observability.Tests
Regression coverage in
src/overseer/wiring.rsandsrc/overseer/activity.rs:act()error →cycle_failed = false→ meta-thread staysok(the erroring→ok recovery path)run_cycle()Err →cycle_failed = true→erroringpanicked+cycle_failed→erroringfalseVerification
cargo test --lib overseer— 489 passedcargo fmt --check,cargo clippy --release -D warnings— passcargo clippy --all-targets --all-features -D warnings— passAdditive / non-breaking; PRD preserved; no Bridge naming; structured tracing + OpenTelemetry only, no stray
print!/println!.Closes #4080
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com