Skip to content

Commit a8a1024

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr/26177-CHARLIE-029-system-health-postgres-metrics-panel
# Conflicts: # docs_build/dev/reports/codex_changed_files.txt # docs_build/dev/reports/codex_review.diff
2 parents 9a6779f + fa7e0c9 commit a8a1024

39 files changed

Lines changed: 844 additions & 53 deletions

File tree

docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,16 @@ Current OWNER clarification:
241241

242242
### Team Delta
243243

244-
- [ ] Delta - Shared JS consolidation
245-
- [ ] Delta - API client consolidation
246-
- [ ] Delta - Runtime performance audit
247-
- [ ] Delta - Engine test coverage improvements
248-
- [ ] Delta - Event system audit
244+
- [x] Delta - Shared JS consolidation
245+
- Completion reference: PR_26175_DELTA_002_Shared_Runtime_Consolidation.
246+
- [x] Delta - API client consolidation
247+
- Completed by PR_26175_DELTA_003_API_Client_Standardization.
248+
- [x] Delta - Runtime performance audit
249+
- Completion reference: PR_26175_DELTA_001_Runtime_Performance_Optimization.
250+
- [x] Delta - Engine test coverage improvements
251+
- Completed by PR_26175_DELTA_004_Runtime_Test_Expansion.
252+
- [x] Delta - Event system audit
253+
- Completed by PR_26175_DELTA_005_Runtime_Technical_Debt_Cleanup.
249254
- [ ] Delta - Controls runtime framework audit
250255
- [ ] Delta - Object runtime framework audit
251256
- [ ] Delta - World runtime framework audit
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PR_26175_DELTA_001 Branch Validation
2+
3+
| Gate | Status | Evidence |
4+
| --- | --- | --- |
5+
| Current branch before work | PASS | `main` |
6+
| Worktree before work | PASS | Clean |
7+
| Local/origin sync before work | PASS | `0 0` after `git pull --ff-only` |
8+
| Team ownership | PASS | Team Delta owns Runtime, Performance, and Runtime test coverage. |
9+
| Work branch | PASS | `PR_26175_DELTA_001_Runtime_Performance_Optimization` |
10+
| Previous Delta PR closed | PASS | No active Delta PR was present before PR_001. |
11+
| Scope boundary | PASS | Runtime tick-loop optimization, focused test, backlog/report artifacts only. |
12+
13+
## Instruction Reads
14+
15+
PASS - All files under `docs_build/dev/ProjectInstructions/` were read before implementation.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PR_26175_DELTA_001 Manual Validation Notes
2+
3+
- Confirmed Team Delta ownership covers Runtime, Performance, and Runtime test coverage.
4+
- Confirmed the optimization is limited to fixed-step runtime tick advancement.
5+
- Confirmed `advanceRuntimeTick(...)` now reuses the existing `deltaSeconds` value when present.
6+
- Confirmed legacy tick objects without `deltaSeconds` still advance successfully.
7+
- Confirmed no browser-owned data, API contract, UI, or tool state changes were introduced.
8+
- Confirmed backlog completion reference was added for `Delta - Runtime performance audit`.
9+
- Confirmed source branch disposition should remain `retained`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PR_26175_DELTA_001 Requirement Checklist
2+
3+
| Requirement | Status | Notes |
4+
| --- | --- | --- |
5+
| Team Delta ownership only | PASS | Runtime, Performance, and Runtime test coverage are Delta-owned. |
6+
| One PR purpose | PASS | Fixed-step tick-loop performance optimization only. |
7+
| Preserve backward compatibility | PASS | Added legacy tick fallback when `deltaSeconds` is absent. |
8+
| Update backlog | PASS | `Delta - Runtime performance audit` marked complete. |
9+
| Update tool state if applicable | PASS | Not applicable; no tool tile/status changed. |
10+
| Produce governance reports | PASS | Summary, branch validation, checklist, validation lane, manual notes, Codex diff, changed-file list, and ZIP. |
11+
| Runtime validation | PASS | Targeted node checks and runtime tick test passed. |
12+
| No unrelated files | PASS | Changes are limited to runtime tick loop, its focused test, backlog, and reports. |
13+
| No branch deletion | PASS | Source branch retained. |
14+
15+
## Compatibility Notes
16+
17+
- `advanceRuntimeTick(...)` preserves the same public tick shape.
18+
- Callers with old tick objects still get a computed `deltaSeconds` value.
19+
- Invalid fixed-delta errors remain unchanged.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PR_26175_DELTA_001 Validation Lane
2+
3+
## Commands
4+
5+
```powershell
6+
node --check src/engine/runtime/runtimeTickLoop.js
7+
node --check tests/engine/RuntimeTickLoop.test.mjs
8+
node tests/engine/RuntimeTickLoop.test.mjs
9+
```
10+
11+
## Results
12+
13+
| Command | Status |
14+
| --- | --- |
15+
| `node --check src/engine/runtime/runtimeTickLoop.js` | PASS |
16+
| `node --check tests/engine/RuntimeTickLoop.test.mjs` | PASS |
17+
| `node tests/engine/RuntimeTickLoop.test.mjs` | PASS |
18+
19+
## Browser Validation
20+
21+
SKIP - No browser UI files changed.
22+
23+
## Playwright Validation
24+
25+
SKIP - Runtime tick-loop internals are covered by the focused Node runtime test.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PR_26175_DELTA_001_Runtime_Performance_Optimization
2+
3+
## Summary
4+
5+
Team Delta completed a focused runtime performance optimization for the fixed-step runtime tick loop.
6+
7+
The runtime now reuses the precomputed `deltaSeconds` value already stored on a tick when advancing frames. This avoids recalculating the fixed delta seconds on every frame while preserving compatibility for legacy tick objects that do not yet carry `deltaSeconds`.
8+
9+
## Scope
10+
11+
- Team: Delta
12+
- Backlog item: `Delta - Runtime performance audit`
13+
- Runtime file changed: `src/engine/runtime/runtimeTickLoop.js`
14+
- Test file changed: `tests/engine/RuntimeTickLoop.test.mjs`
15+
- Backlog updated: `docs_build/dev/ProjectInstructions/backlog/BACKLOG_MASTER.md`
16+
17+
## Runtime Impact
18+
19+
PASS - Fixed-step runtime advancement behavior remains backward compatible.
20+
21+
- Existing tick objects from `createRuntimeTickLoop(...)` retain `deltaSeconds`.
22+
- `advanceRuntimeTick(...)` reuses that value.
23+
- Legacy tick objects without `deltaSeconds` still compute a valid fallback.
24+
- Invalid fixed-delta handling is unchanged.
25+
26+
## Backlog Update
27+
28+
PASS - `Delta - Runtime performance audit` is marked complete with this PR as the completion reference.
29+
30+
## Tool State Update
31+
32+
SKIP - No Build Path tool status or tool tile state changed. This PR affects runtime internals only.
33+
34+
## Validation Summary
35+
36+
PASS - Targeted runtime validation completed.
37+
38+
See `PR_26175_DELTA_001_Runtime_Performance_Optimization-validation.md` for command details.
39+
40+
## Branch Disposition
41+
42+
Source branch should be retained after merge unless OWNER later approves branch deletion.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PR_26175_DELTA_002 Branch Validation
2+
3+
| Gate | Status | Evidence |
4+
| --- | --- | --- |
5+
| Current branch before work | PASS | `main` after PR_001 merge |
6+
| Worktree before work | PASS | Clean |
7+
| Local/origin sync before work | PASS | `0 0` |
8+
| Team ownership | PASS | Team Delta owns Runtime, Shared JS, and technical consolidation. |
9+
| Work branch | PASS | `PR_26175_DELTA_002_Shared_Runtime_Consolidation` |
10+
| Previous Delta PR closed | PASS | PR_001 was merged and `main` was verified before PR_002 started. |
11+
| Scope boundary | PASS | Shared runtime clone helper plus replay runtime adopters and focused test only. |
12+
13+
## Instruction Reads
14+
15+
PASS - All files under `docs_build/dev/ProjectInstructions/` were read before the Delta sequence, and updated instructions were reread after pulling latest `main`.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PR_26175_DELTA_002 Manual Validation Notes
2+
3+
- Confirmed Team Delta ownership covers Shared JS and Runtime.
4+
- Confirmed replay runtime cloning duplicated local `structuredClone` calls before this PR.
5+
- Confirmed replay model and replay system now use the shared runtime clone helper.
6+
- Confirmed fallback behavior by temporarily disabling `globalThis.structuredClone` in the focused replay test.
7+
- Confirmed no browser-owned data, API contract, UI, or tool state changes were introduced.
8+
- Confirmed backlog completion reference was added for `Delta - Shared JS consolidation`.
9+
- Confirmed source branch disposition should remain `retained`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PR_26175_DELTA_002 Requirement Checklist
2+
3+
| Requirement | Status | Notes |
4+
| --- | --- | --- |
5+
| Team Delta ownership only | PASS | Shared JS and runtime replay consolidation are Delta-owned. |
6+
| One PR purpose | PASS | Shared runtime clone consolidation only. |
7+
| Preserve backward compatibility | PASS | Added JSON fallback when `structuredClone` is unavailable. |
8+
| Update backlog | PASS | `Delta - Shared JS consolidation` marked complete. |
9+
| Update tool state if applicable | PASS | Not applicable; no tool tile/status changed. |
10+
| Produce governance reports | PASS | Summary, branch validation, checklist, validation lane, manual notes, Codex diff, changed-file list, and ZIP. |
11+
| Runtime validation | PASS | Focused node checks, replay system test, and final systems test passed. |
12+
| No unrelated files | PASS | Changes are limited to shared runtime clone, replay runtime adopters, focused test, backlog, and reports. |
13+
| No branch deletion | PASS | Source branch retained. |
14+
15+
## Compatibility Notes
16+
17+
- Public replay model shape is unchanged.
18+
- Replay frames remain deep-cloned before storage and output.
19+
- Fallback cloning supports runtime environments without native `structuredClone`.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# PR_26175_DELTA_002 Validation Lane
2+
3+
## Commands
4+
5+
```powershell
6+
node --check src/shared/runtime/snapshotClone.js
7+
node --check src/engine/replay/ReplayModel.js
8+
node --check src/engine/replay/ReplaySystem.js
9+
node --check tests/replay/ReplaySystem.test.mjs
10+
node tests/replay/ReplaySystem.test.mjs
11+
node tests/final/FinalSystems.test.mjs
12+
```
13+
14+
## Results
15+
16+
| Command | Status |
17+
| --- | --- |
18+
| `node --check src/shared/runtime/snapshotClone.js` | PASS |
19+
| `node --check src/engine/replay/ReplayModel.js` | PASS |
20+
| `node --check src/engine/replay/ReplaySystem.js` | PASS |
21+
| `node --check tests/replay/ReplaySystem.test.mjs` | PASS |
22+
| `node tests/replay/ReplaySystem.test.mjs` | PASS |
23+
| `node tests/final/FinalSystems.test.mjs` | PASS |
24+
25+
## Browser Validation
26+
27+
SKIP - No browser UI files changed.
28+
29+
## Playwright Validation
30+
31+
SKIP - Runtime replay/shared helper behavior is covered by focused Node tests.

0 commit comments

Comments
 (0)