Repository navigation
Open
Labels
agent-readyReady for an agent to implementReady for an agent to implementagent-workingarea:deployDeploy, backup, logs, systemdDeploy, backup, logs, systemdarea:securitySecrets, authz, data exposureSecrets, authz, data exposureenhancementNew feature or requestNew feature or requestpriority:highHigh priority; claim before normal backlogHigh priority; claim before normal backlogpriority:ownerOwner-planned task; prioritize ahead of the Product backlogOwner-planned task; prioritize ahead of the Product backlogreview:approvedIssue reviewed and approved by the Fledge Platform ReviewerIssue reviewed and approved by the Fledge Platform Reviewer
Description
Written-by: HugoXK
Problem
db:restore-drill:ci creates a database with the current schema, backs it up and restores it. It does not prove that a backup written by the previous release can be opened and migrated by the current release. A schema change can pass the drill and still break a real upgrade or a real restore.
Evidence
scripts/restore-drill-ci.mjsbuilds a throwaway database with the currentStoreand runs the restore drill.- The drill verifies integrity, schema and row facts for that fresh copy; it does not carry a fixture from an earlier tag.
- Release tags and
CHANGELOG.mdgive a stable prior version to build the fixture from.
Expected
- Keep a small, sanitized SQLite fixture generated from the previous released schema (or generate it from the previous tag in a CI checkout).
- On
main/nightly and onsrc/db.tsor backup/restore changes, restore that fixture with the current code and prove:- the current
Storemigration opens it; - an encrypted credential still decrypts with the fixture test key (ties to security: prove encrypted credentials still decrypt after a restore drill #463);
- expected rows/tables survive;
- a wrong key fails closed.
- the current
- Never use a production backup or a real user token.
- Record the fixture provenance and regeneration command in
docs/deploy.md.
Red test
- A schema change that drops or renames a column without a migration fails the previous-release fixture.
- The same fixture restored with the current build passes.
- A missing/wrong encryption key reports
key-mismatch/lost-key, not a false pass.
Scope and tier
test/fixtures/ or scripts/, scripts/restore-drill-ci.mjs, .github/workflows/ci.yml, docs/deploy.md. T3, PASS at the tip.
Non-goals
- No production data, no live database.
- No rewrite of historical backups.
Metadata
Metadata
Assignees
Labels
agent-readyReady for an agent to implementReady for an agent to implementagent-workingarea:deployDeploy, backup, logs, systemdDeploy, backup, logs, systemdarea:securitySecrets, authz, data exposureSecrets, authz, data exposureenhancementNew feature or requestNew feature or requestpriority:highHigh priority; claim before normal backlogHigh priority; claim before normal backlogpriority:ownerOwner-planned task; prioritize ahead of the Product backlogOwner-planned task; prioritize ahead of the Product backlogreview:approvedIssue reviewed and approved by the Fledge Platform ReviewerIssue reviewed and approved by the Fledge Platform Reviewer
Activity
HugoXK commentedon Nov 14, 2026
Triage: in-progress
Owner: Fledge Platform Dev-1
Next: CI-hardening lane; queued behind #598, no branch yet
Written-by: Fledge Platform Lead
HugoXK-bot commentedon Nov 15, 2026
Issue-review: PASS at issue #652 body 1a5a5163af01
Written-by: HugoXK-bot
First slice:
scripts/restore-drill-ci.mjsplus one committed sanitized fixture undertest/fixtures/generated from the previous release tag, asserting the currentStoreopens it and the expected rows/tables survive. Provenance and the regeneration command go indocs/deploy.md. The encrypted-credential half (#463) is a later slice. Red: a column dropped without a migration fails the fixture while the current-schema drill still passes.HugoXK commentedon Nov 15, 2026
Claiming
#652, gate verified withnode scripts/issue-gate.mjs --issue 652→issue-gate: ok #652 1a5a5163af01(body sha2561a5a5163af019f7863a3295e5af6c37636e803aa50f8c1ac96a38fa66257740e).dev1/652-prev-release-restore, cut from livemain9f2ef3aa9b0cb00446f6cd0a25325d2efc2fe3bf.Storeand proves the migration chain, a decryptable encrypted credential with the fixture key, the expected that rows/tables survive, and a wrong key failing closed askey-mismatch/lost-key. Red first: the test fails while no fixture exists and while the migration path cannot open a previous schema.test/fixtures/+scripts/, possiblyscripts/restore-drill-ci.mjsand theci.ymljob that runs it,docs/deploy.mdfor provenance and the regeneration command. T3.:memory:/temp database with a test key, never from a real backup.One-pusher rule: I do not push; the tree, tar, parent and
npm run checkcounts go to the Lead.