test(local-llm): stop betting that pid 777 is dead - #404
Open
plombeer31 wants to merge 1 commit into
Open
Conversation
`download-spawn > spawns a detached copy…` failed twice in CI this week
on unrelated branches, each time with
expected { version: 1, …(17) } to match object { pid: 777, status: 'interrupted' }
The fake spawn reported pid 777 and the assertion wanted the seeded
record to read back `interrupted` — which is `readDownloadJob`
reclassifying a `running` record whose pid is gone. So the test was
asserting that pid 777 does not exist. On a laptop it does not; on a
busy CI container it does, and then the record comes back `running`.
The file already had `DEAD_PID` (2,000,000,000) for exactly this, above
the ceiling Linux hands out. The fake spawn now reports that.
plombeer31
added a commit
that referenced
this pull request
Sep 10, 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.
download-spawn > spawns a detached copy of this program with the worker argvfailed twice in CI this week, on two unrelated branches (#398 and #403), each time with:Both times a re-run of the same commit went green, which is the signature of a bet on the environment rather than a bug in the code under test.
What the test was actually asserting. The fake spawn reported pid 777, and
spawnDownloadWorkerseeds the recordstatus: "running"with that pid.readDownloadJobreclassifies arunningrecord whose pid is gone asinterrupted— sotoMatchObject({ pid: 777, status: "interrupted" })is an assertion that pid 777 does not exist on this machine. On a developer's laptop it does not. On a CI container with a busy pid space it can, and then the record comes backrunningand the match fails.The file already defines
DEAD_PID = 2_000_000_000for this exact reason — above the 4,194,304 ceiling Linux will hand out, so nothing can hold it. The fake spawn now reports that, through a namedSPAWNED_PIDwith the reasoning beside it so the next person does not "simplify" it back to a small number.Test-only change; no production code touched.