Skip to content

sdn-js: FlatSQL 3.12.10 (the engine returns an error instead of aborting when a thread cannot start) - #203

Merged
TJKoury merged 2 commits into
mainfrom
sdn-js-flatsql-3.12.10
Nov 17, 2026
Merged

TJKoury merged 2 commits into
mainfrom
sdn-js-flatsql-3.12.10

Conversation

@TJKoury

@TJKoury TJKoury commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

What changes

  • sdn-js/package.json: flatsql 3.12.9 -> 3.12.10 (exact). sdn-js/package-lock.json comes from the registry, with integrity. Nothing else; main's other pins are kept. npm ci is clean.
  • What FlatSQL 3.12.10 brings:
    • flatsql_start creates every engine thread before any runs. When one cannot be created, it starts none and returns FLATSQL_E_BUSY (-6), instead of std::thread aborting the WASM instance (RuntimeError: unreachable in startThreads).
    • The browser guest reports that status as FlatSQLThreadPoolError, as it already does for a short thread pool; Node reports FlatSQLError -6.
    • A thread worker that loads and then fails while it starts gives that error within a second.
  • No store-format change.

Served files that change (/sdn-js/ on the site, sha256)

File Before (main, flatsql 3.12.9) After (flatsql 3.12.10)
flatsql.wasm 19361edfb3e6613f857af8b5512fccae8c49a656ab42c99b7114e76a2f6ba175 00c92effd74897870b45345193dfa118c43cd79e72e559d9277e8e8ae3051b63
integrity.json 7dc3e9f9ed9f3d71ebf88b50ff347a7f2c454d0c3280c17a2d42dbd908056369 b9f1041f52607b4c1bad8a84be8a3bcd85590778928e41d388ed42809b62ec16
runtime/browser-guest.mjs 3cafa6be8dc9941130a7588ee734a4ff8eb3d98d4342b18517c1bb3f0cfc8bf2 4e1a1b1dd644e511d74c3bf6413e2177e143997ee172455265139d2a656aff29
index.mjs 54cf86c49ee8e9abb1ada38c4236784623d87799b1220e880b5837ba424649e2 8f7f4aef8355756752443068cb03499e90933f8706b0e2de65f31e77ad37fd46
runtime/browser-host.mjs f38410cc...0ee8 unchanged
runtime/wasiThreadBrowserWorker.mjs 19269f1b...9d86 unchanged
runtime/opfsIoWorker.mjs 47c8704c...d016 unchanged
  • index.mjs changes because it bundles FlatSQL's index.js, which has the new status message.
  • The published flatsql.wasm is byte for byte the artifact built and tested on the FlatSQL release branch.

Browser proof (sdn-js/scripts/catalog-cache-threads.e2e.mjs, built runtime, 30 fresh contexts each)

The catalog cache opens and reads on OPFS with the places store in memory, the way the console does. The whole browser is slowed by stopping and continuing its processes.

Case Faults Catalog open, ms (fastest / median / slowest) Places open, ms Pool ready, ms
4x, thread-worker script after 2.3 s 0 / 30 2931 / 3031 / 3218 2672 / 2766 / 2856 2331 / 2382 / 2415
4x, fast 0 / 30 614 / 705 / 944 365 / 450 / 580 46 / 70 / 124
none, fast 0 / 30 177 / 184 / 197 103 / 107 / 120 12 / 14 / 21
  • Every pool armed on its first attempt.
  • "I/O worker failed to start" appeared 0 times.

Checks

  • Record-store tests (engine-record-store, engine-record-store-stream-surface, local-flatsql-durable, local-flatsql-schema, flatsql-parity, flatsql-sync-cutoff): 6 files, 35 tests, pass.
  • src/package-build.test.ts: 16 tests, pass.
  • Stack scripts/check.mjs --repo . --base origin/main --e2e "cmd node sdn-js/scripts/catalog-cache-threads.e2e.mjs --contexts 30 --cpu 4 --script-delay-ms 2300", with the stack's origin/main check files (0422bad3), ended CHECK FAILED.
    • The E2E passed.
    • These passed: secrets, no-js-physics (sdn-console and sdn-js), json-boundary console, connectors-boundary.
    • The one failure: json-boundary sdn found 1 new JSON hit (698 against a baseline of 697), at sdn-server/internal/pubsub/publication_observation.go line 33, in publishObservedDatasetAnnouncement (R4-p2p-json). That file is not in this change (the diff is sdn-js/package.json and its lockfile only). It came to main with 2f6b54d ("Add integrity rejection coverage and publication timing observations"), so main fails this scan on its own.
  • Not run:
    • the console itself on this build;
    • the full sdn-js suite;
    • the UI build.

🤖 Generated with Claude Code

TJKoury and others added 2 commits November 17, 2026 03:53
… status, not an abort)

flatsql 3.12.9 -> 3.12.10 from the registry (lockfile with integrity); nothing else. FlatSQL 3.12.10: flatsql_start creates every engine thread before any runs and returns FLATSQL_E_BUSY when one cannot be created, with nothing started; the browser guest reports it as FlatSQLThreadPoolError, Node as FlatSQLError -6. Served files that change: flatsql.wasm, integrity.json, runtime/browser-guest.mjs, index.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TJKoury
TJKoury merged commit 11e0f5a into main Nov 17, 2026
50 of 52 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.

1 participant