Skip to content

Commit d9adc89

Browse files
committed
chore: update progress for US-059
1 parent 58cc119 commit d9adc89

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

scripts/ralph/prd.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,8 @@
12621262
"Tests pass"
12631263
],
12641264
"priority": 64,
1265-
"passes": false,
1266-
"notes": "Spec: docs-internal/specs/v8-context-snapshot.md Phase 1. Prerequisite for context snapshot."
1265+
"passes": true,
1266+
"notes": "Already implemented in prior iteration (getter-based Object.defineProperties in setup-fs-facade.ts and generated isolate-runtime.ts). All 19 fs functions covered. Typecheck passes (28/28), fs type tests pass (3/3)."
12671267
},
12681268
{
12691269
"id": "US-060",
@@ -1427,6 +1427,26 @@
14271427
"priority": 73,
14281428
"passes": false,
14291429
"notes": "Research story — no code changes required beyond documentation and profiling scripts."
1430+
},
1431+
{
1432+
"id": "US-085",
1433+
"title": "Fix V8 process cleanup hang on terminate/dispose",
1434+
"description": "As a developer, I need terminate() and dispose() on V8Runtime to cleanly shut down the Rust child process so the Node process can exit without hanging or requiring process.exit().",
1435+
"acceptanceCriteria": [
1436+
"After runtime.terminate(), the Rust child process exits within 5 seconds",
1437+
"After runtime.dispose(), no child process, socket, or file descriptor remains open",
1438+
"Node process exits cleanly after all runtimes are terminated — no hanging event loop",
1439+
"Remove process.exit(0) hacks from benchmarks/quick-bench.ts and benchmarks/coldstart.bench.ts",
1440+
"Investigate root cause: check for unclosed IPC socket, pending event listeners on child process, or unfinished async operations preventing Node exit",
1441+
"Add integration test: create runtime, run code, terminate, verify process exits cleanly without process.exit()",
1442+
"If SIGTERM is insufficient, add SIGKILL fallback after timeout",
1443+
"cargo test passes",
1444+
"Typecheck passes",
1445+
"Tests pass"
1446+
],
1447+
"priority": 76,
1448+
"passes": false,
1449+
"notes": "Workaround: benchmarks use process.exit(0) after completion. Root cause likely unclosed socket or event listener keeping Node event loop alive after terminate(). Related to US-076 (shared lifecycle) but distinct issue."
14301450
}
14311451
]
14321452
}

scripts/ralph/progress.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,15 @@ Started: Wed Mar 18 06:52:02 PM PDT 2026
420420
- Pre-existing test failures: runtime-driver/node tests all fail with "Identifier '__name' has already been declared" (unrelated to this story, pre-existing from console-formatter `__name` shim conflict)
421421
- V8 package tests (94/94) are the authoritative test for bridge code changes — they exercise the full IPC pipeline
422422
---
423+
424+
## 2026-03-19 - US-059
425+
- Verified getter-based delegation was already implemented in `setup-fs-facade.ts` (done in prior iteration alongside US-060)
426+
- All 19 fs bridge function names covered via `Object.defineProperties` with getters resolving `globalThis._fsXxx` at call time
427+
- Generated `isolate-runtime.ts` already contains the getter-based pattern
428+
- Verification: Typecheck passes (28/28), fs type tests pass (3/3)
429+
- No code changes needed — marked as complete
430+
- Files verified: `packages/secure-exec-core/isolate-runtime/src/inject/setup-fs-facade.ts`, `packages/secure-exec-core/src/generated/isolate-runtime.ts`
431+
- **Learnings for future iterations:**
432+
- Check if prerequisite stories were already completed as part of dependent stories before implementing
433+
- The generated `isolate-runtime.ts` is rebuilt by `build-isolate-runtime.mjs` and must match source
434+
---

0 commit comments

Comments
 (0)