Fix installer recovery for known legacy migration drift - #322
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 35664395 | Triggered | Generic Password | 73e5041 | web/scripts/ci/prove-installer-legacy-migration-repair.sh | View secret |
| 35664395 | Triggered | Generic Password | 73e5041 | web/scripts/ci/prove-installer-legacy-migration-repair.sh | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 73e50411ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Summary
Repairs the one known local Epic 172 migration drift: databases recorded the legacy 0023 and 0025 hashes, leaving the pre-S4 catalog without the current release routines and constraints.
Fail-closed design
The managed-native installer runs a fixed, SHA-anchored forward repair after migration 0026 and before the S4 owner bootstrap. It only proceeds when the immutable ledger has the exact known legacy hash pair and the complete legacy catalog, role, ACL, data-state, index, and trigger fingerprints match. Unknown hashes or any near-miss catalog state refuse before mutation. The repair never edits historical migrations or writes the Drizzle migration ledger. Custom and Docker service paths remain outside this recovery path.
Validation
npx tsc --noEmitgit diff --checkbash scripts/test-install-managed-migrations.shHosted disposable PostgreSQL proof is pending CI.
Follow-up outside this PR
A native migration login named
forgecan collide with PostgreSQL's default$user, publicsearch path after the protectedforgeschema exists. That fresh-install runner issue was identified during diagnosis and is intentionally not changed in this narrowly scoped recovery PR.