Skip to content

Add durable IndexedDB storage for Code OSS browser profiles - #94

Merged
wieslawsoltes merged 2 commits into
mainfrom
feature/code-oss-indexeddb-persistence
Sep 16, 2026
Merged

wieslawsoltes merged 2 commits into
mainfrom
feature/code-oss-indexeddb-persistence

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Code OSS falls back to in-memory user data when the native runtime has no IndexedDB implementation. This adds a host-configured durable storage subset with stable loopback profile identity, asynchronous atomic revisioned commits, quota and corruption errors, transaction rollback, cursor support, and the open/upgrade/versionchange flow used by the three VS Code web-state databases.

The change is reconstructed directly on current main at 649c2b63 (including the Web Crypto stack merged at 1c18c70c) and retains the focused Code OSS-compatible slice. It does not include the consolidation branch from #76.

The host supplies a private storage directory, stable application/profile partition key, and quota through Avalonia or Uno options. Storage remains absent unless the host opts in and the component manifest declares storage.indexeddb; an unavailable durable backend is never presented as a successful in-memory implementation.

Validation on macOS arm64 with pinned V8 15.3.10:

  • webscene_indexeddb_storage_tests and webscene_native_indexeddb_contract: 2/2 passed against the linked current runtime.
  • Candidate WPT-style profile: 1/1 document and 12/12 subtests passed against the newly built native library.
  • Durability coverage includes rollback, quota, corruption, abandoned temporary writes, stale locks, cross-process stale-writer rejection, and restart across loopback port changes.
  • Durable 4 KiB commit throughput: 1,670.73 commits/second; the regression gate requires 100 commits within ten seconds.
  • SDK compatibility tests: 7/7 passed on .NET 10; Avalonia and Uno backend/SDK projects build with zero warnings and errors.
  • Manifest and tooling contracts: 3/3 Node tests passed; the candidate manifest resolves the IndexedDB contract successfully.

This advances #56. That issue remains open for durable Blob/File MIME and prototype restoration; indexes, key paths, key generators, and IDBKeyRange; reverse and mutating cursors; complete transaction active-window semantics; broader cross-realm/process upgrade coordination; released-RID and Native AOT qualification; and packaged Frameforge media/project relaunch acceptance.

@wieslawsoltes

Copy link
Copy Markdown
Collaborator Author

Packaged Code OSS host verification is now green against the consolidated runtime containing this PR (bd139b26).

  • real Code OSS workbench and native frames required before either storage stage
  • first process committed a structured record with a Date
  • host, WebScene engine, and bundled Node server were destroyed
  • second process restored and type-checked the record on a different loopback port
  • ports: 5479054844
  • duration: 8.758 seconds
  • stable host partition: org.scenetech.code-oss-appscene:default
  • quota: 512 MiB
  • ordinary editor edit/undo smoke after storage integration: passed in 5.224 seconds

The host change is app-specific configuration only. It does not modify VS Code OSS or add a storage shim. Compact .wsidb evidence is retained while server/cache/profile artifacts are deleted after the gate.

@wieslawsoltes
wieslawsoltes force-pushed the feature/code-oss-indexeddb-persistence branch from 2b4d80b to 6355b23 Compare September 16, 2026 22:49
@wieslawsoltes
wieslawsoltes changed the base branch from feature/code-oss-browser-compatibility to main September 16, 2026 22:49
@wieslawsoltes
wieslawsoltes marked this pull request as ready for review September 16, 2026 22:49
@wieslawsoltes
wieslawsoltes force-pushed the feature/code-oss-indexeddb-persistence branch from 6355b23 to 76282b7 Compare September 16, 2026 22:51
@wieslawsoltes
wieslawsoltes merged commit 05d9ad6 into main Sep 16, 2026
19 of 32 checks passed
@wieslawsoltes
wieslawsoltes deleted the feature/code-oss-indexeddb-persistence branch September 16, 2026 22:55
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.

1 participant