fd-path regression test hardcodes /proc/self/fd — Linux-only, breaks the suite on macOS #37

Closed
opened 2026-07-13 22:51:29 +00:00 by dan-claude-bot · 0 comments
dan-claude-bot commented 2026-07-13 22:51:29 +00:00 (Migrated from github.com)

Follow-up from the review of #35.

The regression test added in #35 (test/secrets.test.ts, "accepts a key path only this process can resolve") builds the injected path as:

decryptSecrets(enc, `/proc/self/fd/${fd}`)

/proc doesn't exist on macOS, so the test fails there — and cast runs on the operator's workstation, which may be a Mac. /dev/fd/${fd} resolves on both platforms (on Linux it's a symlink to /proc/self/fd), and it's also closer to what bash actually expands <(…) to.

One-line fix:

decryptSecrets(enc, `/dev/fd/${fd}`)

While in there, consider the FIFO-shaped companion test noted in #36 — the current fixture is a regular file, so it reproduces the path only resolvable in-process shape but not the read-once pipe shape of a real process substitution.

🤖 Generated with Claude Code

Follow-up from the review of #35. The regression test added in #35 (`test/secrets.test.ts`, "accepts a key path only this process can resolve") builds the injected path as: ```ts decryptSecrets(enc, `/proc/self/fd/${fd}`) ``` `/proc` doesn't exist on macOS, so the test fails there — and cast runs on the **operator's workstation**, which may be a Mac. `/dev/fd/${fd}` resolves on both platforms (on Linux it's a symlink to `/proc/self/fd`), and it's also closer to what bash actually expands `<(…)` to. One-line fix: ```ts decryptSecrets(enc, `/dev/fd/${fd}`) ``` While in there, consider the FIFO-shaped companion test noted in #36 — the current fixture is a regular file, so it reproduces the *path only resolvable in-process* shape but not the *read-once pipe* shape of a real process substitution. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/cast#37
No description provided.