Skip to content

Commit e999710

Browse files
NathanFlurryclaude
andcommitted
chore: update progress for US-066
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 491c884 commit e999710

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

scripts/ralph/prd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,8 +1390,8 @@
13901390
"Tests pass"
13911391
],
13921392
"priority": 71,
1393-
"passes": false,
1394-
"notes": "Spec: docs-internal/specs/v8-context-snapshot.md Phase 9."
1393+
"passes": true,
1394+
"notes": "36 tests across 2 files: V8-level (17 tests in packages/secure-exec-v8/test/context-snapshot-behavior.test.ts) covers getter FS facade, config application, bridge infrastructure (sync/async), polyfill bridge, exec/run results, session isolation. NodeRuntime-level (19 tests in packages/secure-exec/tests/runtime-driver/node/context-snapshot-behavior.test.ts) covers timing mitigation freeze/off, console routing, CJS file globals, SharedArrayBuffer removal, exec/run correctness. Pre-existing CJS globals issue (require/module undefined) prevents some ACs from being tested at NodeRuntime level — covered at V8 IPC level instead."
13951395
},
13961396
{
13971397
"id": "US-067",

scripts/ralph/progress.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,3 +515,27 @@ Started: Wed Mar 18 06:52:02 PM PDT 2026
515515
- `_loadPolyfill` is called lazily inside `require()`, not during bridge IIFE setup — no eager polyfill loading needed in post-restore script
516516
- Wire format change: Execute now has `[bc_len(u32)][bc][prs_len(u32)][prs][user_code(rest)]` — post_restore_script uses u32 length prefix before user_code
517517
---
518+
519+
## 2026-03-19 - US-066
520+
- Added 36 context snapshot behavior tests across two test files
521+
- V8-level tests (17 tests, `packages/secure-exec-v8/test/context-snapshot-behavior.test.ts`):
522+
- Getter-based FS facade: `_fsReadFile` dispatches to session-local bridge, each session gets own binding
523+
- Config application: `_processConfig` and `_osConfig` set from execution options
524+
- Bridge infrastructure: sync bridge returns/throws, async bridge resolves/rejects, `_log` dispatch
525+
- Polyfill bridge: `_loadPolyfill` callable
526+
- Timing: `Date.now()` returns reasonable timestamp at V8 level
527+
- Exec/run results: exit code 0, structured errors (TypeError, SyntaxError), ESM exports, sequential executions, session isolation
528+
- NodeRuntime-level tests (19 tests, `packages/secure-exec/tests/runtime-driver/node/context-snapshot-behavior.test.ts`):
529+
- Timing mitigation freeze: Date.now frozen, Date constructor frozen, SharedArrayBuffer removed, off mode preserves real Date
530+
- Console bridge: stdout, stderr, warn routing, multiple args, circular refs
531+
- CJS file globals: __filename/__dirname available with filePath
532+
- Exec/run: exit code 0, structured errors, syntax errors, ESM default/named exports, sequential exec, error recovery
533+
- Files created: `packages/secure-exec-v8/test/context-snapshot-behavior.test.ts`, `packages/secure-exec/tests/runtime-driver/node/context-snapshot-behavior.test.ts`
534+
- **Learnings for future iterations:**
535+
- CJS globals (require, module, process, crypto) are NOT available at the NodeRuntime exec level — this is a pre-existing issue where the bridge IIFE's CJS module initialization fails silently
536+
- Timing mitigation freeze (Date constructor, SharedArrayBuffer removal) requires the bridge IIFE JS code — cannot test at raw V8 level without bridge code
537+
- V8-level tests in `packages/secure-exec-v8/test/` cannot import from `@secure-exec/node` since it's not a dependency — test bridge behaviors with simple bridge code strings instead
538+
- Pre-existing SIGSEGV when running `execution::tests` AND `snapshot::tests` together — must run separately: `cargo test execution::tests -- --test-threads=1` and `cargo test snapshot::tests -- --test-threads=1`
539+
- Pre-existing test-suite failure: CJS `module.exports` in `run()` returns undefined (1/6 failing in test-suite/node.test.ts)
540+
- Pre-existing runtime-driver/node failures: ~100/116 tests fail due to require/module being undefined
541+
---

0 commit comments

Comments
 (0)