Skip to content

test(vision): mock available memory on macOS runners - #136

Merged
iLevyTate merged 1 commit into
mainfrom
fix/vision-test-mac-memory
Nov 14, 2026
Merged

iLevyTate merged 1 commit into
mainfrom
fix/vision-test-mac-memory

Conversation

@iLevyTate

Copy link
Copy Markdown
Owner

Fixes the one macOS CI failure on main after #135 (run 43632575472): VisionService.test.js › the runtime does not start beside it asserted no spawn, but on darwin the real ModelMemoryManager now probes sysctl kern.memorystatus_level through the shared available-memory reader (the intended #135 change). Test-only: mock systemMemory to read os.freemem(), the same pattern as #133.

Verified locally: with process.platform forced to darwin the suite failed exactly this test (1 failed / 75 passed) and passes after the change (76/76); natively 89/89 across both VisionService suites. PR CI runs Ubuntu and Windows only, so the macOS confirmation comes from the push to main. No app code changes; the packaged app is the one smoke-tested on 274b533.

…sctl probe as a spawn

The real ModelMemoryManager now reads available memory through the shared
systemMemory reader, which on darwin starts a background
`sysctl kern.memorystatus_level` spawn. The memory-budget test asserts
the vision runtime never spawned, so on the macOS runner it counted that
probe. Reproduced on Windows by running the suite with process.platform
set to darwin (1 failed); with the mock it passes there and natively.
@iLevyTate
iLevyTate merged commit e223732 into main Nov 14, 2026
8 checks passed
@iLevyTate
iLevyTate deleted the fix/vision-test-mac-memory branch November 14, 2026 20:12
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