Repository navigation
3.x.x: give /metrics the freshness contract /healthz already has - #299
Merged
Merged
Conversation
Publish the complete metrics body and monotonic timestamp together. Apply the health freshness budget at scrape time and restore freshness headers for both mining and public API roles. Cover unavailable, fresh, stale and recovered publications, GET/HEAD, public probe failures, and wall-time independence with ungated tests. Refs #277
Co-Authored-By: OpenAI Codex <[email protected]>
djh58
force-pushed
the
djh58/prism-b5-metrics-freshness
branch
from
September 10, 2026 20:32
565f64d to
bfa7914
Compare
5 tasks done
Member
Author
|
Deep-review dispositions for the two Fable documentation findings:
The medium Codex, structural Astra and independent Astra adversarial lanes found no actionable issue. Fable found no runtime defect and passed six focused metrics tests. Codex's native review command at medium effort substitutes for the unavailable named built-in skill; Astra is used for its adversarial lane per Dan's model preference. Final CI is rerunning after the documentation correction; this is not a readiness report. |
8 of 10 tasks
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.
Restore freshness reporting for the native coordinator and public API
/metricsroutes. The coordinator publishes the complete payload and its monotonic timestamp together, exposes snapshot availability/age/staleness, and reports unhealthy when publication stalls. Both roles restore the freshness and cache headers used by 2.x.x. Operator documentation explains warm-up, stale snapshots, and failed public database probes.Closes #277. Target:
3.x.x.Validation:
cargo +1.89.0 test --locked -j 2 --workspace --all-targets— 403 reported passes; external integration prerequisites were absent in that run.cargo +1.89.0 test --locked -j 2 -p qbit-prism-server --all-targets -- --test-threads=4with disposable PostgreSQL 16, a pinned qbit v1.0.0 regtest node, and the physical replication test enabled — 153 passes, 0 failures. This includes 29 ledger tests, 8 live mining tests, and the synchronous primary-loss/reconnect test.The replication test kills a disposable local database process; this does not establish multi-host production availability or load capacity.
Documentation: the operator guide covers snapshot gauges, both roles’ freshness headers, and startup/stale behavior. The publisher ticks every 2 seconds. The freshness-budget input defaults to 2 seconds natively and 5 in Compose; both produce a 15-second stale threshold.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.