[PR #522] [MERGED] fix(replay): preserve sparse array positions in result projection #2048

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

📋 Pull Request Information

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

Base: main ← Head: fix/replay-sparse-arrays-20261004


📝 Commits (1)

  • 30bfb75 fix(replay): preserve sparse array positions in result projection

📊 Changes

2 files changed (+56 additions, -0 deletions)

View changed files

📝 src/replay/JavaScriptReplayWorker.ts (+11 -0)
📝 tests/boundary/providers/replay/javascriptReplayWorker.test.ts (+45 -0)

📄 Description

Change

Summary

Preserve sparse-array positions in the disposable JavaScript replay worker's JSON projection. Fill holes with JSON nulls through the existing depth/node accounting.

Currently Array(3) becomes [] and [hole, 42, hole] becomes [null, 42], silently changing the returned array length. Arrays are supported result values; their holes must not remove trailing positions from the observation.

Verification

  • Actual compiled production worker subprocess: before 3 failed / 11 passed; after 14 passed.
  • Empty/all-hole/middle-value sparse arrays, dense and empty controls, and the configured node budget.
  • Pinned build, TypeScript and repository lint pass.
  • Full repository/package gates recorded separately before publication.

This is direct worker-process verification, not a Linux Bubblewrap/systemd or original-application verification claim.

Reproduction and verification

3 failed/11 passed

  • npm run check:pr: passed (Test Files 352 passed (352); Tests 1803 passed | 2 skipped (1805)).
  • 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.

actual compiled worker subprocess; not Linux sandbox end-to-end

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

Matching replay lane limitation

npm run verify:replay was attempted at this exact signed head on macOS with the unchanged repository verifier. Build passed; the lane exited 1 because its Linux Bubblewrap prerequisite /usr/bin/bwrap is absent (PermissionPathError, not_found). This does not establish positive Linux sandbox verification. The focused production-worker subprocess tests verify the array projection; they do not substitute for sandbox authority or end-to-end replay verification.

The unchanged Ubuntu fork workflow completed at the same signed head: 37264929165. The job concluded success, but its actual verifier payload reports available: false and error_tag: AnalysisCapabilityUnavailableError. The unchanged REA_REPLAY_ALLOW_UNAVAILABLE=true setting permits that degraded result. The Linux sandbox execution lane remains unverified; this is a completed unavailable preflight, not positive sandbox execution proof.


🔄 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/522 **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-sparse-arrays-20261004` --- ### 📝 Commits (1) - [`30bfb75`](https://github.com/morluto/rea/commit/30bfb75799ffd4c32b0af5f4ecad1ec09c448a92) fix(replay): preserve sparse array positions in result projection ### 📊 Changes **2 files changed** (+56 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/replay/JavaScriptReplayWorker.ts` (+11 -0) 📝 `tests/boundary/providers/replay/javascriptReplayWorker.test.ts` (+45 -0) </details> ### 📄 Description ## Change ## Summary Preserve sparse-array positions in the disposable JavaScript replay worker's JSON projection. Fill holes with JSON nulls through the existing depth/node accounting. Currently `Array(3)` becomes `[]` and `[hole, 42, hole]` becomes `[null, 42]`, silently changing the returned array length. Arrays are supported result values; their holes must not remove trailing positions from the observation. ## Verification - Actual compiled production worker subprocess: before 3 failed / 11 passed; after 14 passed. - Empty/all-hole/middle-value sparse arrays, dense and empty controls, and the configured node budget. - Pinned build, TypeScript and repository lint pass. - Full repository/package gates recorded separately before publication. This is direct worker-process verification, not a Linux Bubblewrap/systemd or original-application verification claim. ## Reproduction and verification 3 failed/11 passed - `npm run check:pr`: passed (Test Files 352 passed (352); Tests 1803 passed | 2 skipped (1805)). - `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. actual compiled worker subprocess; not Linux sandbox end-to-end Prepared with AI assistance; the reproductions and verification commands above were executed locally. ## Matching replay lane limitation `npm run verify:replay` was attempted at this exact signed head on macOS with the unchanged repository verifier. Build passed; the lane exited 1 because its Linux Bubblewrap prerequisite `/usr/bin/bwrap` is absent (`PermissionPathError`, `not_found`). This does not establish positive Linux sandbox verification. The focused production-worker subprocess tests verify the array projection; they do not substitute for sandbox authority or end-to-end replay verification. The unchanged Ubuntu fork workflow completed at the same signed head: [37264929165](https://github.com/rudycelekli/rea/actions/runs/37264929165). The job concluded success, but its actual verifier payload reports `available: false` and `error_tag: AnalysisCapabilityUnavailableError`. The unchanged `REA_REPLAY_ALLOW_UNAVAILABLE=true` setting permits that degraded result. The Linux sandbox execution lane remains unverified; this is a completed unavailable preflight, not positive sandbox execution proof. --- <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:43 +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#2048
No description provided.