Skip to content

Commit 75e3766

Browse files
committed
chore: update progress for US-061
1 parent 498ed3f commit 75e3766

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

scripts/ralph/prd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,8 +1298,8 @@
12981298
"Tests pass"
12991299
],
13001300
"priority": 66,
1301-
"passes": false,
1302-
"notes": "Spec: docs-internal/specs/v8-context-snapshot.md Phase 3."
1301+
"passes": true,
1302+
"notes": "Spec: docs-internal/specs/v8-context-snapshot.md Phase 3. composeStaticBridgeCode() uses DEFAULT values for all config (module-level cached). composePostRestoreScript() overrides per-session maxTimers, maxHandles, initialCwd, and calls __runtimeApplyConfig. composeBridgeCodeForWarmup() refactored to use both. Instance composeBridgeCode() refactored to use both. Exported from @secure-exec/node."
13031303
},
13041304
{
13051305
"id": "US-062",

scripts/ralph/progress.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,3 +432,19 @@ Started: Wed Mar 18 06:52:02 PM PDT 2026
432432
- Check if prerequisite stories were already completed as part of dependent stories before implementing
433433
- The generated `isolate-runtime.ts` is rebuilt by `build-isolate-runtime.mjs` and must match source
434434
---
435+
436+
## 2026-03-19 - US-061
437+
- Split `composeBridgeCode()` into static and post-restore parts for context snapshot support
438+
- Created `composeStaticBridgeCode()`: module-level exported function, cached, uses DEFAULT values for all config (maxTimers, maxHandles, initialCwd, payloadLimits). Output is byte-for-byte identical regardless of session options.
439+
- Created `composePostRestoreScript(config)`: module-level exported function that generates per-session config overrides (maxTimers, maxHandles, initialCwd, timingMitigation, payloadLimits) via `__runtimeApplyConfig()`
440+
- Refactored `composeBridgeCodeForWarmup()` to use `composeStaticBridgeCode() + composePostRestoreScript(defaultConfig)`
441+
- Refactored instance `composeBridgeCode()` to use `composeStaticBridgeCode() + composePostRestoreScript(sessionConfig)`
442+
- Removed instance `getBridgeIIFE()` method and `bridgeCodeCache` field (replaced by module-level `staticBridgeCodeCache`)
443+
- Exported `composeStaticBridgeCode` and `composePostRestoreScript` from `@secure-exec/node` package
444+
- Files changed: `packages/secure-exec-node/src/execution-driver.ts`, `packages/secure-exec-node/src/index.ts`
445+
- **Learnings for future iterations:**
446+
- `TimingMitigation` type is `"off" | "freeze"` — the old warmup used `"none"` as a raw string but the typed version requires `"off"`
447+
- `__runtimeApplyConfig` only checks for `"freeze"` — any other value is a no-op for timing, so `"off"` works the same as `"none"`
448+
- Static bridge code can be cached at module level since it's identical across all driver instances and sessions
449+
- Pre-existing test failures: test-suite/node (4 fails from `__name` conflict), runtime-driver/node (228 fails from `__name` conflict), V8 crash/process isolation (3 OOM timeouts)
450+
---

0 commit comments

Comments
 (0)