[PR #512] [MERGED] fix(replay): preserve Date call and explicit constructor semantics #2038

Closed
opened 2026-10-16 21:13:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/512
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: fix/replay-date-compatibility-20261004


📝 Commits (2)

  • bbb4426 fix(replay): preserve Date call and explicit constructor semantics
  • 1e2eaf5 Merge origin/main into fix/replay-date-compatibility-20261004

📊 Changes

2 files changed (+48 additions, -3 deletions)

View changed files

📝 src/replay/JavaScriptReplayWorker.ts (+13 -3)
📝 tests/boundary/providers/replay/javascriptReplayWorker.test.ts (+35 -0)

📄 Description

Change

Summary

Preserve standard explicit-argument Date construction and callable Date() behavior in the deterministic JavaScript replay worker. Zero-argument construction and Date.now() keep the configured replay clock.

The current Date subclass accepts only the first constructor argument, so new Date(2020, 0, 2) reports a year around 1970 instead of 2020. Calling Date() also throws because the replacement is a class. Both change ordinary selected-module observations.

Verification

  • Actual compiled production worker subprocess: before 4 failed / 15 passed; after 20 passed (including an added subclass/prototype control).
  • Explicit numeric/string constructors, milliseconds, callable Date, fixed clock, UTC, instanceof, and subclass/prototype controls.
  • Pinned TypeScript/build and repository lint pass.
  • Full repository/package gates recorded before publication.

This verifies the disposable worker process directly. It does not claim Linux Bubblewrap/systemd sandbox or original-application verification.

Reproduction and verification

4 failed/15 passed → 20 passed

  • npm run check:pr: passed (Test Files 352 passed (352); Tests 1809 passed | 2 skipped (1811)).
  • npm run check:ci: passed.
  • npm run verify:package: passed installed-tarball CLI/MCP verification, including optional-dependency degradation.
  • npm pack --dry-run: passed.
  • Exact lockfile installation on Node 24.18.0 and npm 11.16.0.

These tests exercise the production seams described above. No real Hopper, Ghidra, desktop browser or Linux sandbox end-to-end verification is claimed.

Prepared with AI assistance; the reproductions and verification commands above were executed locally.

Matching Linux replay lane

The unchanged upstream real-javascript-replay.yml workflow was dispatched on the exact signed head in the fork: run 37264855459. It completed successfully with the upstream REA_REPLAY_ALLOW_UNAVAILABLE=true setting, but its verifier payload was available:false, AnalysisCapabilityUnavailableError. This is a degraded prerequisite result, not positive Linux sandbox execution verification. The failing-before/passing-after compiled worker regressions above remain separate evidence; no Linux sandbox end-to-end proof is claimed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/512 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/replay-date-compatibility-20261004` --- ### 📝 Commits (2) - [`bbb4426`](https://github.com/morluto/rea/commit/bbb4426c99f661adf254402d757af9a22aff0d5b) fix(replay): preserve Date call and explicit constructor semantics - [`1e2eaf5`](https://github.com/morluto/rea/commit/1e2eaf5ce440de65ee854741b772c67c193323b3) Merge origin/main into fix/replay-date-compatibility-20261004 ### 📊 Changes **2 files changed** (+48 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/replay/JavaScriptReplayWorker.ts` (+13 -3) 📝 `tests/boundary/providers/replay/javascriptReplayWorker.test.ts` (+35 -0) </details> ### 📄 Description ## Change ## Summary Preserve standard explicit-argument Date construction and callable `Date()` behavior in the deterministic JavaScript replay worker. Zero-argument construction and `Date.now()` keep the configured replay clock. The current Date subclass accepts only the first constructor argument, so `new Date(2020, 0, 2)` reports a year around 1970 instead of 2020. Calling `Date()` also throws because the replacement is a class. Both change ordinary selected-module observations. ## Verification - Actual compiled production worker subprocess: before 4 failed / 15 passed; after 20 passed (including an added subclass/prototype control). - Explicit numeric/string constructors, milliseconds, callable Date, fixed clock, UTC, instanceof, and subclass/prototype controls. - Pinned TypeScript/build and repository lint pass. - Full repository/package gates recorded before publication. This verifies the disposable worker process directly. It does not claim Linux Bubblewrap/systemd sandbox or original-application verification. ## Reproduction and verification 4 failed/15 passed → 20 passed - `npm run check:pr`: passed (Test Files 352 passed (352); Tests 1809 passed | 2 skipped (1811)). - `npm run check:ci`: passed. - `npm run verify:package`: passed installed-tarball CLI/MCP verification, including optional-dependency degradation. - `npm pack --dry-run`: passed. - Exact lockfile installation on Node 24.18.0 and npm 11.16.0. These tests exercise the production seams described above. No real Hopper, Ghidra, desktop browser or Linux sandbox end-to-end verification is claimed. Prepared with AI assistance; the reproductions and verification commands above were executed locally. ## Matching Linux replay lane The unchanged upstream `real-javascript-replay.yml` workflow was dispatched on the exact signed head in the fork: [run 37264855459](https://github.com/rudycelekli/rea/actions/runs/37264855459). It completed successfully with the upstream `REA_REPLAY_ALLOW_UNAVAILABLE=true` setting, but its verifier payload was `available:false`, `AnalysisCapabilityUnavailableError`. This is a degraded prerequisite result, **not positive Linux sandbox execution verification**. The failing-before/passing-after compiled worker regressions above remain separate evidence; no Linux sandbox end-to-end proof is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2038
No description provided.