Repository navigation
3.x.x: page when a frontend holds block submission, not only once it holds a found block (#666) - #676
Conversation
… found block (#666) #661's kill switch (PRISM_BLOCK_SUBMIT_ENABLED) holds every block a frontend finds. A production frontend left that way paged only once a found block was held, through the pending-candidate rules 15 s later, which may be too late for the block. PrismBlockSubmissionHeld pages (critical, page=true) a minute after a frontend reports qbit_prism_block_submission_enabled != 1, whether or not it has found anything: 0 while the switch holds submission, and -1 for a frontend that has not published its setting. The gauge is fixed at process start and served from the cached metrics snapshot, so the rule is gated on a successful scrape (up == 1), not on a fresh snapshot, and a held frontend keeps paging through a stale one; no data and evaluation errors are OK, as for the other paging rules, and an image older than #661 exports no series. Eight promtool scenarios cover the page, the pending dwell, a submitting frontend, the unpublished setting, a failed scrape, a missing series, one held frontend of a pair, and a stale snapshot. The deployment test now expects 79 rules and checks the rule's dwell, gauge and gate; the migration table and the review-only qbit-tools patch are regenerated. The rehearsal runbook says to scrape a rehearsal's frontends under another job or network or to silence the rule, and the configuration reference and go-live checks name it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7efdc3c945
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…at a held frontend loses (#666) Review follow-ups: - The rule reads the gauge's last sample in the past two minutes (last_over_time) and requires a successful scrape in that window (max_over_time(up) == 1). A failed scrape writes staleness markers, so the instant form dropped the series and restarted the one-minute dwell: a held frontend whose scrapes failed about once a minute never paged. A scenario with a failed scrape every 50 seconds pages under the new expression and not under the old. - Two scenarios bracket the dwell (held for 70 seconds has paged, for 50 seconds is still pending) instead of evaluating long after it. - The description no longer says a held frontend's blocks are never offered: they wait in the shared outbox, where a peer that still submits offers them. The candidate rules page about four minutes after a held block (60 s, then a three-minute dwell), not 15 s. - The runbook scopes a rehearsal silence to the rehearsal frontends' instance labels, never the alert name alone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ks, not ahead of them (#666) Codex's review: within its own one-minute dwell the rule cannot promise to page before a held frontend finds a block, so its description and the rehearsal runbook say it pages independently of found blocks instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #666. Part of #291.
Problem
#661's kill switch,
PRISM_BLOCK_SUBMIT_ENABLED=0, holds every block a frontend finds. A production frontend left that way paged only once a found block had been held for a while:PrismBlockCandidateOldestPendingCriticalneeds an age of 60 s and then a 3-minute dwell, about 4 minutes in all. That may be too late for the block. A held frontend's blocks wait in the shared outbox, where a peer that still submits offers them; when every frontend is held, none is offered.Change
This adds the paging rule
PrismBlockSubmissionHeld.critical, labelledpage="true"OK-1, a setting not yet published, since nothing then shows the frontend submits.PrismMetricsEndpointDownandPrismMetricsNoData, and an image older than 3.x.x: add a block submission and broadcast kill switch for rehearsals against a real node (#291) #661 exports no series.docs/prism-native-alert-rules.json, after the block-candidate rules. The generated migration table row and the review-only qbit-tools patch are regenerated from the pinned snapshot.docs/prism-ledger-ops.md) says to scrape a rehearsal's frontends under another job or network, or to silence this rule and the pending-candidate rules for the rehearsal. Any such silence must match the rehearsal frontends'instancelabels, never the alert name alone.docs/prism-configuration.mdand the go-live checks indocs/mainnet-deployment.mdname the rule.Tests
tests/fixtures/prism-alert-scenarios.json:-1pages;scripts/test_prism_alert_deployment.pynow expects 79 rules, includes the rule in the paging set, and checks its1mdwell, itslast_over_timegauge, its!= bool 1, itsmax_over_time(up)gate, and that it is not gated on the snapshot.Run locally:
scripts/test_prism_alert_promql.py, with promtool 3.14.0 from the pinned release: 45 expressions, 188 scenarios, 387 expression and 282 alert assertions passed.scripts/test_prism_alert_deployment.py --snapshot <qbit-tools templates>: patch applies cleanly; 10 Jinja gate combinations; 78 original and 79 proposed rules.scripts/generate_prism_alerts.py --check --snapshot …: generated artifacts are current.cargo test -p qbit-prism-server --test observability: 17 passed.Notes
🤖 Generated with Claude Code