Skip to content

Commit 541344f

Browse files
NathanFlurryclaude
andcommitted
chore: update progress for US-055
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a9d5d3a commit 541344f

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

progress.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,3 +2706,18 @@ PRD: ralph/kernel-hardening (46 stories)
27062706
- extract_session_id must be updated whenever a new connection-level message type is added
27072707
- WarmSnapshot is fire-and-forget — host sends it and continues without waiting for response
27082708
---
2709+
2710+
## 2026-03-19 - US-055
2711+
- Wired SnapshotCache into session thread and connection handler
2712+
- SessionManager now owns Arc<SnapshotCache> (shared across connections)
2713+
- Session thread defers isolate creation from startup to first Execute (when bridge code is known for snapshot cache lookup)
2714+
- On first Execute: snapshot_cache.get_or_create(bridge_code) → create_isolate_from_snapshot() with fallback to create_isolate() on failure
2715+
- disable_wasm() called on every restored isolate (not captured in snapshot)
2716+
- Connection handler processes WarmSnapshot messages via snapshot_cache.get_or_create() (fire-and-forget, no response)
2717+
- main.rs creates global Arc<SnapshotCache>(max_entries=4) shared across all connections
2718+
- Files changed: crates/v8-runtime/src/session.rs, crates/v8-runtime/src/main.rs
2719+
- **Learnings for future iterations:**
2720+
- Deferred isolate creation (Option<OwnedIsolate>) requires updating all &mut v8_isolate references to use the unwrapped borrow (iso = v8_isolate.as_mut().unwrap())
2721+
- Drop cleanup for Option<OwnedIsolate> needs .take() instead of direct drop
2722+
- Pre-existing SIGSEGV on V8 teardown when multiple V8 test suites (snapshot, execution, bridge) run in same process — individual test suites all pass
2723+
---

scripts/ralph/prd.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,8 @@
932932
"Tests pass"
933933
],
934934
"priority": 55,
935-
"passes": false,
936-
"notes": "Spec: docs-internal/specs/v8-startup-snapshot.md. Isolate creation moves from session startup to first Execute (deferred until bridge code is known)."
935+
"passes": true,
936+
"notes": "Spec: docs-internal/specs/v8-startup-snapshot.md. Isolate creation deferred from session startup to first Execute. SessionManager owns Arc<SnapshotCache> shared with connection handler. Session thread uses snapshot_cache.get_or_create(bridge_code) on first Execute, falls back to create_isolate() on failure. disable_wasm() called on every restored isolate. WarmSnapshot handled in connection handler as fire-and-forget. All 87 V8 TS tests pass, all Rust tests pass (SIGSEGV on V8 teardown is pre-existing)."
937937
},
938938
{
939939
"id": "US-056",

0 commit comments

Comments
 (0)