Skip to content

test(smoke): restore a seeded search index through the packaged restore worker - #105

Merged
iLevyTate merged 2 commits into
mainfrom
test/smoke-restore-worker
Nov 9, 2026
Merged

iLevyTate merged 2 commits into
mainfrom
test/smoke-restore-worker

Conversation

@iLevyTate

Copy link
Copy Markdown
Owner

The restore worker (oramaRestoreWorker) and the LZ4 binding it decodes with must load from app.asar.unpacked. When either is missing, restore falls back to the main thread without any error. The packaged smoke check always started from an empty profile, so it never exercised them, and the worker only runs for saved files of 4 MB or more.

  • Seed: before launch, scripts/packaged-launch-smoke.js writes a 5.1 MB LZ4 fileChunks collection into the throwaway profile. It holds 800 deterministic synthetic passages with 384-dim vectors, in the app's own compact format, written with the app's own codec. If the runner cannot load LZ4, seeding fails loudly.
  • Verdict: the run now requires the Restored fileChunks database line to show parsedIn: 'worker' with 800 of 800 inserted and 0 failed. A main-thread fallback or a partial restore fails the run. The summary records seededIndex and restore.
  • Tests: test/packagedLaunchSmoke.test.js has 11 tests, including a round trip through the real loadPersistedCollection.
  • Evidence: packaged smoke run 42702179765 on this branch. All four legs restored in the worker with 800/800: signed Windows x64, signed Windows arm64, macOS arm64 and Linux x64.
  • Docs: RELEASING.md and the SW-40 entry in CLAUDE.md now record the check, and the large-library restore leaves the manual list.

…re worker

The restore worker (oramaRestoreWorker) and the LZ4 binding it decodes with
must load from app.asar.unpacked, and when either is missing restore quietly
falls back to the main thread. The packaged smoke started from an empty
profile, so it never exercised them. The profile now gets a 5 MB compressed
fileChunks collection in the app's own compact format (past the 4 MB worker
threshold), and the run passes only if the app logs it restored in the worker
with every document inserted.
Run 42702179765 restored a seeded 5 MB LZ4 index through oramaRestoreWorker on
Windows x64 and arm64, macOS arm64 and Linux x64 (parsedIn: 'worker', 800/800).
The release guide describes the check, and the large-library restore leaves the
manual list.
@iLevyTate
iLevyTate merged commit a989827 into main Nov 9, 2026
10 checks passed
@iLevyTate
iLevyTate deleted the test/smoke-restore-worker branch November 9, 2026 22:26
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