Splits #2611: the restore drill went red with only "restore timed out: no answer in 596591 ms". Nobody can tell whether the time went on fetching files, unpacking the database or cloning bundles.
Done looks like:
[ ] restoreSnapshot in src/snapshot/restore.ts takes an optional onProgress(p) with plain data: { phase: "manifest" | "files" | "unpack" | "bundles" | "key", done, total, bytes }. It is called when each phase starts and after each file or bundle finishes. Leaving it out changes nothing.
[ ] bun src/snapshot/restore.ts <name|latest> <dir> prints one line per phase with its count and seconds, so an operator can time a real restore by hand.
[ ] A test with an in-memory store and a stub git asserts the progress sequence for 3 files and 2 bundles: phases in order, done rising to total, bytes adding up.
[ ] No server change and no migration. Run bun x tsc --noEmit and the snapshot-restore tests. Name any new test file in GATE in scripts/gate.ts.
Splits #2611: the restore drill went red with only "restore timed out: no answer in 596591 ms". Nobody can tell whether the time went on fetching files, unpacking the database or cloning bundles.
Done looks like:
restoreSnapshotinsrc/snapshot/restore.tstakes an optionalonProgress(p)with plain data:{ phase: "manifest" | "files" | "unpack" | "bundles" | "key", done, total, bytes }. It is called when each phase starts and after each file or bundle finishes. Leaving it out changes nothing.bun src/snapshot/restore.ts <name|latest> <dir>prints one line per phase with its count and seconds, so an operator can time a real restore by hand.gitasserts the progress sequence for 3 files and 2 bundles: phases in order,donerising tototal,bytesadding up.bun x tsc --noEmitand the snapshot-restore tests. Name any new test file inGATEinscripts/gate.ts.