Repository navigation
fix: plan acceptance meets a backup requirement through the backup catalog (P6) - #71
Merged
Merged
Conversation
…talog (P6) registryAcceptDependencies met only break_glass and reauth, so the backup requirement of migration.destructive-backup could never be met: a destructive production migration needed break-glass even with a fresh verified backup. Acceptance now asks the composition (backupMet) for the plan's cluster; the server reads the mirrored catalog: a succeeded, listed, verified backup in a live off-host repository reconciled within 10 minutes, finished within the rule's age. Everything it cannot establish fails closed. 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.
Summary
registryAcceptDependencies(packages/registry/src/apply.ts) could meet onlybreak_glassandreauthrequirements. Thebackuprequirement ofmigration.destructive-backupwas therefore never met. A destructive, data-rewriting or unclassified production migration needed break-glass even with a fresh verified backup. This was P6 of the REOSA production session (owner decision: prove it, then fix it in a separate small PR).backupMetonRegistryAcceptContext, for the plan's cluster (subject.clusterId). The registry still does not depend on the backup engine.backupRequirementMet→verifiedBackupWithinin@exponetdb/backups): a succeeded backup that the engine still lists, whose verification passed, in a live off-host repository that is not external and whose catalog was reconciled within 10 minutes (as09-backups-and-restore/architecture.md§5 says), finished within the rule's age (ISO 8601,PT24H) and not in the future.open-decisions.mdand a note under the gap matrix row ofmigration.destructive-backup.Order: independent of other open PRs. Live only after a redeploy on the owner's word (W10-D10).
Test plan
packages/backups/test/protection.test.ts: the duration parser and every met and unmet case ofverifiedBackupWithin(20 tests in the file).packages/registry/test/accept-backup.test.ts: acceptance asks the read for the plan's cluster and age, and is unmet for no, no cluster, not wired, or system.biome check .,verify:generated,boundaries.credential-db-owner(PostgreSQL 17) failed once in the full run and passes alone, both on this branch and onmain(3/3). It is load-sensitive and unrelated to acceptance.Developed by @davdxpx