Repository navigation
fix(server): preserve data across rollback and update recovery - #162
Merged
Merged
Conversation
|
Integrate reviewed main and preserve Git recovery refs until the event transaction commits. Refuse incomplete database backups before trial startup or restoration can mutate the live database.
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.
The deeper audit found three recovery paths that could damage data outside the intended operation:
The preserved worktree now lives through rollback completion. Cleanup distinguishes a durable rollback commit from a cancelled caller, restoring the original folder on earlier failure and retaining the committed workspace after a later cancellation. Checkpoint mutations use
--no-deref. Offline backup enumeration, free-space accounting, and clone probing use the resolved database path consistently with online backup and restore.The worktree defect was introduced in #124. The symbolic-ref and offline-WAL defects predate that merge and were discovered while tracing its affected recovery paths.
Verification
Each production defect has a failing regression before its fix. The tests use owned temporary repositories, files, real SQLite, and an owned child process for an unclean database stop.
On the final tree,
vp run check:changed 68193a2d1c69d3e237bae0f279228135af1afebe --concurrency 1passed the native build, formatting, lint, both Knip scans, generated GraphQL checks, and 181 tests across the three owning files plus Agent Context Budget. The cached typecheck launcher is blocked byseccomp_unotifyin this environment, so that gate invocation exits nonzero. All three configuredeffect-tsgo tsrs --noEmitpackage checks passed directly for server, evals, and scripts; the server check passed alone after an attempt during concurrent validation was killed.GitHub Fork CI, including final Fork Check, Agent Context Budget, and every other applicable check must pass on the exact published head before merge.
Native Windows/macOS service managers and live providers were not exercised; their relevant process/filesystem interfaces use the existing fixtures. No CI or budget gate was weakened.
Additional recovery audit
Two more failure paths are fixed in this update:
Both defects were reproduced on unchanged production source before their fixes. They predate the earlier changes in this PR.
Validation of the updated tree
The updated tree integrates reviewed main
09efb428b74ef6a1d22be25bdba9c62f8a180669. The required changed-file gate was run. Native build, formatting, lint, Knip file scan and GraphQL generation checks passed. Initial export scan/test/compiler processes were killed or returned without diagnostics under resource pressure; their isolated reruns passed: 185 tests across four files, the full configured Knip export scan, and the full server compiler. The configured evals and scripts compilers also passed. A strict changed-file compiler run found and led to correction of a duplicated Effect-provide fixture warning; the final strict check passed.The cached typecheck launcher still cannot use
seccomp_unotifyhere. All three affected packages were checked directly with the configuredeffect-tsgo tsrs --noEmit; no check settings or CI gates were weakened. GitHub must pass all applicable checks on the new exact head before merge.The launcher regression constructs the filesystem layout left by an incomplete backup operation; it does not claim an actual launcher crash during directory removal. Native service managers and live providers remain outside local validation.
Implemented and verified with GPT-6 Astra Pro / ChatGPT.