Validate legacy external_snapshots_immutable trigger for migrations 005–007 - #23
Open
Lucenx9 wants to merge 1 commit into
Open
Validate legacy external_snapshots_immutable trigger for migrations 005–007#23Lucenx9 wants to merge 1 commit into
Lucenx9 wants to merge 1 commit into
Conversation
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.
Motivation
external_snapshots_immutablestarting at migration 008, but the original trigger was created in migration 005 and expected through migration 007, allowing older schemas to pass validation without snapshot immutability.Description
external_snapshots_immutablethat applies fromminimumMigration: 5up throughmaximumMigration: 7and expectsreject_external_history_mutationand itsfunctionBodySha256insrc/onboarding/adapters/postgres/restore-validation.ts.maximumMigrationfield so requirements can be gated to specific migration ranges inassessRestoredDatabaseEvidence.reject_external_history_mutationtrigger is accepted and that an otherwise-identical inventory missing that trigger is rejected intests/unit/onboarding/restored-database-validation.test.ts.src/onboarding/adapters/postgres/restore-validation.tsandtests/unit/onboarding/restored-database-validation.test.ts.Testing
pnpm exec prettier --write src/onboarding/adapters/postgres/restore-validation.ts tests/unit/onboarding/restored-database-validation.test.tswhich completed successfully.pnpm exec vitest run --project unit tests/unit/onboarding/restored-database-validation.test.tsand all tests passed (23 passed).pnpm typecheckandpnpm lintwhich completed without errors.Codex Task