Repository navigation
Commit 0d05000
fix(app): real macOS release run showed the resource-admission fix wasn't enough
The previous fix widened timeouts assuming slowness; a second real
macOS release-build run instead showed the actual problem directly:
"Requested 2 CPU threads, but only 1 are safely available" -- this
GitHub-hosted macOS runner class genuinely has very little safely-
available CPU capacity, and it hit three separate files that request
2+ threads through the real, unmocked mainResourceOrchestrator:
llamacpp-manager.test.ts's fake-chat describe block (all 7 tests, some
timing out waiting on a lease that was never going to be granted,
others failing fast), media.test.ts's real-ffmpeg extraction tests (3
of 3), and one rag.test.ts test whose real point (verifying an
"unavailable embedding backend" error path) never even got reached
because lease acquisition failed first.
Fixed all three by bypassing real admission the same way
python-runtime-manager.test.ts's earlier fix did (task callback runs
directly, ignoring the mocked lease argument -- safe since none of
these callers use it) rather than continuing to depend on the host's
actual spare capacity. llamacpp-manager.test.ts's describe block
originally exercised the real lease deliberately (see its own updated
comment for why that ambition didn't survive contact with real CI
hardware); rag.test.ts's fix is scoped to the one affected test only,
leaving its actual "resource-orchestrator integration" describe block
further down untouched.
Also found and fixed a real, non-obvious vitest behavior while
debugging this: vitest's own hook-cleanup machinery calls a
describe-scoped (beforeAll/afterAll) spied-and-mocked function one
extra time, with zero arguments, while tearing it down -- confirmed
directly via a stack trace rooted at callCleanupHooks. Guarded both
new mocks in llamacpp-manager.test.ts and media.test.ts against that
extra call. rag.test.ts's and python-runtime-manager.test.ts's mocks
don't need the guard -- both mock+restore within a single test rather
than across a describe block via beforeAll/afterAll, so they never see
that particular cleanup path.
Verified locally: full `npm test` in app/ passes (1018 tests).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 78edc4a commit 0d05000
3 files changed
Lines changed: 95 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
343 | 359 | | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
344 | 372 | | |
345 | 373 | | |
346 | 374 | | |
| 375 | + | |
347 | 376 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
361 | 381 | | |
362 | 382 | | |
363 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
41 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
42 | 71 | | |
43 | 72 | | |
44 | 73 | | |
| |||
57 | 86 | | |
58 | 87 | | |
59 | 88 | | |
60 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
61 | 92 | | |
62 | 93 | | |
63 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
155 | 170 | | |
156 | 171 | | |
157 | 172 | | |
| |||
0 commit comments