Skip to content

Commit 66ec71a

Browse files
committed
chore: update progress for US-192
1 parent 112214f commit 66ec71a

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

progress.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,3 +2421,19 @@ PRD: ralph/kernel-hardening (46 stories)
24212421
- UpgradeSocket.destroy/close must emit 'close' with false argument (hadError=false) for ws compatibility
24222422
- applySync from within applySync (host→sandbox→host reentrance) works in isolated-vm — the host Reference callback runs synchronously
24232423
---
2424+
2425+
## 2026-03-19 - US-192
2426+
- Created shared Docker container test utility at packages/secure-exec/tests/utils/docker.ts
2427+
- startContainer(image, opts) accepts port mappings, env vars, health check command, timeout
2428+
- Returns { containerId, host, port, ports, stop() } — stop() is idempotent
2429+
- skipUnlessDocker() skip helper follows project convention (returns string | false)
2430+
- Auto-pulls images not present locally via execFileSync
2431+
- Health check loop with configurable timeout (default 30s) and interval (default 500ms)
2432+
- Self-test at packages/secure-exec/tests/utils/docker.test.ts (4 tests: basic start/exec/stop, port mapping, health check, env vars)
2433+
- Files changed: packages/secure-exec/tests/utils/docker.ts, packages/secure-exec/tests/utils/docker.test.ts
2434+
- **Learnings for future iterations:**
2435+
- Use execFileSync (not execSync with args.join(" ")) for docker CLI calls — shell interpretation breaks commands containing spaces, semicolons, pipes
2436+
- Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms) is a clean synchronous sleep without spawning a shell process
2437+
- Docker port output format is "0.0.0.0:12345" — match /:(\d+)$/m to extract the host port
2438+
- afterAll cleanup in container tests ensures containers are removed even on test failure
2439+
---

scripts/ralph/prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3314,7 +3314,7 @@
33143314
"Tests pass"
33153315
],
33163316
"priority": 192,
3317-
"passes": false,
3317+
"passes": true,
33183318
"notes": "Shared by ioredis, mysql2, and any future DB fixture. Uses child_process.execSync to call docker CLI. Must clean up containers even on test failure (use afterAll/finally)."
33193319
},
33203320
{

0 commit comments

Comments
 (0)