feat(backup): escalate after multiple missed backup nights - #823
Conversation
Co-Authored-By: brainlayerCodex-4c4386f6 running gpt-5.6-sol <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 32 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review Please focus on the boundary between Phase 1's single stale-attempt issue and the configurable multi-night absence escalation, especially that uploaded bundles later pruned by retention are not classified as absent attempts. — brainlayerCodex-4c4386f6 (worker) · codex/gpt-5.6-sol |
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. |
|
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". |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a4be29f4-d94f-4c8e-bee6-b6c14968e0b1) |
BrainLayer ratchetEvery Value below was measured by this run. A row this machine cannot measure says
🟢 GREEN measured, within budget · 🔴 RED measured, out of budget — a finding to clear before merge · ⚪ n/a not measurable on this machine, never guessed. No RED rows. Measured on Linux/x86_64 · measured |
Summary
stalestate and add a distinct critical multi-night issueCorrected incident boundary
This watches absence of a durable attempt receipt. It does not misclassify the 22 July bundles that uploaded and verified successfully before retention later removed both local staging and the Drive objects. Only 2026-06-14 was a genuine no-bundle day.
Verification
Size: S
Stacked on draft PR #820. Do not merge before its base.
— brainlayerCodex-4c4386f6 (worker) · codex/gpt-5.6-sol
Note
Add critical escalation for multiple missed backup nights in
inspect_jsonl_backup_healthBRAINLAYER_JSONL_BACKUP_ABSENCE_ALERT_NIGHTS, clamped to a minimum of 2 nightsinspect_jsonl_backup_healthnow counts complete 24-hour windows since the latest valid receipt and returns a criticaljsonl_backup_attempt_absent_multiple_nightsissue when the count reaches the threshold; this check runs before the existing stale checkconsecutive_nights_without_attempttoJsonlBackupHealthand threads the configured threshold throughrun_health_checkjsonl_backup_attempt_staleclassification; existing stale tests set the threshold to 3 to preserve their intentMacroscope summarized f66b88a.
Note
Medium Risk
Changes backup alerting semantics for aged receipts (new critical issue code and ordering before the stale check), which can affect on-call routing though it does not alter backup execution itself.
Overview
Adds multi-night escalation for JSONL backup health when the latest durable attempt receipt is old enough to span two or more full 24-hour windows (default threshold 2 nights, overridable via
BRAINLAYER_JSONL_BACKUP_ABSENCE_ALERT_NIGHTS, clamped to at least 2).inspect_jsonl_backup_healthnow exposesconsecutive_nights_without_attemptonJsonlBackupHealthand, before the existing 36-hour stale rule, raises a separate critical issuejsonl_backup_attempt_absent_multiple_nights. Operations docs describe the new check and env knob, and stress that this targets missing attempt receipts, not bundles removed later by retention.Tests cover escalation, config clamping, and keep the prior stale-path test by raising the absence threshold to 3 nights.
Reviewed by Cursor Bugbot for commit f66b88a. Bugbot is set up for automated code reviews on this repo. Configure here.