Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneeshammz

Relationships

≡ duplicated by #3084

#3082 isProcessGone always reports alive on Linux under the test task permissions, failing 9 tests on main

Opened by hammz · 10/6/2026· Shipped 10/6/2026

Summary

On Linux, isProcessGone (src/infrastructure/runtime/process.ts) first stats /proc/PID. Deno refuses any /proc access unless the process has all permissions, so under the permission flags the test task uses (allow-read, allow-run and so on, but not allow-all) the stat throws NotCapable rather than NotFound. The function treats any error other than NotFound as alive and returns false for every pid, including one no process can hold.

Reproduce (Linux, Deno 2.9.7 as pinned)

deno run test src/infrastructure/runtime/process_test.ts

The test 'isProcessGone: false for a live process, true for a pid no process can hold' fails on its third assertion: isProcessGone(2147483647) is false, expected true. Calling the same function from a script run with allow-all returns true, and with allow-read plus allow-run returns false; a direct Deno.statSync of the /proc path throws NotCapable in the restricted run.

Impact

Introduced with the swamp-club 2975 change (commit 5ba0b8fc, PR 2864). verify-build run-tests fails on Linux at the main tip with 9 failures (plus steps), all downstream of this: process_test.ts, the collectGarbage deferred-write tests in unified_data_repository_test.ts, the deferred property test, and the orphaned deferred write cases in integration/repository_dirty_coverage_test.ts. Any branch based on current main cannot pass local verification on Linux. It probably passed where it was written because macOS skips the /proc branch.

Production impact depends on the permissions the compiled binary runs with; if it has all permissions the /proc check works there and only the tests are affected.

Suggested fix

When the /proc stat throws anything other than NotFound (in particular NotCapable), fall through to the SIGURG probe instead of returning false. Found while verifying swamp-club 2946.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 8 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/6/2026, 3:57:37 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz10/6/2026, 3:39:12 PM
hammz linked duplicated by #308410/6/2026, 3:43:53 PM

Sign in to post a ripple.