Repository navigation
feat(backups): the worker refreshes the backup catalog on its own (OD-73) - #75
Merged
Merged
Conversation
…-73) A new worker task backups.catalog_refresh plans and accepts backup.catalog.refresh as the system actor every 5 minutes for every cluster with a repository that is neither retired nor external, one open refresh per cluster (a per-cluster advisory lock and the open operation are checked first), like the worker's own suspension of a target. The kind stays low and read-only on the host, audited, and goes through the worker's dispatch re-check. One cluster's failure never stops the others. Supersedes the VC-038 decision that only a person or a client refreshes: REOSA production read protection "unknown" 30 minutes after every manual refresh and production approvals met BACKUP_REQUIRED until someone refreshed by hand. 5 minutes, not 10, keeps the catalog inside the policy hooks' 10-minute window. Red on origin/main 617fcd6: "the worker has no task backups.catalog_refresh" (apps/server/test/http-backups.int.test.ts). Developed by @davdxpx
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.
What
The worker refreshes the backup catalog mirror on its own (OD-73, decided by the owner on 2026-11-09).
backups.catalog_refresh, every 5 minutes.external, it plans and acceptsbackup.catalog.refreshas the system actor (system:worker).suspendForIdentityMismatch). The kind stayslowand read-only on the host, is audited, and goes through the worker's dispatch re-check like a person's refresh.backups.system_refresh_unreachableand retried on the next pass.backups.system_refresh_failed, never stops the other clusters, and marks the task run failed (review finding).Why
[OBSERVED] on REOSA production (
cls_01M5J4RDBP52B715X5HDFKDN5F), 2026-11-09:unknown30 minutes after every manual refresh.BACKUP_REQUIREDuntil someone refreshed by hand (P6 needs a catalog younger than 10 minutes).Why 5 minutes and not 10: a 10-minute cadence would leave the catalog just outside the policy hooks' 10-minute window for part of every cycle.
Docs
open-decisions.md: OD-73 (section and index row); the VC-038 row is marked superseded.09-backups-and-restore/architecture.md§3 and §5.adoption.mdstep 4.PRE-WAVE-11-REVIEW.md: the VC-038 row.Tests
apps/server/test/http-backups.int.test.ts, real PostgreSQL 17: a production cluster is refreshed by the system without an approval, a second pass while one is queued plans nothing, the mirror is read afterwards (protection no longerunknown), and a pass after it succeeded refreshes again.origin/main(617fcd61):the worker has no task backups.catalog_refresh.http-backups.int.test.ts: 16/16.packages/backups/test/auto-refresh.test.ts: a cluster whose transaction fails is reported and the next cluster is still checked.http-registry-tier,http-drift-accept,http-registry,http-migrations: 59/59.packages/backupsunit 42/42, integration 29/29.apps/serverunit 218/218.bun run check,typecheck(backups, server),boundaries,secretsgreen.bun run verifynot run (no CI by owner rule).Consequence
at_riskuntil a lock probe and the sub-key check exist.Developed by @davdxpx