test(safe-js): verify each replay checkpoint independently - #720
Conversation
e3114c3 to
8f59f4b
Compare
The co scenario combined seven interpreter executions into one five-second case. Exact PR719 reproduction failed that deadline; phase tracing measured 6.78 seconds, dominated by retained-data accounting during repeated runs. Parameterize public, signal, and completed checkpoint contracts with independent setup. Preserve native output, pending-boundary, replay, recapture, immutability, receipt, and no-reexecution assertions without changing timeouts or concurrency. Validation: original focused file reproduced 18 passes and one timeout; revised file passes all 29 cases. The three co cases took 2184ms, 2099ms, and 2126ms under Node20 with the maintained package configuration.
8f59f4b to
a9dc74c
Compare
|
Closing as superseded by the runtime performance fix already on main ( Fresh review confirmed that each existing checkpoint replay already restores an independent snapshot and uses fresh host/request state; no state-isolation defect was demonstrated. This patch redistributes work across test deadlines and increases interpreter runs from seven to nine per scenario. Current main was qualified by the full maintained npm test on The PR was reviewed but its test-overhead tradeoff is no longer needed for the reported timeout. |
The generator workflow (
co) runs seven interpreter executions inside one five-second test. The exact PR719 focused file reproduces its CI timeout. Phase tracing measured 6.78 seconds cumulatively, with each interpreter run around 0.8–1.1 seconds; snapshot capture adds about 20–30 milliseconds.Test each scenario's public, signal, and completed checkpoint as a complete independent case. Each gets fresh native execution and setup, preserves all capture validations, and verifies its selected replay, recapture, snapshot immutability, receipts, and absence of repeated host effects. Runtime behavior, timeouts, concurrency, and assertions are unchanged.
Validation: the original focused file failed with 18 passes and one five-second timeout. The revised file passes all 29 cases under Node20.20.0 and the maintained SafeJS package configuration; the three
cocases took 2184ms, 2099ms, and 2126ms. A bounded profile attributes most execution time to retained-root collection and recursive data measurement; this PR makes no runtime optimization. CI on the new head remains required.This one-file PR now starts from current main
ede5985e5e2b35b38eebd0faaeb3ed6a390493e9, which already contains PR715’s explicit provider models, Kimi registration, built MCP fixture, and Goose catalog fixes. The checkpoint test was unchanged on main. After restoring the updated lockfile dependencies, the rebased change ata9dc74cdce2cebcd3e42c34111efc3e59058cadcpasses all 29 focused cases; the threecocases take 1216ms, 1127ms, and 1182ms under Node20.20.0 with the maintained configuration. Fresh combined CI remains required.The earlier baseline/profile evidence below remains tied to PR719’s source and the original test change; the screenshot is historical evidence at its explicitly labeled commit.
Diagnostic test evidence
Actual saved local baseline, phase-trace, and passing-test excerpts, rendered without rerunning tests. The source/config invariance described above ties this evidence to the one-file change at
8f59f4bdd456fdb478202dc89984ca8466aaac74. This is diagnostic evidence, not product UI or hosted CI clearance.