fix(test): /proc is not a portable unwritable-path fixture — on Linux it hangs CI#26
Merged
Conversation
Both new stores used `/proc/nonexistent/...` to stand for a directory that cannot be written. On macOS there is no /proc, so `mkdirSync(recursive)` failed fast with ENOENT and the tests passed. On Linux the same call **hangs** — not throws, hangs, with no output, no exit and no timeout — which wedged the Test step of every Linux CI job while both macOS jobs finished in about 40 seconds. This branch had never met a Linux runner until the PR, so it was the first opportunity to find it. Reproduced in a node:22-slim container, bisected to the exact call, and fixed by using the pattern fs-cursor-store.test.ts already established and I should have followed: a real temp directory chmod'd to 0500, restored in a `finally`. Portable, and it exercises a genuine permission denial rather than a filesystem curiosity. Full suite now 740/740 on Linux as a non-root user, matching macOS. Worth stating for whoever writes the next store test: an "obviously bad path" fixture has to be bad in the same way on every platform the suite runs on, or it is testing the platform rather than the code. Signed-off-by: jellologic <31935831+jellologic@users.noreply.github.com>
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.
Two test files used
/proc/nonexistent/...to stand for "a directory that cannot be written". On macOS there is no/proc, somkdirSync(recursive)failed fast with ENOENT and the tests passed. On Linux the same call hangs — not throws, hangs, with no output, no exit and no timeout.That wedged the Test step of every Linux CI job on #25 for 18 minutes while both macOS jobs finished in ~40 seconds, and it was only visible once the branch met a Linux runner for the first time.
This blocks releasing.
publish.ymlruns onubuntu-latestand gates onnpm test, so tagging main in this state would hang the publish job rather than publish anything.The fix uses the pattern
test/adapters/fs-cursor-store.test.tsalready established and I should have followed: a real temp directorychmod'd to0500, restored in afinally. Portable, and it exercises a genuine permission denial rather than a filesystem curiosity.Reproduced and verified in a
node:22-slimcontainer as a non-root user: 740/740 on Linux, matching macOS. The resulting tree is byte-identical to the head of #25, which passed all four CI jobs green.For whoever writes the next store test: an "obviously bad path" fixture has to be bad in the same way on every platform the suite runs on, or it is testing the platform rather than the code.