Public: anyone can read this; the crew can change it.

Sentinel: backup was degraded 43 minutes today: Primary (s3.us-east-005.backblazeb2.com/openplatform-dr-backups) cannot be read: names snapshots/ failed after 5 attemp… #17858

opened this

Merged 28h 56m ago, live in production

When the bucket stops answering, the backup no longer turns red right away. Each lane keeps its last whole read for up to an hour and is marked amber, with the reason shown. On 2026-12-03 Backblaze's store answered every listing with an error for about 40 minutes.

Notes

opened this

When the bucket stops answering, the backup no longer turns red right away. Each lane keeps its last whole read for up to an hour and is marked amber, with the reason shown. On 2026-12-03 Backblaze's store answered every listing with an error for about 40 minutes. Each 5-minute read failed after five tries, and since a single failed read made the lane red, the forge counted as degraded for 43 minutes while last night's snapshot sat fresh in the bucket. A failed listing tells us nothing about what the bucket holds.

What changed (src/snapshot/bucket.ts):

  • Holding the last read: when a read fails on a lane whose last kept read was whole, keepReads keeps that read and marks it unanswered: when the store stopped answering and the newest error. The reads written to backup-checks.jsonl stay the real ones, failures included.
  • Judging a held lane: judge still checks the held snapshot's age against now, so a snapshot that goes past 26 h while held still turns red. The lane's line adds "not answering for N min (reason); its last whole read, <time>, stands for up to 1 h". The same sentence goes into unknowns, so the verdict is amber, not green. The Backups page, the Resilience screen in the terminal and the MCP backups tool all print it as is.
  • Past the hour (UNANSWERED_HOLD_MS = 60 min): the lane is unreadable and red as before, saying how long it has gone unanswered.
  • A lane never read whole (for example, the first read after a boot during an outage) is still red at its first failure.

The store's own outage is not something the forge can prevent. This gets the issue's target ("holds under 10 minutes") for outages under an hour, while a real loss of the bucket still raises the alarm within an hour. As a side effect, the sentinel's evidence block gets the snapshot size during a hold, where this issue's block printed n/a.

What I chose not to do:

  • Lengthen the retry window inside withRetries: an outage of 40 minutes outlasts any sensible retry.
  • Change the dead man's switch: a check that stops running is still red after 20 minutes.

Tests: test/backup-unanswered.test.ts covers:

  • amber within the hour
  • red past it
  • red at first failure with no whole read
  • a held snapshot still going late
  • a whole read clearing the hold

It fails without the change. The 11 backup suites pass (139 tests), as do the unused-exports, dup-imports and test-honesty rules. bun x tsc --noEmit and the gate are clean. The gate notes one comment line over 100 columns in bucket.ts, which it says the nightly rewrap fixes.

The forge's issue API answered with Cloudflare error 1033 during this run, so I could not check earlier sentinel issues about the backup, and I did not keep a plan on the issue.

To try it: bun test test/backup-unanswered.test.ts

🤖 Generated with Claude Code

Closes #17852

commented

When the bucket stops answering, the backup no longer turns red right away. Each lane keeps its last whole read for up to an hour and is marked amber, with the reason shown. On 2026-12-03 Backblaze's store answered every listing with an error for about 40 minutes. Each 5-minute read failed after five tries, and since a single failed read made the lane red, the forge counted as degraded for 43 minutes while last night's snapshot sat fresh in the bucket. A failed listing tells us nothing about what the bucket holds.

What changed (src/snapshot/bucket.ts):

  • Holding the last read: when a read fails on a lane whose last kept read was whole, keepReads keeps that read and marks it unanswered: when the store stopped answering and the newest error. The reads written to backup-checks.jsonl stay the real ones, failures included.
  • Judging a held lane: judge still checks the held snapshot's age against now, so a snapshot that goes past 26 h while held still turns red. The lane's line adds "not answering for N min (reason); its last whole read, <time>, stands for up to 1 h". The same sentence goes into unknowns, so the verdict is amber, not green. The Backups page, the Resilience screen in the terminal and the MCP backups tool all print it as is.
  • Past the hour (UNANSWERED_HOLD_MS = 60 min): the lane is unreadable and red as before, saying how long it has gone unanswered.
  • A lane never read whole (for example, the first read after a boot during an outage) is still red at its first failure.

The store's own outage is not something the forge can prevent. This gets the issue's target ("holds under 10 minutes") for outages under an hour, while a real loss of the bucket still raises the alarm within an hour. As a side effect, the sentinel's evidence block gets the snapshot size during a hold, where this issue's block printed n/a.

What I chose not to do:

  • Lengthen the retry window inside withRetries: an outage of 40 minutes outlasts any sensible retry.
  • Change the dead man's switch: a check that stops running is still red after 20 minutes.

Tests: test/backup-unanswered.test.ts covers:

  • amber within the hour
  • red past it
  • red at first failure with no whole read
  • a held snapshot still going late
  • a whole read clearing the hold

It fails without the change. The 11 backup suites pass (139 tests), as do the unused-exports, dup-imports and test-honesty rules. bun x tsc --noEmit and the gate are clean. The gate notes one comment line over 100 columns in bucket.ts, which it says the nightly rewrap fixes.

The forge's issue API answered with Cloudflare error 1033 during this run, so I could not check earlier sentinel issues about the backup, and I did not keep a plan on the issue.

To try it: bun test test/backup-unanswered.test.ts

🤖 Generated with Claude Code

commented

When a backup bucket that read fine stops answering, the lane now keeps its last whole read for up to an hour and shows amber, not red. Before this, a single failed 5-minute read turned it red right away. On 2026-12-03 Backblaze answered every listing with an error for about 40 minutes, and the forge counted itself degraded for 43 minutes while last night's snapshot sat fresh in the bucket.

What changed in src/snapshot/bucket.ts:

  • Holding the last read: when a read fails on a lane whose last kept read was whole, keepReads keeps that read and marks it unanswered. The mark records when the store stopped answering and the newest error. backup-checks.jsonl still records each failed read as it happened.
  • Judging a held lane: judge still checks the held snapshot's age against now, so one that passes 26 h during the hold is red. The lane's line and the unknowns both say "not answering for N min (reason); its last whole read, <time>, stands for up to 1 h". The verdict is amber, never green, and raises no backup card. The Backups page, the terminal's Resilience dialog and the MCP backups tool all print the lane's line as it is.
  • Past the hour (UNANSWERED_HOLD_MS, 60 min): the lane is unreadable and red as before. The reason now ends "(not answering for 1 h)".
  • A lane never read whole is still red at its first failure.
  • Unchanged: the dead man's switch (a check that stops running is red after 20 minutes) and the retries inside withRetries.

How-to: docs/features/backup-truth.md now gives the new red conditions. A new paragraph describes the hold, quotes the amber line, and lists where each door shows it.

The comment-width note: bun scripts/gate.ts --fix changes nothing on this branch, because no comment line this pull wrote goes past 100 columns. The flagged lines are older and already on main (110, 127, 145 and 240 in bucket.ts, outside this diff). The comment at line 37 is this pull's and is within the limit. Rewrapping those older lines would trip the gate's "rewrap noise" rule, which refuses a pull outright, whereas the width is only a note, so I left them for the nightly rewrap.

Tests: test/backup-unanswered.test.ts covers five cases, and it fails without the change:

  • amber within the hour
  • red past it
  • red at first failure for a lane never read whole
  • a held snapshot that still goes late
  • a whole read clearing the hold

Before the first push, the 11 backup suites and the unused-exports, dup-imports and test-honesty rules passed, and bun x tsc --noEmit was clean. After the how-to change I re-ran the new test file and test/feature-doors.test.ts; both pass, and the gate reports only the width note.

To try it: bun test test/backup-unanswered.test.ts

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs