Skip to content

Commit 36720ea

Browse files
NathanFlurryclaude
andcommitted
chore: add US-110–115 for pre-existing test failures found during rebase
Stories cover: - US-110: Kernel PTY flaky test - US-111: Node RuntimeDriver test failures (11/25) - US-112: V8 crash isolation test timeouts - US-113: Crossterm vendor patch auto-apply - US-114: C parity WASM exit code 17 - US-115: secure-exec test suite cascade fix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ee2cc72 commit 36720ea

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

scripts/ralph/prd.json

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,6 +2190,103 @@
21902190
"priority": 109,
21912191
"passes": false,
21922192
"notes": "Document the fork at rivet-dev/codex as Tier 3 (full fork) in wasmvm/CLAUDE.md. List all changes made: cfg gates for sandbox/PTY/tokio, host_process spawn replacement, wasi-http replacement for reqwest, crossterm WASI patch. This documentation must be accurate to what was actually implemented — do not document features that were not built."
2193+
},
2194+
{
2195+
"id": "US-110",
2196+
"title": "Fix kernel PTY flaky test — single large write EAGAIN",
2197+
"description": "As a developer, I need the PTY adversarial stress test to pass reliably so CI stays green.",
2198+
"acceptanceCriteria": [
2199+
"test/resource-exhaustion.test.ts 'single large write (1MB+) — immediate EAGAIN, no partial buffering' passes reliably",
2200+
"The test at line ~270 (readResolved check) must account for timing — a large write may be partially buffered before EAGAIN",
2201+
"All other resource-exhaustion tests continue to pass",
2202+
"Typecheck passes",
2203+
"Tests pass"
2204+
],
2205+
"priority": 110,
2206+
"passes": false,
2207+
"notes": "Pre-existing flaky test on main. The test writes 1MB+ to a PTY master and expects immediate EAGAIN with no buffering, but the PTY ring buffer can accept some data before blocking. Fix the assertion or the PTY behavior to be deterministic. File: packages/kernel/test/resource-exhaustion.test.ts"
2208+
},
2209+
{
2210+
"id": "US-111",
2211+
"title": "Fix Node RuntimeDriver kernel integration tests",
2212+
"description": "As a developer, I need the Node RuntimeDriver tests to pass so the runtime-node package CI is green.",
2213+
"acceptanceCriteria": [
2214+
"test/driver.test.ts 'node -e executes inline code and exits 0' passes",
2215+
"test/driver.test.ts 'node -e captures stdout' passes",
2216+
"test/driver.test.ts 'node script reads from VFS' passes",
2217+
"test/driver.test.ts 'node -p evaluates expression' passes",
2218+
"test/driver.test.ts 'KernelCommandExecutor routing' test passes",
2219+
"test/driver.test.ts stdin streaming tests pass (writeStdin, closeStdin)",
2220+
"test/driver.test.ts exploit/abuse path tests pass (readFileSync /etc/passwd, symlink traversal, relative traversal, concurrent PIDs)",
2221+
"All 25 tests in packages/runtime/node/test/driver.test.ts pass",
2222+
"Typecheck passes"
2223+
],
2224+
"priority": 111,
2225+
"passes": false,
2226+
"notes": "Pre-existing on main — 11 of 25 tests fail. The kernel integration tests (node -e, node -p, node script) fail because the V8 runtime process spawn or session setup has issues. The exploit/abuse tests fail because fs.readFileSync errors return code:undefined instead of code:EACCES. The concurrent PID test returns 'err' for all 12 spawns. Investigate whether these are V8 runtime integration issues or test setup problems."
2227+
},
2228+
{
2229+
"id": "US-112",
2230+
"title": "Fix V8 crash isolation test timeouts",
2231+
"description": "As a developer, I need the V8 crash isolation tests to complete within the timeout so CI passes.",
2232+
"acceptanceCriteria": [
2233+
"test/crash-isolation.test.ts 'OOM error is surfaced as ExecutionResult' passes within 30s",
2234+
"test/process-isolation.test.ts 'crashed runtime reports ERR_V8_PROCESS_CRASH' passes within 30s",
2235+
"All other V8 tests continue to pass (57 passing + 74 skipped currently)",
2236+
"Typecheck passes"
2237+
],
2238+
"priority": 112,
2239+
"passes": false,
2240+
"notes": "Pre-existing on main. Both tests timeout at 30s. The V8 process crash detection path may be too slow or the IPC cleanup on crash doesn't resolve quickly enough. Investigate whether the V8 binary's crash handling needs a faster exit path, or if the test timeout is too short for OOM scenarios. Files: packages/secure-exec-v8/test/crash-isolation.test.ts, packages/secure-exec-v8/test/process-isolation.test.ts"
2241+
},
2242+
{
2243+
"id": "US-113",
2244+
"title": "Fix crossterm vendor patch auto-apply in patch-vendor.sh",
2245+
"description": "As a developer, I need patch-vendor.sh to correctly detect and apply crossterm patches so make wasm succeeds on a fresh checkout.",
2246+
"acceptanceCriteria": [
2247+
"scripts/patch-vendor.sh correctly detects when crossterm patch needs applying (not falsely reporting 'already applied')",
2248+
"make wasm from a fresh vendor/ succeeds without manual patch application",
2249+
"The 'already applied' detection via patch -R --dry-run does not give false positives for patches that add new files",
2250+
"All existing patches still apply correctly",
2251+
"Typecheck passes"
2252+
],
2253+
"priority": 113,
2254+
"passes": false,
2255+
"notes": "The patch script uses 'patch -R --dry-run' to check if a patch is already applied. For patches that add new files (like crossterm WASI support which adds src/cursor/sys/wasi.rs etc.), the reverse check can succeed even when the patch was never applied, because reversing a file-add checks if the file doesn't exist (which is true). Fix: check for forward-apply first, only fall back to reverse check if forward-apply fails. Also ensure .cargo-checksum.json is nulled after patching. File: wasmvm/scripts/patch-vendor.sh"
2256+
},
2257+
{
2258+
"id": "US-114",
2259+
"title": "Fix C parity test WASM exit code 17 for non-patched programs",
2260+
"description": "As a developer, I need the C parity tests to pass for basic programs like hello, args, env, cat, wc, sort.",
2261+
"acceptanceCriteria": [
2262+
"C parity test 'hello: stdout and exit code match' passes (exit code 0, not 17)",
2263+
"C parity test 'args: argc and argv[1..] match' passes",
2264+
"C parity test 'env: user-specified env vars match' passes",
2265+
"C parity test 'cat: stdin passthrough matches' passes",
2266+
"C parity test 'wc: word/line/byte counts match' passes",
2267+
"C parity test 'sort: sorted output matches' passes",
2268+
"All Tier 1 and Tier 2 c-parity tests pass",
2269+
"Typecheck passes"
2270+
],
2271+
"priority": 114,
2272+
"passes": false,
2273+
"notes": "The C WASM programs exit with code 17 when run through the kernel. The issue is that ALL C programs (even simple ones like hello.c) are compiled against the patched wasi-libc sysroot which adds host_user.isatty import. The WasmVM kernel-worker.ts provides host_user imports, but the C programs may be trapping during initialization. Investigate: (1) whether the host_user imports are correctly provided for C-built WASM binaries, (2) whether the isatty import signature matches between C sysroot patch and kernel-worker.ts, (3) whether the WASI polyfill handles the C program's _start differently. Files: packages/runtime/wasmvm/src/kernel-worker.ts, wasmvm/c/Makefile, wasmvm/patches/wasi-libc/"
2274+
},
2275+
{
2276+
"id": "US-115",
2277+
"title": "Fix secure-exec main test suite failures from build cascade",
2278+
"description": "As a developer, I need the secure-exec main package test suite to pass so CI is green.",
2279+
"acceptanceCriteria": [
2280+
"pnpm turbo build succeeds for all packages including @secure-exec/core",
2281+
"pnpm --filter secure-exec test has zero test failures caused by build/import errors",
2282+
"The node runtime integration suite (tests/test-suite/node.test.ts) passes",
2283+
"The runtime-driver node tests pass",
2284+
"Python runtime tests may still fail if pyodide is not installed (acceptable skip)",
2285+
"Typecheck passes"
2286+
],
2287+
"priority": 115,
2288+
"passes": false,
2289+
"notes": "The secure-exec test suite has 500+ failures, but most cascade from @secure-exec/core build failure (now fixed by US-110's UpgradeSocket bridge refs commit). After rebuilding, verify the tests actually pass. Remaining failures may be from the node runtime driver issues (covered by US-111) or python runtime (PythonRuntime constructor errors, acceptable if pyodide not installed). Focus on getting the node integration suite green."
21932290
}
21942291
]
21952292
}

0 commit comments

Comments
 (0)