Skip to content

Add deterministic repro bundle recording and headless replay#58

Merged
RtlZeroMemory merged 1 commit into
mainfrom
epic-06-record-replay-gate
Feb 16, 2026
Merged

Add deterministic repro bundle recording and headless replay#58
RtlZeroMemory merged 1 commit into
mainfrom
epic-06-record-replay-gate

Conversation

@RtlZeroMemory

Copy link
Copy Markdown
Owner

Summary

  • add a versioned rezi-repro-v1 schema with strict validation and deterministic stable serialization in @rezi-ui/core
  • add createReproRecorder in @rezi-ui/node to capture bounded backend event batches (maxBatches, maxEvents, maxBytes) with deterministic truncation metadata and return bundle object/bytes without filesystem writes
  • add a headless replay harness in core that replays recorded batches through createApp using a stub backend, captures routed actions, and reports PASS/FAIL with structured mismatches
  • add a committed repro fixture (packages/testkit/fixtures/repro/replay_resize_tab_text.json) and deterministic replay tests (PASS path + failure diff path + invariant checks)
  • document record/replay usage, schema fields, determinism, and privacy notes in docs/guide/record-replay.md

Why

This makes bug reports reproducible in CI by recording deterministic input/resize sessions and replaying them headlessly with assertable routing outcomes.

Validation

  • npm run lint
  • npm run typecheck
  • npm run build
  • npm test
  • npm run test:e2e
  • npm run test:e2e:reduced
  • npm run test:native:smoke

@RtlZeroMemory
RtlZeroMemory merged commit ba54e6b into main Feb 16, 2026
15 of 16 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 726381bd46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

),
);

if (!bundle.eventCapture.batches.some((batch) => batch.resizeEvents.length > 0)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Inject bootstrap resize when first batch lacks viewport event

This condition only prepends a synthetic resize when no batch in the bundle has resize metadata, so bundles that contain a resize later (but start with key/text input) are replayed without an initial committed viewport. In that scenario createApp cannot build the first frame before the later resize arrives, so early routable events are dropped and the harness reports action mismatches for otherwise valid recordings (for example, captures started after app bootstrap).

Useful? React with 👍 / 👎.

Comment on lines +806 to +810
while (
replayBackend.state.releasedRealBatches.value < replayBackend.totalRealBatches &&
fatal === null &&
spins < 4000
) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Replace fixed spin cap with replay-completion waiting

The harness exits the drain loop after spins < 4000 even if batches are still being processed, then turns that into ZR_REPLAY_TIMEOUT. Because capture bounds are configurable and scheduler throughput is workload-dependent, larger or slower replays can fail with a timeout despite making forward progress, which creates false FAIL results unrelated to routing correctness.

Useful? React with 👍 / 👎.

@RtlZeroMemory
RtlZeroMemory deleted the epic-06-record-replay-gate branch February 19, 2026 17:45
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