Repository navigation
Description
Current save/recovery checkpoint — 21 September 2026
Exact heads are unchanged Code OSS 645f29cc, WebScene d3c030fa, and AppScene 080ee9c. Local vscode-demo commit 25bbdc92 is intentionally unpushed with Actions disabled.
The successful remote file lifecycle now passes edit, Save, Save All, delayed Auto Save, Revert, close, and reopen. Save All persists exact replacement bytes for dirty README.md and unicodé.txt models and clears both dirty states in 1,788.90 ms. Resource-scoped in-memory configuration reports effective files.autoSave=afterDelay and files.autoSaveDelay=100; the real working-copy scheduler persists exact bytes and clears dirty state in 1,896.13 ms. Both fixtures are restored exactly. Earlier Save/Revert/close/reopen evidence remains valid.
The initial explicit Auto Save probe used a global memory update, but resource-effective configuration remained off with the default 1,000 ms delay. Passing the remote resource to IConfigurationService.updateValue corrected the gate. No WebScene or AppScene defect appeared in this successful lifecycle slice. Source contract tests pass 25/25 on Node 24.18.1. Evidence: vscode-demo/docs/validation/remote-save-revert-d3c030fa-20260921.md.
Remaining #269 work is canceled/error Auto Save outcomes, remote/native Save As, overwrite/cancel/error/conflict injection, watcher/model reconciliation, encoding and large-file fixtures, working-copy backup, crash/hot-exit recovery, visual/accessibility comparison, and repeated resource/performance bounds.
Parent epic: SceneTech/AppScene#122
Workspace/provider prerequisite: #252
Navigation prerequisite: SceneTech/AppScene#124
Native/local picker stack: SceneTech/AppScene#123 → #248
Release-wide acceptance: #260
Problem
Opening a selected folder and rendering Explorer does not prove that unchanged VS Code OSS can maintain file models safely. The current focused hierarchy has no owner for the complete remote editor lifecycle: open bytes, dirty state, Save, Save As, revert, conflict handling, backups/hot exit, and recovery after reload, navigation, crash, or restart.
The broad AppScene storage issue #33 proves durable browser storage for a typed record, and AppScene #32 covers app-corpus file transfer. Neither proves VS Code's text-file model, remote file-service writes, backup metadata, overwrite/error UX, or watcher/model reconciliation.
Investigation
Trace unchanged VS Code 1.137 from Explorer/file activation through ITextFileService, model creation, encoding/EOL detection, dirty-state transitions, IFileService read/write/stat, backup working copies, dialogs, and final watcher refresh. Record the exact reusable WebScene/AppScene contract at the first failure; keep raw paths limited to isolated fixtures.
Cover:
- existing remote file open, edit, Save, Save All, Auto Save, Save As, revert, close-dirty prompt, and working-copy backup;
- untitled-to-file, read-only, permission denied, missing/deleted, renamed, externally modified, stale etag, symlink, disk-full/short-write, disconnect/reconnect, and canceled overwrite flows;
- UTF-8/BOM/UTF-16, EOL preservation, Unicode normalization, empty/binary/large/sparse files, long names, percent-encoded URI components, case-sensitive roots, and platform path separators;
- atomic create/replace semantics, flush/durability expectations, no partial target on failure, own-write watcher de-duplication, and exact-once dirty/model/view updates;
- backup/hot-exit restoration across reload, folder A → B → A, same-window navigation, host termination, crash recovery, profile restart, and unavailable original paths;
- language-service/diagnostic/SCM/Search state after save, revert, rename, and recovery.
Ownership boundaries
- Qualify remote workspace bootstrap, Explorer contents, and watcher refresh #252 owns workspace reconstruction, remote provider registration, Explorer enumeration, and watcher delivery.
- This issue owns file-model/read/write/revert/backup reconciliation once the provider and workspace exist.
- AppScene [GPU 11/20] Complete WebGPU async errors, mapping, copies and device-loss semantics #33 owns durable storage/origin/profile primitives; this issue consumes them through unchanged VS Code hot-exit behavior.
- AppScene Support nested CSS rules in modal layouts #123 and Implement File System Access pickers and handles over AppScene native panels #248 own native/local Save As and persisted path grants. Remote Save As continues through the SimpleFileDialog lane from Qualify VS Code remote file and folder picker interaction #247.
- AppScene Emit browser-compatible punctuation keyboard events #124 owns document navigation/lifecycle. AppScene [GPU 06/20] Implement Linux external-memory and semaphore interop #28 owns generic modal/focus behavior.
- Establish Chromium/AppScene visual and geometry regression gates for unchanged Code OSS #259 owns shared Chromium visual/geometry machinery, Qualify Code OSS accessibility semantics, keyboard navigation, and native exposure #262 shared accessibility/keyboard exposure, Bound visual-tree churn, idle publication, and memory across panel mutations #258 retained-scene/RSS workloads, and Publish a Code OSS Web API capability ledger and expand WPT coverage #263 the Web API/WPT ledger.
Acceptance
- Opening a remote fixture yields byte-exact editor content, encoding, EOL, language mode, resource URI, and one model.
- Edit → Save → close → reopen preserves bytes and clears dirty state exactly once; Save All and Auto Save have explicit successful/canceled/error outcomes.
- Remote and native/local Save As preserve the selected URI, requested target, overwrite policy, and grant lifetime without a VS Code source patch.
- Revert and external-change conflicts match Chromium semantics and never silently discard unsaved bytes.
- Failed, canceled, denied, stale, short, or disconnected writes leave the prior durable file intact and expose the correct recoverable error/focus state.
- Hot exit restores every dirty working copy and untitled resource after reload/crash/restart, including multi-root workspaces; successful save removes obsolete backups.
- Watcher events caused by the app and externally are reconciled once without duplicate models, prompts, Explorer rows, SCM entries, or diagnostics.
- Path/URI, Unicode, symlink, encoding, large-file, and platform-separator fixtures pass with explicit supported/unsupported declarations.
- Chromium/AppScene semantic, visual, focus, and accessibility comparisons pass for dirty tabs, prompts, conflicts, errors, and recovery.
- Record cold/warm p50/p95 for open-to-editor, edit-to-dirty, save, revert, backup, and restore. Bound copied bytes, filesystem calls, DOM/scene publications, CPU, RSS, models, backups, watches, and handles over 100 cycles and representative large files.
- WPT-derived file/stream/storage contracts, native failure-injection tests, unchanged packaged Code OSS acceptance, and final installed-SDK release gates pass.
Proposed PR stack
- Investigation-only correlated observer and product-neutral file-model/read/write fixture.
- Smallest provider/stream/write/error contract fix, if reproduced, with direct failure-injection and byte-integrity gates.
- Backup/hot-exit/restart contract over the durable storage primitives from AppScene [GPU 11/20] Complete WebGPU async errors, mapping, copies and device-loss semantics #33.
- Native/local Save As integration after AppScene Support nested CSS rules in modal layouts #123 and Implement File System Access pickers and handles over AppScene native panels #248, preserving the same file-model gates.
- Unchanged Code OSS cumulative acceptance plus visual/accessibility/performance/lifecycle gates; release qualification remains AppScene Keep captured Performance methods on one timeline #130.
Schedule
Start the remote open/edit/save slice after #247 and the minimal #252 provider/root path are proven. Run backup/recovery investigation in parallel with AppScene #33's released-SDK cleanup. Add native/local Save As only after the #123 → #248 stack. Merge focused reusable fixes before cumulative product acceptance.
Activity
wieslawsoltes commentedon Sep 18, 2026
The first concrete file-model prerequisite found by the unchanged VS Code audit is now implemented: #441 merged as WebScene
622a955c512dbf1853a042effe6a5b41cad53052.VS Code routes local file watches through
HTMLFileSystemProvider.watch()andFileSystemObserver. Before this merge WebScene had noFileSystemObserver, so local watches were silently disabled. The new opaque-handle observer supplies appeared/disappeared/modified/errored records, recursive relative components, non-overlapping bounded polling, and unobserve/disconnect/document-lifecycle cleanup. This unblocks external-edit/conflict and post-save reconciliation without a VS Code source change.Validation was intentionally skipped under the current implementation-only priority. #438 retains the exact browser/native/performance/lifecycle/product debt. #269 remains open for unchanged-product open/edit/save/revert/Save As, own-write de-duplication, dirty conflict UX, IndexedDB backup/hot-exit recovery, reload/crash/restart, encoding/error cases, and resource bounds.
wieslawsoltes commentedon Sep 18, 2026
Post-#441 hot-exit ownership trace — no second implementation
A source-level trace of unchanged VS Code 1.137 does not prove another reusable runtime primitive is missing after the watcher merge.
BrowserWorkingCopyBackupServicealways roots browser backups atvscode-userdata:/Backups/<workspace-id>.web.main.tsregistersvscode-userdatathroughIndexedDBFileSystemProviderbacked by the durablevscode-web-db/vscode-userdata-storedatabase. WebScene PR Add durable IndexedDB storage for Code OSS browser profiles #94 already owns and implements durable, partitioned IndexedDB across engine/process restart.BrowserWorkingCopyBackupTrackerschedules backups while the page is live and synchronously vetoes final shutdown when a modified working copy lacks the current content-version backup. It does not require an async native shutdown write.BrowserLifecycleServiceconsumesbeforeunloadfor the veto andpagehidefor terminal notification. WebScene already implements both native/script close paths with one terminal pagehide.IndexedDBFileSystemProviderusesBroadcastDataChannelonly whenwatchCrossWindowChangesis enabled to publish live provider change notifications. IfBroadcastChannelis absent, VS Code falls back to storage events. Neither route writes or restores backup bytes, and the current AppScene package has one workbench document/window for this scenario.Therefore a realm-local
BroadcastChannelshim or new AppScene persistence ABI would be speculative and would not prove cross-window/process semantics. No code or new issue is justified until unchanged-product tracing shows a failed backup write/load/restore, content-version veto, lifecycle event, or an actual second-window invalidation requirement.Remaining #269 work is product evidence: dirty saved and untitled backup creation, IndexedDB durable bytes/metadata, current-version veto, reload/navigation/host termination/crash/restart restoration, successful-save cleanup, corruption/quota/unavailable-original handling, and only then a focused fix at the earliest observed failing boundary. Validation remains skipped under the current implementation-only priority.
wieslawsoltes commentedon Sep 19, 2026
Implementation-first re-audit at WebScene
9f2d4830confirms the generic recovery prerequisites are present: bounded FileSystemObserver (#441), durable partitioned IndexedDB, persisted opaque handles, and exact-once close lifecycle. The latest owner trace requires an actual failing unchanged-product backup/restore/save/corruption/quota case before another runtime change; realm-local BroadcastChannel would be speculative. Remaining work is package acceptance. No code or runtime validation was run;git diff --checkpassed.wieslawsoltes commentedon Sep 20, 2026
2026-09-20 checkpoint: top-level storage flush blocker fixed in #874
The current Code OSS release acceptance isolated a concrete hot-exit/storage failure:
mcpInputsfromIStorageService.onWillSaveState;WEBSCENE_HOST_REQUEST_WINDOW_RELOAD_V1withoutbeforeunloadorpagehide;editSavedInput()dereferenced a missing entry.PR #874 makes reload and same-origin top-level navigation reuse the existing bounded close-decision lifecycle before host handoff. It includes cancellation, exact event-shape, and focused performance-lane coverage. The Release V8 focused gate passed locally.
This resolves the diagnosed top-level lifecycle sub-blocker. The broader edit/save/revert/hot-exit acceptance in this issue remains scheduled after the current runtime is repackaged into the Code OSS release.
wieslawsoltes commentedon Sep 20, 2026
2026-09-20 exact-package checkpoint: concurrent IndexedDB commit blocker
The exact Release package built from AppScene
cd0a02eand WebScene98077f23proves that #874 now dispatchesbeforeunloadandpagehideon both reload transitions. The first MCP password entry succeeds and the encrypted secret key persists. The reopened workbench still cannot edit the saved input because workspace-scopedmcpInputswas not committed.Retained evidence identifies the next boundary before navigation:
CodeExpectedError: IndexedDB database changed before this transaction committedabout 204 ms before the firstbeforeunload;readwritetransactions in its IndexedDB storage layer;I am implementing database-scoped read/write commit serialization in WebScene's reusable IndexedDB compatibility layer. This preserves async transaction behavior, replays mutations on the latest committed revision, and removes the arbitrary conflict race for one runtime while retaining native optimistic concurrency for separate processes. A focused concurrent-transaction regression will cover more than the old four-retry limit. The broader #269 acceptance remains open after this focused fix.
wieslawsoltes commentedon Sep 20, 2026
2026-09-20 checkpoint: lifecycle task-boundary fix merged
The exact AppScene
cd0a02e/ WebScenef5df884apackage confirmed #875 removed the IndexedDB conflict, then isolated the remaining missingmcpInputsrecord to navigation task ordering: unchanged VS Code schedules its storage commit fromonWillSaveStatewith a zero-delay task, while WebScene made the native reload request visible immediately afterbeforeunload/pagehide. AppScene could retire the realm before that task ran.#876 tracked the focused defect. PR #877 is merged at
a7943723. WebScene now reserves bounded host-request capacity, drains timers queued through lifecycle microtask checkpoints, and publishes terminal navigation/reload from a later browser task. Recursive navigation coalesces, veto/error/teardown release ownership, and timers created later cannot starve navigation.The focused Release V8 gate passed. It covers listener and Promise-microtask timers, reload/navigation ordering, veto behavior, exact-once lifecycle, and 1,000 ordered terminal requests in 0.0058 seconds. The next gate is an exact SDK/package rebuild and the unchanged Code OSS two-navigation MCP persistence smoke; this parent stays open until that product acceptance passes.
wieslawsoltes commentedon Sep 20, 2026
2026-09-21 checkpoint: lifecycle-descended IndexedDB persistence merged
The exact AppScene
cd0a02e/ WebScenea7943723Release package confirmed that the first lifecycle task boundary from #877 was still too shallow: VS Code enters its workspace IndexedDB transaction from that task, then completes native load/store work and Promise continuations asynchronously. AppScene could receive reload before that lineage became durable.#878 captured the isolated runtime contract. PR #879 is merged at
a39280e4.WebScene now:
The focused durable restart gate passed in 0.0036 seconds and proved the record is readable from a fresh engine and port before host handoff. The related 1,000-request navigation gate passed in 0.0044 seconds. Superseded branch CI was canceled after the related local Release gates passed under the agreed fast-merge policy.
Next: rebuild the exact AppScene/WebScene SDK and unchanged Code OSS Release, then repeat the two-realm MCP persistence smoke. This parent remains open until that installed-package acceptance passes.
wieslawsoltes commentedon Sep 20, 2026
Exact-product checkpoint: pagehide cancellation boundary fixed
The AppScene
cd0a02e/ WebScenea39280e4Release with PR #879 still failed the real MCP reopen path. The new in-product probe and a preserved copy of the transient native database proved the failure was before IndexedDB:IMcpRegistry.getSavedInputs(StorageScope.WORKSPACE)returned[];.wsidbinventory contained nomcpInputsrecord;flush(0)frombeforeunload, then its synchronouspagehideteardown cancels that timer.Issue #880 and merged PR #881 (
ba71aa1b) now split this terminal lifecycle at the existing bounded persistence boundary. The focused regression models the cancellation and requiresbeforeunload,flush-timer,commit,continuation,pagehidebefore reload publication; durable restart and the 1,024-task starvation bound pass in 1.21 seconds.The exact AppScene SDK/package rebuild and unchanged Code OSS MCP reopen smoke are now running against
ba71aa1b.wieslawsoltes commentedon Sep 20, 2026
Exact AppScene
cd0a02e/ WebSceneba71aa1bretest completed. #881 fixed the direct beforeunload timer/pagehide ordering case, but the unchanged VS Code IndexedDB compatibility transaction still losesmcpInputs:mcpStoredInputKeys=[],mcpStoredInputPresent=false, while the independent native storage round trip remains true. Opened and scheduled #882 with the exact nested transaction lineage and package acceptance requirements. Package executable SHA-256:6b44ef80282a6f491ba974318ed84fb8c637b6a4d2245f241a4412e7f9b787a4; failure duration 28.803 s.