docs(revert-rescue): record file-only rescue scope for non-file schemes - #308
Merged
Conversation
The dispose-time / alive revert-rescue reuses the reducer's file-only canHostWrite gate, so on a non-file scheme (vscode-vfs/remote reached via a forced openWith or hot-exit restore) a close-revert is not rescued. Investigation outcome: keep the gate file-only rather than widen it. The headline virtual-workspace scenario is unreachable — package.json declares capabilities.virtualWorkspaces/untrustedWorkspaces.supported = false, so VS Code never activates Quoll there; canEditWith already blocks non-file schemes on the normal open path. Widening would fork the write-capability gate for a manifest-excluded corner and create a 'refuses normal writes yet performs rescue writes' asymmetry on a security-sensitive write path. Documented at the RescueContext.canWrite gate; full rationale + re-visit trigger in LEARNING.md. No behavior change (composition already pinned by can-host-write + revert-rescue suites).
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.
Summary
Investigation outcome for the round-2 review finding that the revert-rescue is skipped on editable non-file schemes. Records the file-only rescue scope with rationale (documentation route) rather than widening the gate. No runtime behavior change.
Changes
RescueContext.canWrite/AliveRevertContext.canWritegate doc insrc/extension/surface/revert-rescue.tsto explain why the rescue is intentionally scoped tofile:documents (unified with the reducer'scanHostWritewrite gate), not widened to every open-and-applyEdit-capable scheme..claude/docs/LEARNING.md(local-only doc;.claude/is git-ignored in this repo).Rationale (why documentation, not widening)
package.jsondeclarescapabilities.virtualWorkspaces.supported = false+untrustedWorkspaces.supported = false, so VS Code never activates Quoll in a virtual/untrusted workspace.quoll.editWithgate (canEditWith) already refuses non-file schemes; the only residual entry is a forcedvscode.openWith/ hot-exit restore in a trusted local workspace with a concurrently-open dirty text editor on a writable non-file FS — a corner of a corner.file-system.tsmaintains between the command gate and the write gate.Related
Test Plan
pnpm compilecleanpnpm test:unitgreen (composition already pinned:can-host-write.test.tsrefusesvscode-vfseven when FS is writable;revert-rescue.test.tspinscanWrite:false → {rescue:false}on both decision paths)pnpm lintclean on the changed file