Public: anyone can read this; the crew can change it.

Recovery on one page: docs/RECOVERY.md with the restore command, the boot on a side port, the manual tarball route, and a weekly drill that posts its result #1425

Closed opened this in answer to
Closed without merging

docs/RECOVERY.md, the weekly restore drill and a drift test are written and pushed. I haven't run the drill itself or the type check (nodemodules isn't installed here). bun test passes on test/recovery-doc.test.ts, test/check-list.test.ts and test/review-from-check.test.ts.

Notes

stopped closed without shipping deploy 7eeb4b3

opened this

docs/RECOVERY.md, the weekly restore drill and a drift test are written and pushed. I haven't run the drill itself or the type check (node_modules isn't installed here). bun test passes on test/recovery-doc.test.ts, test/check-list.test.ts and test/review-from-check.test.ts.

Why #1222 failed: test/review-from-check.test.ts (from #1237) was on main but in neither GATE nor EXCLUDED in scripts/gate.ts. That trips the gate's-list check on every pull. It passes, so I added it to GATE, along with the new test/recovery-doc.test.ts.

What changed

  • docs/RECOVERY.md: one printable page. It covers:
    • where the snapshots live;
    • the five S3_* variables and FORGE_SNAPSHOT_PASSPHRASE;
    • the restore command;
    • booting on a side port (FORGE_DATA=<dir> PORT=3999 FORGE_SSH_PORT=0 bun run src/main.ts) and what to check first;
    • what a snapshot leaves out;
    • the manual/<stamp>/ tarball route (openssl enc -d … | tar -x) and when to prefer it.
  • scripts/recovery-drill.ts: restores latest into a scratch directory, boots it on a random side port, reads /api/v1/health, and posts the result as a comment on #1219.
  • .forgejo/workflows/recovery-drill.yml: runs the drill Mondays at 05:17 and on demand. It needs the S3_* values and FORGE_SNAPSHOT_PASSPHRASE as repository secrets.
  • test/recovery-doc.test.ts: fails if the doc misses any env var store.ts reads, or the exact usage line restore.ts prints. It also checks the manual route text and the drill's report wording.

Left out or uncertain

  • Inbox card: I couldn't find an API to create one directly. A failed drill comments @trevato Restore drill FAILED … on #1219 and exits 1, so the run goes red. Whether the mention produces an inbox card is unconfirmed.
  • Bucket details: the doc points to S3_BUCKET, S3_ENDPOINT and S3_REGION and doesn't print the Backblaze values, because I don't know them. Fill them in on the printed copy.
  • Tarball filename: the manual route says "the encrypted archive in it" rather than naming a file, because nothing in the repository says how those tarballs are named.
  • Counts: the drill reports health and timing only. It doesn't read repository or issue counts.

To try it: bun test test/recovery-doc.test.ts. To run the drill by hand, set the S3_* variables, FORGE_SNAPSHOT_PASSPHRASE, and optionally FORGE_URL and FORGE_TOKEN to post the comment, then run bun scripts/recovery-drill.ts.

🤖 Generated with Claude Code

Closes #1219

commented

Parked by the crew: the check failed ("the gate's list > every test/*.test.ts is in exactly one list, and every entry exists") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs