Skip to content

Fix restore path validation, preview integrity, and startup cleanup - #2

Merged
facadefish merged 2 commits into
mainfrom
codex/fix-restore-preview-locks
Sep 24, 2026
Merged

facadefish merged 2 commits into
mainfrom
codex/fix-restore-preview-locks

Conversation

@facadefish

@facadefish facadefish commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Restore could accept an identical directory behind a substituted symlink/junction and modify live paths before detecting the conflict. Frozen skill previews could show changed text with stale hashes, and an initial journal-save failure could leave the live service's mutation lock held.

This change:

  • Validates the physical location and link type of ordinary archives, snapshots, and applied copies before restoration; preserves legitimate original source-root links and checks the whole group before moving anything.
  • Rejects drifted or redirected previews and hashes the same stream used for display, including content beyond the 200 KB preview prefix. Rule previews share the verified reader.
  • Records failed startup as interrupted, resets busy state, and releases the lock before returning the error. The failed request is not silently replayed.

Closes #1.

Validation

  • PR CI passed on Ubuntu, macOS, and Windows with Node.js 22, including both standalone language-package builds.
  • Windows / Node.js 24.15.0: npm run check — 76 passed, 2 skipped, 0 failed.
  • All 11 new regression cases failed on the original implementation and pass with this fix.
  • Existing original-junction, grouped Apply/Restore, interrupted recovery, idempotency, and both standalone language-package tests pass.
  • Browser checks with disposable demo objects: normal diff and Apply; same-content live-junction drift displayed and Restore rejected; after removing the injected conflict, Restore succeeds and the original complete fingerprint/selection are verified; changed frozen candidate displays a preview error.
  • git diff --check passes.

The two skipped tests are opt-in real Codex/Claude host integrations. No real installed skills, rules, or plugins were changed. The reported link-substitution scenarios require local write access; this is not a claim of unauthenticated remote execution.

@facadefish
facadefish merged commit 5e59eab into main Sep 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix restore path drift, frozen preview integrity, and startup lock cleanup

1 participant