-
Notifications
You must be signed in to change notification settings - Fork 0
PR_26175_DELTA_002: consolidate replay runtime cloning #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ToolboxAid
merged 1 commit into
main
from
PR_26175_DELTA_002_Shared_Runtime_Consolidation
Jun 25, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-branch-validation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # PR_26175_DELTA_002 Branch Validation | ||
|
|
||
| | Gate | Status | Evidence | | ||
| | --- | --- | --- | | ||
| | Current branch before work | PASS | `main` after PR_001 merge | | ||
| | Worktree before work | PASS | Clean | | ||
| | Local/origin sync before work | PASS | `0 0` | | ||
| | Team ownership | PASS | Team Delta owns Runtime, Shared JS, and technical consolidation. | | ||
| | Work branch | PASS | `PR_26175_DELTA_002_Shared_Runtime_Consolidation` | | ||
| | Previous Delta PR closed | PASS | PR_001 was merged and `main` was verified before PR_002 started. | | ||
| | Scope boundary | PASS | Shared runtime clone helper plus replay runtime adopters and focused test only. | | ||
|
|
||
| ## Instruction Reads | ||
|
|
||
| PASS - All files under `docs_build/dev/ProjectInstructions/` were read before the Delta sequence, and updated instructions were reread after pulling latest `main`. |
9 changes: 9 additions & 0 deletions
9
...orts/PR_26175_DELTA_002_Shared_Runtime_Consolidation-manual-validation-notes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # PR_26175_DELTA_002 Manual Validation Notes | ||
|
|
||
| - Confirmed Team Delta ownership covers Shared JS and Runtime. | ||
| - Confirmed replay runtime cloning duplicated local `structuredClone` calls before this PR. | ||
| - Confirmed replay model and replay system now use the shared runtime clone helper. | ||
| - Confirmed fallback behavior by temporarily disabling `globalThis.structuredClone` in the focused replay test. | ||
| - Confirmed no browser-owned data, API contract, UI, or tool state changes were introduced. | ||
| - Confirmed backlog completion reference was added for `Delta - Shared JS consolidation`. | ||
| - Confirmed source branch disposition should remain `retained`. |
19 changes: 19 additions & 0 deletions
19
...eports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-requirement-checklist.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # PR_26175_DELTA_002 Requirement Checklist | ||
|
|
||
| | Requirement | Status | Notes | | ||
| | --- | --- | --- | | ||
| | Team Delta ownership only | PASS | Shared JS and runtime replay consolidation are Delta-owned. | | ||
| | One PR purpose | PASS | Shared runtime clone consolidation only. | | ||
| | Preserve backward compatibility | PASS | Added JSON fallback when `structuredClone` is unavailable. | | ||
| | Update backlog | PASS | `Delta - Shared JS consolidation` marked complete. | | ||
| | Update tool state if applicable | PASS | Not applicable; no tool tile/status changed. | | ||
| | Produce governance reports | PASS | Summary, branch validation, checklist, validation lane, manual notes, Codex diff, changed-file list, and ZIP. | | ||
| | Runtime validation | PASS | Focused node checks, replay system test, and final systems test passed. | | ||
| | No unrelated files | PASS | Changes are limited to shared runtime clone, replay runtime adopters, focused test, backlog, and reports. | | ||
| | No branch deletion | PASS | Source branch retained. | | ||
|
|
||
| ## Compatibility Notes | ||
|
|
||
| - Public replay model shape is unchanged. | ||
| - Replay frames remain deep-cloned before storage and output. | ||
| - Fallback cloning supports runtime environments without native `structuredClone`. |
31 changes: 31 additions & 0 deletions
31
...build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-validation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # PR_26175_DELTA_002 Validation Lane | ||
|
|
||
| ## Commands | ||
|
|
||
| ```powershell | ||
| node --check src/shared/runtime/snapshotClone.js | ||
| node --check src/engine/replay/ReplayModel.js | ||
| node --check src/engine/replay/ReplaySystem.js | ||
| node --check tests/replay/ReplaySystem.test.mjs | ||
| node tests/replay/ReplaySystem.test.mjs | ||
| node tests/final/FinalSystems.test.mjs | ||
| ``` | ||
|
|
||
| ## Results | ||
|
|
||
| | Command | Status | | ||
| | --- | --- | | ||
| | `node --check src/shared/runtime/snapshotClone.js` | PASS | | ||
| | `node --check src/engine/replay/ReplayModel.js` | PASS | | ||
| | `node --check src/engine/replay/ReplaySystem.js` | PASS | | ||
| | `node --check tests/replay/ReplaySystem.test.mjs` | PASS | | ||
| | `node tests/replay/ReplaySystem.test.mjs` | PASS | | ||
| | `node tests/final/FinalSystems.test.mjs` | PASS | | ||
|
|
||
| ## Browser Validation | ||
|
|
||
| SKIP - No browser UI files changed. | ||
|
|
||
| ## Playwright Validation | ||
|
|
||
| SKIP - Runtime replay/shared helper behavior is covered by focused Node tests. |
44 changes: 44 additions & 0 deletions
44
docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # PR_26175_DELTA_002_Shared_Runtime_Consolidation | ||
|
|
||
| ## Summary | ||
|
|
||
| Team Delta consolidated replay cloning onto the shared runtime helper surface. | ||
|
|
||
| `src/shared/runtime/snapshotClone.js` now exports `cloneRuntimeValue(...)`, which gives runtime code one shared cloning path with a `structuredClone` fast path and JSON fallback. Replay model and replay system cloning now use that shared helper instead of local `structuredClone` calls. | ||
|
|
||
| ## Scope | ||
|
|
||
| - Team: Delta | ||
| - Backlog item: `Delta - Shared JS consolidation` | ||
| - Shared runtime file changed: `src/shared/runtime/snapshotClone.js` | ||
| - Runtime replay files changed: | ||
| - `src/engine/replay/ReplayModel.js` | ||
| - `src/engine/replay/ReplaySystem.js` | ||
| - Tests changed: `tests/replay/ReplaySystem.test.mjs` | ||
| - Backlog updated: `docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md` | ||
|
|
||
| ## Runtime Impact | ||
|
|
||
| PASS - Replay cloning behavior remains backward compatible. | ||
|
|
||
| - Replay records still deep-clone metadata, initial state, frames, and final state. | ||
| - Runtime replay code now works even when `structuredClone` is unavailable. | ||
| - Existing replay playback and replacement behavior is preserved. | ||
|
|
||
| ## Backlog Update | ||
|
|
||
| PASS - `Delta - Shared JS consolidation` is marked complete with this PR as the completion reference. | ||
|
|
||
| ## Tool State Update | ||
|
|
||
| SKIP - No Build Path tool status or tool tile state changed. | ||
|
|
||
| ## Validation Summary | ||
|
|
||
| PASS - Focused replay and final system validation completed. | ||
|
|
||
| See `PR_26175_DELTA_002_Shared_Runtime_Consolidation-validation.md` for command details. | ||
|
|
||
| ## Branch Disposition | ||
|
|
||
| Source branch should be retained after merge unless OWNER later approves branch deletion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,12 @@ | ||
| docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md / updated | ||
| src/engine/runtime/runtimeTickLoop.js / updated | ||
| tests/engine/RuntimeTickLoop.test.mjs / updated | ||
| docs_build/dev/reports/PR_26175_DELTA_001_Runtime_Performance_Optimization.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_001_Runtime_Performance_Optimization-branch-validation.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_001_Runtime_Performance_Optimization-requirement-checklist.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_001_Runtime_Performance_Optimization-validation.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_001_Runtime_Performance_Optimization-manual-validation-notes.md / added | ||
| src/shared/runtime/snapshotClone.js / updated | ||
| src/engine/replay/ReplayModel.js / updated | ||
| src/engine/replay/ReplaySystem.js / updated | ||
| tests/replay/ReplaySystem.test.mjs / updated | ||
| docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-branch-validation.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-requirement-checklist.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-validation.md / added | ||
| docs_build/dev/reports/PR_26175_DELTA_002_Shared_Runtime_Consolidation-manual-validation-notes.md / added | ||
| docs_build/dev/reports/codex_changed_files.txt / updated | ||
| docs_build/dev/reports/codex_review.diff / updated |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
structuredCloneis unavailable, this new fallback clone letsrecordFramecreateclonedFrame, but the same call immediately passes that frame intoReplayTimeline.pushSnapshot, which still calls the globalstructuredCloneand throwsTypeError: structuredClone is not a function. This means recording still breaks in the exact fallback environment covered by the new test; I confirmed withnode ./scripts/run-node-test-files.mjs tests/replay/ReplaySystem.test.mjs.Useful? React with 👍 / 👎.