Skip to content

Commit e3ac72a

Browse files
author
DavidQ
committed
Apply Level 11.4 rewind execution candidate for Sample C
- Validates rewind execution and deterministic replay in network_sample_c - Confirms timeline truncation and replay repopulation behavior - Confirms replay status is surfaced through debug outputs - Preserves strict sample-only scope with no engine-core changes Validation: - imports pass - rewind prep reaches ready - replay executes successfully - bounded timeline remains correct after replay
1 parent 131774a commit e3ac72a

10 files changed

Lines changed: 100 additions & 29 deletions

docs/dev/APPLY_VALIDATION_SPEC.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Apply Validation Spec
2+
3+
## Required Validation
4+
1. Import checks pass for:
5+
- games/network_sample_c/main.js
6+
- games/network_sample_c/game/FakeDivergenceTraceNetworkModel.js
7+
- games/network_sample_c/game/NetworkSampleCScene.js
8+
- games/network_sample_c/game/StateTimelineBuffer.js
9+
- games/network_sample_c/game/ReconciliationLayerAdapter.js
10+
- games/network_sample_c/debug/networkSampleCDebug.js
11+
12+
2. Smoke validation confirms:
13+
- rewind prep status becomes `ready` under divergence
14+
- replay executes successfully
15+
- replayed frame count is greater than zero when divergence exists
16+
- timeline buffer remains bounded after replay
17+
- timeline snapshots after anchor frame are replaced by replayed results
18+
19+
3. Manual validation in sample page:
20+
- `W` refreshes rewind-prep state
21+
- `X` executes rewind replay
22+
- debug panel shows replay status and timeline state

docs/dev/CODEX_COMMANDS.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ MODEL: GPT-5.3-codex
22
REASONING: high
33

44
COMMAND:
5-
Implement rewind execution and deterministic replay in network_sample_c only.
5+
Apply and validate the existing Level 11.4 rewind execution implementation in `games/network_sample_c` only.
66

7-
- Use StateTimelineBuffer
8-
- Use ReconciliationLayerAdapter outputs
9-
- Restore frame, replay inputs forward
10-
- Update timeline after replay
7+
Perform:
8+
- targeted import checks
9+
- targeted smoke checks for rewind prep and replay
10+
- manual validation support for W/X controls and debug outputs
11+
- surgical fixes only if validation reveals a defect
1112

1213
DO NOT:
13-
- Modify engine core
14-
- Create or modify documentation
15-
- Expand beyond sample scope
14+
- modify engine core APIs
15+
- create or edit documentation
16+
- expand scope beyond `network_sample_c`

docs/dev/COMMIT_COMMENT.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
Implement rewind execution and deterministic replay for Level 11
1+
Apply Level 11.4 rewind execution candidate for Sample C
22

3-
- Adds rewind-to-frame execution using timeline buffer
4-
- Replays inputs forward deterministically
5-
- Updates timeline after replay
6-
- Extends debug surfaces to visualize replay path
3+
- Validates rewind execution and deterministic replay in network_sample_c
4+
- Confirms timeline truncation and replay repopulation behavior
5+
- Confirms replay status is surfaced through debug outputs
6+
- Preserves strict sample-only scope with no engine-core changes
77

88
Validation:
9-
- Rewind restores correct frame
10-
- Replay produces consistent results
11-
- Timeline updates correctly
12-
13-
No engine-core or shared system changes
9+
- imports pass
10+
- rewind prep reaches ready
11+
- replay executes successfully
12+
- bounded timeline remains correct after replay

docs/dev/INTEGRATION_NOTES.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Integration Notes
2+
3+
## Expected Boundaries
4+
- `StateTimelineBuffer` remains sample-scoped
5+
- `ReconciliationLayerAdapter` remains an adapter layer, not engine API
6+
- Model owns input-history capture and replay execution
7+
- Scene owns user-facing trigger bindings only
8+
- Debug plugin consumes model state and does not compute replay logic
9+
10+
## Non-Goals
11+
- No rollback netcode across shared engine
12+
- No server reconciliation service
13+
- No Docker or dashboard work

docs/dev/ROLLBACK_GUARDRAILS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Rollback Guardrails
2+
3+
## Guardrails
4+
- Replay path must be deterministic
5+
- Replay path must use recorded inputs, not live input sampling
6+
- Timeline truncation must occur before repopulation
7+
- Replay must restore from anchor snapshot, not current divergent state
8+
- Buffer size limits must remain enforced after replay
9+
10+
## Failure Indicators
11+
- Replay result differs across repeated identical runs
12+
- Timeline grows without bound
13+
- Debug panel reports replay success but timeline does not update
14+
- Authoritative correction mutates state directly without replay
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Adds Level 11.4 rewind execution and replay specifications
1+
Adds APPLY_PR bundle for Level 11.4 rewind execution validation and guarded integration in Sample C.

docs/dev/reports/file_tree.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
docs/
22
pr/
3-
BUILD_PR_LEVEL_11_4_REWIND_EXECUTION.md
3+
APPLY_PR_LEVEL_11_4_REWIND_EXECUTION_CANDIDATE.md
44
dev/
5-
REWIND_EXECUTION_SPEC.md
6-
DETERMINISTIC_REPLAY_RULES.md
7-
TIMELINE_UPDATE_SPEC.md
8-
DEBUG_REPLAY_VISUALS.md
5+
APPLY_VALIDATION_SPEC.md
6+
INTEGRATION_NOTES.md
7+
ROLLBACK_GUARDRAILS.md
98
codex_commands.md
109
commit_comment.txt
1110
reports/
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
- Docs-only bundle
2-
- No engine-core changes
3-
- Sample-scoped implementation instructions
4-
- Matches repo structure
1+
- Docs-only APPLY bundle
2+
- No engine-core scope
3+
- No documentation delegated to Codex
4+
- Validation focused on Sample C rewind execution only
5+
- Repo structure preserved
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# APPLY PR LEVEL 11.4 — Rewind Execution Candidate
2+
3+
## Objective
4+
Apply and validate the Level 11.4 rewind execution implementation in `network_sample_c` without expanding scope.
5+
6+
## Apply Scope
7+
- Confirm Sample C rewind execution is integrated and runnable
8+
- Confirm deterministic replay behavior under repeated inputs
9+
- Confirm timeline truncation and repopulation work as intended
10+
- Confirm debug outputs reflect replay status and bounded history
11+
12+
## Constraints
13+
- No engine-core changes
14+
- No docs changes by Codex
15+
- No expansion beyond `games/network_sample_c/*`
16+
17+
## Acceptance Summary
18+
- Rewind-prep can reach `ready`
19+
- Rewind execution returns success
20+
- Replay frame count is reported
21+
- Timeline remains bounded after replay
22+
- Debug output reflects replay state consistently

games/network_sample_c/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1>Network Sample C - Divergence / Trace Validation</h1>
6969
<canvas id="game" width="960" height="720"></canvas>
7070
<section>
7171
<h3>Controls</h3>
72-
<p><code>Space</code>/<code>Enter</code> add manual trace marker. <code>D</code> inject mismatch. <code>R</code> request reconcile. <code>W</code> refresh rewind prep. <code>V</code> run validation.</p>
72+
<p><code>Space</code>/<code>Enter</code> add manual trace marker. <code>D</code> inject mismatch. <code>R</code> request reconcile. <code>W</code> refresh rewind prep. <code>X</code> execute rewind replay. <code>V</code> run validation.</p>
7373
</section>
7474
<section>
7575
<h3>Network Commands</h3>

0 commit comments

Comments
 (0)