Skip to content

[Calls] Experiment with a missing input method in saved replay - #689

Draft
CaelmBleidd wants to merge 2 commits into
caelmbleidd/ts-preserve-sparse-array-witnessesfrom
caelmbleidd/calls-missing-method-experiment
Draft

CaelmBleidd wants to merge 2 commits into
caelmbleidd/ts-preserve-sparse-array-witnessesfrom
caelmbleidd/calls-missing-method-experiment

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

Adds an opt-in experiment to saved-input replay. It selects one recorded heap and takes an explicit observed TypeError for a literal method path. The original invocation runs first. When the error matches, a separate Node process restores the same heap and adds one missing own method to the recorded ordinary object. The added method returns undefined and records calls with the expected receiver.

The output contains original and alternative runs and an experimental verdict. The rejection observation window begins just before invocation, after source loading and heap restoration. It covers the microtask checkpoint and two setImmediate turns. Returning a Promise, throwing after the method runs, and observing an unhandled rejection have distinct outcomes.

Based on #640 for sparse saved heaps and #617 for saved-input restoration. The experiment uses the same prototype and environment restoration as class-replay-input.

calls class-experiment-missing-input-method manifest.json class-id probe-directory state-id 15000 observation.json report.json
{"fields":["service","missing"],"errorMessage":"this.service.missing is not a function"}

Local verification passed on JDK 21 and Node.js 26.5.0. Three standalone Node tests passed, and 23 Gradle tests passed across CallsMissingInputMethodExperimentTest, CallsClassStartSmokeTest, and CallsConcreteHeapTest. :usvm-ts-calls:installDist also completed.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

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.

2 participants