GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — V8: no JS assert at a context load of a variable the replay moved from the stack by Domiii · Pull Request #335 · replayio/node

Conversation

@Domiii

@Domiii Domiii commented Nov 26, 2026

Copy link
Copy Markdown

🤖 Draft. Do not merge.

Summary

  • RECORD_REPLAY_JS_ASSERTS=1 replays of node recordings fail with LinkerMismatch at the first context load of a variable the replay moved from the stack.
  • Fix: such a load asserts nothing, as the recording's register read asserts nothing.
  • This makes the JS-asserts mode usable again on node V8 14.6.

V8: JS asserts at replay-only context loads

  • While replaying, force-variable-context-allocation puts forced variables in a context.
    • Scope::MustAllocateInContext marks those a recording keeps on the stack with RecordReplaySetMovedFromStack.
    • Parameters and declared variables are both covered: both are forced in Scope::DeclareParameter and Scope::DeclareVariable.
  • A recording reads such a variable with Ldar, which has no assert.
  • The replay reads it with Lda*ContextSlot, and BytecodeArrayBuilder::LoadContextSlot asserts every context load.
    • The replay therefore has one assert more than the recording at each such load.
    • The first one is a Mismatch: the replayed LoadContextSlot is compared with the recording's next assert.
  • BytecodeArrayBuilder::LoadContextSlot now skips the assert when RecordReplayIsMovedFromStack().
    • The predicate matches "a recording reads this from a register" exactly: it is set only while replaying, and only for variables nothing captures.
    • Variables in a context in both runs keep their assert, including loads at another depth.
    • Unreferenced forced variables are never loaded.
    • No other assert depends on where a variable is allocated: stores and register loads have none.

Data

  • Sandbox 1990, node-recording suite with RECORD_REPLAY_JS_ASSERTS=1:
    • The same 27 mismatches on base ea8679b712d5 and on N4a.
    • In all 27, the replayed side is … LoadContextSlot Value ….
    • The recorded side is the following assert (Parameter, SetKeyedProperty, CallProperty, NewDependencyGraphNode, NewBookmark).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Domiii
V8: assert no context load of a variable the replay moved from the stack
ee95f95
@Domiii Domiii self-assigned this Nov 26, 2026
Domiii added 2 commits November 27, 2026 04:04
@Domiii
TEST: pin backend 6b4d86a0dbea (be#14523); JS + DG asserts in test-no…
e2d383e
…de-recording
@Domiii
Revert "TEST: pin backend 6b4d86a0dbea (be#14523); JS + DG asserts in…
ef9410b
… test-node-recording"

This reverts commit e2d383e.
@Domiii
Domiii merged commit bed3009 into dominik/demo-integration Nov 27, 2026
2 of 3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Domiii
Domiii deleted the dominik/rt3a-js-assert-moved-context-load branch November 27, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Domiii Domiii

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Domiii
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.