Skip to content

Reuse source preparation during class candidate replay - #521

Merged
CaelmBleidd merged 1 commit into
mainfrom
caelmbleidd/calls-replay-preparation-cache
Oct 15, 2026
Merged

CaelmBleidd merged 1 commit into
mainfrom
caelmbleidd/calls-replay-preparation-cache

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Real class cells recreate the complete original and instrumented TypeScript replay workspace for every candidate. In the Perm pilot, 144 completed candidate pairs spent a median 1,238 ms each, while their two native executions accounted for about 432 ms. A 30-second search produced 1,839 candidates, so repeated source preparation substantially delayed native validation.

Prepare each original/instrumented scenario lazily once per cell and reuse that preparation for its subsequent candidates. Every candidate still executes in a fresh supervised Node.js process with its own timeout; input transport, source verification, original/instrumented agreement, class statement universe, ordered durable journals, and resume validation are unchanged. Cached workspaces close together when the replay stage finishes or fails. The cache retains at most two workspaces per encountered scenario until then.

Validation: the two focused regressions pass, covering fresh module state and coverage counters across repeated inputs, and a hard timeout followed by a successful input without a stale observation. Calls Detekt main/test report zero findings; git diff --check passes. No symbolic machine run or full local suite was performed for this change. End-to-end throughput improvement still needs measurement on the real cohort.

@CaelmBleidd
CaelmBleidd force-pushed the caelmbleidd/calls-replay-preparation-cache branch from 6833851 to 35703bd Compare October 15, 2026 13:52
@CaelmBleidd
CaelmBleidd merged commit e9edc82 into main Oct 15, 2026
6 checks passed
@CaelmBleidd
CaelmBleidd deleted the caelmbleidd/calls-replay-preparation-cache branch October 15, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant