Repository navigation
Report degraded stats writes and invalid health readings - #96
Merged
Merged
Conversation
This was referenced Nov 15, 2026
mzupan
force-pushed
the
codex/stats-persistence-health
branch
from
November 15, 2026 22:45
42fbdc7 to
7e5e6e8
Compare
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.
Stacked after #95. Merge in order #94, #95, #96, #97, #98, #99. This diff contains only this finding relative to its base.
Failed stats reads were converted into zero values, and failed stats/snapshot inserts still produced a successful stats-engine cycle. Keep unavailable readings out of emitted values, retain existing valid health gauges, expose per-probe validity and last successful observation, and return a degraded cycle when a required read or persistence step fails.
Add self-metric write outcomes, latency and last-success timestamps by fixed stage/table. Both gauge and counter snapshot inserts are attempted even if one fails, keeping the scrape registry useful during ClickHouse trouble.
Validation: nine stats-engine tests passed, including failed-probe stale-value retention and partial snapshot persistence. cargo fmt --check, git diff --check and cargo clippy --all-targets passed. Existing repository warnings prevent strict -D warnings. No tenant, query-text or error-string labels are added.