Repository navigation
Close the startup follow-ups' known limitations: driver-version reset, embedding worker, x64 payload, Linux raster - #53
Merged
Conversation
…after a driver update GPUMonitor did not read a driver version, so the GPU backend record's driverVersion field was always null and a driver update alone never made the next launch re-run the backend search. - nvidia-smi (Windows and Linux) now queries name,memory.total,driver_version; a missing or "[N/A]" third column leaves driverVersion out, so two-column output still parses. - The Windows WMI path selects DriverVersion from Win32_VideoController. - lspci (Linux without nvidia-smi) and macOS still report none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
…e remembered backend
With STRATOSORT_ENABLE_EMBEDDING_WORKER=true the worker thread ran the
full GPU backend ladder on its own node-llama-cpp stack: no
supported-backend filter and no remembered backend, so it re-tested GPU
binaries the main process had already ruled out.
- workerPools passes { userDataPath, appVersion } as Piscina workerData
(the worker cannot reach electron's app).
- The worker passes getLlamaGpuTypes and a read-only view of the record
(createReadOnlyLlamaBackendCache) to initLlamaWithBackend. Only the
main process's LlamaService saves or clears the record, so the two
stacks never race on the file.
- When a read-only record's backend fails, the selector logs
"Cached Llama backend failed; record left to its owner" instead of
claiming it cleared the record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
…ch Windows build
@node-llama-cpp/win-arm64 declares cpu ["arm64", "x64"], so npm installs
it on x64 runners and the x64 build shipped it (about 11 MB). It could
not be excluded from the shared `files` list because the arm64 config
inherits that list through `extends`.
win.files now excludes `@node-llama-cpp/win-!(${arch}|${arch}-*)/**`.
app-builder-lib expands ${arch} per packed arch (FileMatcher
normalizePattern), so the x64 build drops win-arm64 and the arm64 build
drops any win-x64* package, while each keeps its own (checked with
app-builder-lib's own node_modules filter in
electron-builder-config.test.js). verify-packaged-artifacts fails if a
package for the other arch still holds files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
The startup follow-ups stopped appending enable-gpu-rasterization and enable-zero-copy on every platform. On Windows and macOS GPU raster is already Chromium's default for drivers it does not blocklist, so forcing it only overrode that blocklist. On Linux the default varies with Chromium version and driver, and the AppImage was never measured without the switches, so Linux goes back to what every earlier release did. Software mode appends neither. The raster-switch tests now set process.platform explicitly instead of depending on the platform running the suite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
"resets failures on successful check" started a 30 ms health-check interval, slept 20 ms on a real timer and expected exactly one failure. On a loaded macOS runner the sleep resolved after the first 30 ms tick and the count was 2 (seen on PR #52's ci (macos-latest)). "calls onUnhealthy when check fails" had the same shape with a 70 ms margin. Both now use jest fake timers and advanceTimersByTimeAsync, so the count no longer depends on runner load. The other tests in the file only get more lenient when timers fire late and keep real timers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
… raster switches CONFIG, ARCHITECTURE and DEBUGGING_GUIDE describe the backend record's driver version, the embedding worker's read-only use of it, and the Linux-only raster switches; CHANGELOG [Unreleased] lists the user-visible changes (driver-version reset, embedding worker, smaller Windows x64 build, raster switches left to Chromium on Windows/macOS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5Uo5hC58DRSh1qB489Sos
This was referenced Oct 31, 2026
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
Fixes the known limitations listed on #51, plus a timing-fragile test that failed #52's macOS run.
GPUMonitornow asksnvidia-smiforname,memory.total,driver_version(Windows and Linux) and readsDriverVersionfromWin32_VideoControlleron the WMI path, sogpu-backend-cache.jsonnotices a driver update and the next launch re-runs the backend search. A missing or[N/A]third column leavesdriverVersionout, so two-column output still parses. Linux withoutnvidia-smi(lspci) and macOS still report none.STRATOSORT_ENABLE_EMBEDDING_WORKER=truethe worker thread ran its own full ladder (no supported-backend filter, no remembered backend).workerPoolsnow passes{ userDataPath, appVersion }as PiscinaworkerData; the worker passesgetLlamaGpuTypesand a read-only view of the record (createReadOnlyLlamaBackendCache). OnlyLlamaServicein the main process saves or clears the record, so the two stacks never race on the file; a failed read-only attempt logsCached Llama backend failed; record left to its owner.@node-llama-cpp/win-arm64declarescpu: ["arm64", "x64"], so npm installs it on x64 runners.win.filesnow excludes!**/node_modules/@node-llama-cpp/win-!(${arch}|${arch}-*)/**; app-builder-lib expands${arch}per packed arch (FileMatcher.normalizePattern), so x64 dropswin-arm64and arm64 (which inheritswin.filesviaextends) drops anywin-x64*package. Checked with app-builder-lib's own node_modules filter inelectron-builder-config.test.js;verify-packaged-artifacts.jsfails if a package for the other arch still holds files.enable-gpu-rasterizationandenable-zero-copyeverywhere. That stays on Windows and macOS (GPU raster is already Chromium's default there for non-blocklisted drivers), but Linux goes back to what every earlier release did, since its default varies with Chromium version and driver and the AppImage was never measured without them. Software mode appends neither.healthCheckUtils.test.js › resets failures on successful checkslept 20 ms on a real timer against a 30 ms interval and expected exactly one failure; on Explain why a zip copy cannot update instead of "Failed to check for updates" #52's macOS runner the sleep resolved after the first tick (count 2). It andcalls onUnhealthy when check failsnow use Jest fake timers.[Unreleased]describe the new behaviour instead of the limitations.Scope
Type of Change
Test Plan
Automated
npm run format:checknpm run lintnpm test(as part ofnpm run cion this branch: 774 suites, 11,218 passed, 26 skipped, coverage thresholds met;audit:production0 vulnerabilities; build OK)GPUMonitor.test.js), read-only record and worker data (llamaBackendCache,llamaBackendSelector,workerPools.threadConfig), per-arch packaging (electron-builder-config,verifyPackagedArtifacts), per-platform raster switches (gpuConfig), fake-timer health checks (healthCheckUtils, 15 consecutive passes).The affected suites also pass with the starting platform faked to darwin and win32 (14 suites / 420 tests, plus
healthCheckUtils/gpuConfig/GPUMonitorafter the rebase), so the macOS and Windows runners should not hit platform-only failures.Manual QA
docs/TESTING.md)Manual QA notes:
${arch}exclusion and the Linux raster switches are only exercised by packaged builds;verify-packaged-artifacts.jsnow checks the former on every Windows release build. The SW-40 packaged smoke indocs/RELEASING.mdstill applies before the next release.Checklist
Not done here: macOS and Linux builds still carry
better-sqlite3prebuilds for other platforms (~13 MB each). The same${arch}-style pattern could trim them, but it needs a packaged mac/Linux build to verify.Generated by Claude Code