Repository navigation
test(vision): mock available memory on macOS runners - #136
Merged
Merged
Conversation
…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.
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.
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 realModelMemoryManagernow probessysctl kern.memorystatus_levelthrough the shared available-memory reader (the intended #135 change). Test-only: mocksystemMemoryto reados.freemem(), the same pattern as #133.Verified locally: with
process.platformforced todarwinthe 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.