fix(dispatch): the child /tmp tmpfs allows exec (ISS-5) #123

Merged
janpeter merged 1 commit from fix/iss5-child-tmp-exec into master 2026-10-08 23:48:09 +02:00
Owner

Fixes ISS-5: the dispatch reviewer could not run vitest.

buildContainerArgs gave the child --tmpfs /tmp:rw,nosuid,nodev,size=256m. Docker makes a --tmpfs noexec unless exec is given, so npm ci and vitest failed in the child: native bindings ("failed to map segment from shared object") and executable test stubs (EACCES). Every review of #118, #120 and #121 reported the suite as unverified for this reason.

Change

  • The child's /tmp is now rw,exec,nosuid,nodev,size=256m, with a test and an operator-doc paragraph.
  • noexec was no boundary: /output and /work are bind mounts that the child can already write to and execute from.

Evidence

I ran node:22-bookworm with the child's flags (--read-only --cap-drop ALL --security-opt no-new-privileges --user 10001:10001, HOME=/tmp/home) and this repo copied into /tmp:

/tmp options npm ci vitest /tmp used
rw,nosuid,nodev,size=256m (before) fails does not start 31 MB
rw,exec,nosuid,nodev,size=256m ok runs: 1313 passed, 5 failed, 10 skipped 112 MB

I did not analyse the 5 failures; they are probably from the probe environment (a copy without .git, no docker).

Verification

  • npm run typecheck:dispatch is green.
  • npx vitest run: 1305 passed, 8 skipped, 2 failed. The 2 failures are the known macOS-only transcript-retention tests, identical on master.

After deploy

The proof is a review that actually runs vitest. Size stays 256 MB (JP's decision); repos larger than this one (scrum4me-mcp, Scrum4Us) still need measuring, because the tmpfs counts against the profile's memory_mb (2048).

🤖 Generated with Claude Code

Fixes ISS-5: the dispatch reviewer could not run vitest. `buildContainerArgs` gave the child `--tmpfs /tmp:rw,nosuid,nodev,size=256m`. Docker makes a `--tmpfs` **noexec** unless `exec` is given, so `npm ci` and vitest failed in the child: native bindings ("failed to map segment from shared object") and executable test stubs (EACCES). Every review of #118, #120 and #121 reported the suite as unverified for this reason. ## Change - The child's `/tmp` is now `rw,exec,nosuid,nodev,size=256m`, with a test and an operator-doc paragraph. - `noexec` was no boundary: `/output` and `/work` are bind mounts that the child can already write to and execute from. ## Evidence I ran `node:22-bookworm` with the child's flags (`--read-only --cap-drop ALL --security-opt no-new-privileges --user 10001:10001`, `HOME=/tmp/home`) and this repo copied into `/tmp`: | `/tmp` options | `npm ci` | vitest | `/tmp` used | |---|---|---|---| | `rw,nosuid,nodev,size=256m` (before) | fails | does not start | 31 MB | | `rw,exec,nosuid,nodev,size=256m` | ok | runs: 1313 passed, 5 failed, 10 skipped | 112 MB | I did not analyse the 5 failures; they are probably from the probe environment (a copy without `.git`, no docker). ## Verification - `npm run typecheck:dispatch` is green. - `npx vitest run`: 1305 passed, 8 skipped, 2 failed. The 2 failures are the known macOS-only `transcript-retention` tests, identical on master. ## After deploy The proof is a review that actually runs vitest. Size stays 256 MB (JP's decision); repos larger than this one (scrum4me-mcp, Scrum4Us) still need measuring, because the tmpfs counts against the profile's `memory_mb` (2048). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(dispatch): the child's /tmp tmpfs allows exec (ISS-5)
All checks were successful
CI / Compose config (pull_request) Successful in 9s
CI / Build-arg coverage (pull_request) Successful in 9s
CI / Docker build (pull_request) Successful in 2m50s
37c9d0b700
Docker makes a --tmpfs noexec unless 'exec' is given, so in the dispatch
child npm ci and vitest failed for reviewers (native bindings, executable
test stubs) and every review reported the suite as unverified. Measured with
the child's flags (read-only rootfs, cap-drop ALL, no-new-privileges, uid
10001): noexec, npm ci of this repo fails; exec, it succeeds and vitest runs
(112 MB of the 256 MB /tmp). noexec was no boundary: /output and /work are
bind mounts the child already writes and executes in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s4m-codex-reviewer left a comment

COMMENT

Geen blokkerende codefinding gevonden in de drie gewijzigde bestanden op commit 37c9d0b7005cee0926638b8bb0c090059ac0c717. De expliciete exec-optie behoudt nosuid, nodev, de 256 MB-grens en de overige containerisolatie. De wijziging past in de bestaande centrale argumentbouwer; de test en operator-documentatie sluiten erop aan. De beschikbare productarchitectuur geeft geen strijdige eis.

Findings

  • INFO — tests/dispatch-runtime.test.ts:16 — De regressietest controleert de juiste mountopties, maar uitvoering kon hier niet worden bevestigd: /tmp is noexec, waardoor Vitest zijn native binding niet kan laden. Docker ontbreekt voor een integratietest. Ook de typecheck is niet groen: de clone mist vendor/scrum4me-shared en rapporteert overige typefouten buiten deze diff. Dit zijn verificatiebeperkingen, geen aangetoonde regressies; daarom het veilige verdict COMMENT.

git diff --check slaagt. De in de docs vermelde praktijktest is niet onafhankelijk herhaald.

geen gekoppeld plan gevonden — beoordeeld op codekwaliteit + product-standaarden.

# COMMENT Geen blokkerende codefinding gevonden in de drie gewijzigde bestanden op commit `37c9d0b7005cee0926638b8bb0c090059ac0c717`. De expliciete `exec`-optie behoudt `nosuid`, `nodev`, de 256 MB-grens en de overige containerisolatie. De wijziging past in de bestaande centrale argumentbouwer; de test en operator-documentatie sluiten erop aan. De beschikbare productarchitectuur geeft geen strijdige eis. ## Findings - **INFO — __tests__/dispatch-runtime.test.ts:16** — De regressietest controleert de juiste mountopties, maar uitvoering kon hier niet worden bevestigd: `/tmp` is `noexec`, waardoor Vitest zijn native binding niet kan laden. Docker ontbreekt voor een integratietest. Ook de typecheck is niet groen: de clone mist `vendor/scrum4me-shared` en rapporteert overige typefouten buiten deze diff. Dit zijn verificatiebeperkingen, geen aangetoonde regressies; daarom het veilige verdict `COMMENT`. `git diff --check` slaagt. De in de docs vermelde praktijktest is niet onafhankelijk herhaald. geen gekoppeld plan gevonden — beoordeeld op codekwaliteit + product-standaarden.
janpeter merged commit fc1ce310ea into master 2026-10-08 23:48:09 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
janpeter/scrum4me-docker!123
No description provided.