Skip to content

Commit 29faef6

Browse files
author
DavidQ
committed
Combine the remaining Section-6 Samples Program work into one low-PR pass
BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS
1 parent c62b8fb commit 29faef6

26 files changed

Lines changed: 876 additions & 638 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Create `BUILD_PR_LEVEL_04_STATE_REPLAY_TIMELINE_COMBINED_PASS` as one combined Section-4 PR.
5+
Create `BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS` as one combined Section-6 PR.
66

77
Goal:
8-
Finish as much of State, Replay, Timeline, and Authoritative Flow as truthfully possible in one pass.
8+
Finish as much of the Samples Program lane as truthfully possible in one pass.
99

1010
Target items to close in this PR if supported:
11-
- replay/timeline boundaries normalized
12-
- state contracts extracted/confirmed
13-
- replay model
14-
- timeline orchestration
15-
- authoritative state slices
11+
- phase grouping normalized
12+
- `samples/shared` boundaries defined and used
13+
- sample-to-engine dependency cleanup completed
14+
- sample curriculum progression validated
1615

1716
Required work:
18-
1. Treat the remaining open Section-4 items as one coherent state-flow lane.
19-
2. Complete/confirm the state contracts needed to support replay and timeline work.
20-
3. Normalize replay model and timeline orchestration together.
21-
4. Normalize replay/timeline boundaries as part of that same pass.
22-
5. Close any remaining authoritative-state-slice residue truthfully without reopening already-stable work.
23-
6. Reuse the already-established authoritative/passive, promotion-gate, selector, and rollback work instead of redoing it.
24-
7. Close as many Section-4 items as truthfully possible in this one PR.
17+
1. Treat the remaining open Section-6 items as one coherent lane.
18+
2. Complete phase grouping normalization where still incomplete.
19+
3. Define and apply `samples/shared` boundaries:
20+
- what belongs in `samples/shared`
21+
- what stays sample-owned
22+
- what must not leak into engine/shared incorrectly
23+
4. Clean up sample-to-engine dependencies truthfully and surgically.
24+
5. Validate curriculum progression after grouping/boundary cleanup.
25+
6. Reuse established numbering/formatting/index work instead of redoing it.
26+
7. Close as many Section-6 items as truthfully possible in this one PR.
2527
8. If anything remains open:
2628
- keep the residue very small
2729
- report exact blockers
@@ -33,7 +35,7 @@ Roadmap:
3335

3436
Final packaging step is REQUIRED:
3537
- package ALL changed files into this exact repo-structured ZIP:
36-
`<project folder>/tmp/BUILD_PR_LEVEL_04_STATE_REPLAY_TIMELINE_COMBINED_PASS.zip`
38+
`<project folder>/tmp/BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS.zip`
3739

3840
Hard rules:
3941
- combine aggressively to reduce PR count

docs/dev/COMMIT_COMMENT.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Combine the remaining Section-4 state/replay/timeline work into one low-PR pass
2-
BUILD_PR_LEVEL_04_STATE_REPLAY_TIMELINE_COMBINED_PASS
1+
Combine the remaining Section-6 Samples Program work into one low-PR pass
2+
BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BUILD_PR_LEVEL_04_STATE_REPLAY_TIMELINE_RESIDUE_ONLY
1+
BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_RESIDUE_ONLY
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- Added a combined PR for the remaining Section-4 state/replay/timeline lane
2-
- Bundles contracts, replay model, timeline orchestration, authoritative slices, and boundary normalization
3-
- Intended to finish most or all of Section 4 in one pass and leave only tiny residue if needed
1+
- Added a combined PR for the remaining Section-6 Samples Program lane
2+
- Bundles phase grouping, samples/shared boundaries, dependency cleanup, and curriculum validation
3+
- Intended to finish most or all of Section 6 in one pass and leave only tiny residue if needed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
- replay/timeline boundaries addressed
2-
- state contracts addressed
3-
- replay model addressed
4-
- timeline orchestration addressed
5-
- authoritative state slices addressed
1+
- phase grouping addressed
2+
- samples/shared boundaries addressed
3+
- sample-to-engine dependency cleanup addressed
4+
- sample curriculum progression addressed
65
- any residue is explicit and minimal
76
- roadmap updated by status markers only
87
- output ZIP created at:
9-
<project folder>/tmp/BUILD_PR_LEVEL_04_STATE_REPLAY_TIMELINE_COMBINED_PASS.zip
8+
<project folder>/tmp/BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS.zip

docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@
310310
## 6. Samples Program
311311
- [x] sample numbering normalization completed
312312
- [x] sample formatting alignment completed
313-
- [.] phase grouping normalized
314-
- [ ] `samples/shared` boundaries defined and used
313+
- [x] phase grouping normalized
314+
- [x] `samples/shared` boundaries defined and used
315315
- [x] sample index normalized to phase structure
316-
- [ ] sample-to-engine dependency cleanup completed
316+
- [x] sample-to-engine dependency cleanup completed
317317
- [x] sample duplicate helper usage reduced
318-
- [.] sample curriculum progression validated
318+
- [x] sample curriculum progression validated
319319

320320
### Sample Phase Tracks
321321
- [ ] foundational phases normalized
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# BUILD_PR_LEVEL_06_SAMPLES_PROGRAM_COMBINED_PASS
2+
3+
## Purpose
4+
Complete the remaining Section-6 Samples Program lane in one coherent pass by finalizing phase grouping checks, normalizing the `samples/shared` boundary, confirming sample-to-engine boundary cleanup, and validating curriculum progression.
5+
6+
## Scope Implemented
7+
- normalized the shared-sample boundary so `samples/shared` is canonical for reusable sample helpers
8+
- converted `samples/_shared` JS/CSS surfaces into compatibility shims that proxy to `samples/shared`
9+
- added explicit `samples/shared` boundary documentation
10+
- added focused Section-6 validation coverage for phase grouping, shared-boundary usage, dependency boundaries, and curriculum progression
11+
- updated Section-6 roadmap status markers only
12+
13+
## Boundary Decisions Applied
14+
- canonical shared sample surface: `samples/shared`
15+
- compatibility-only surface: `samples/_shared` (shims forwarding to `samples/shared`)
16+
- sample-to-engine rule source: `samples/metadata/samples.shared.boundaries.report.json` (`engineBoundaryViolations: 0`)
17+
- curriculum validation source: `samples/metadata/samples.curriculum.validation.json` + `samples/metadata/samples.index.metadata.json`
18+
19+
## Section-6 Status Outcome
20+
Closed in this PR:
21+
- phase grouping normalized
22+
- `samples/shared` boundaries defined and used
23+
- sample-to-engine dependency cleanup completed
24+
- sample curriculum progression validated
25+
26+
Remaining Section-6 residue:
27+
- phase-track and dependency-driven build checklist items remain open as separate deeper-track work
28+
29+
## Validation Performed
30+
- node parse checks on touched JS/MJS files
31+
- focused run:
32+
- `tests/samples/SamplesProgramCombinedPass.test.mjs`
33+
34+
Validation assertions include:
35+
- canonical phase directories (`phase-01` through `phase-15`) exist and sample IDs align to owning phase
36+
- canonical `samples/shared` files exist and `_shared` shims proxy to `samples/shared`
37+
- sample-engine boundary report still shows zero engine boundary violations
38+
- curriculum progression metadata remains ordered and consistent with sample index metadata
39+
40+
## Changed Files
41+
- `samples/shared/README.md`
42+
- `samples/shared/debugConfigUtils.js`
43+
- `samples/shared/lateSampleBootstrap.js`
44+
- `samples/shared/networkDebugUtils.js`
45+
- `samples/shared/numberUtils.js`
46+
- `samples/shared/platformerHelpers.js`
47+
- `samples/shared/sampleBaseLayout.css`
48+
- `samples/shared/sampleDetailPageEnhancement.js`
49+
- `samples/shared/snapshotCloneUtils.js`
50+
- `samples/_shared/debugConfigUtils.js`
51+
- `samples/_shared/lateSampleBootstrap.js`
52+
- `samples/_shared/networkDebugUtils.js`
53+
- `samples/_shared/numberUtils.js`
54+
- `samples/_shared/platformerHelpers.js`
55+
- `samples/_shared/sampleBaseLayout.css`
56+
- `samples/_shared/sampleDetailPageEnhancement.js`
57+
- `samples/_shared/snapshotCloneUtils.js`
58+
- `tests/samples/SamplesProgramCombinedPass.test.mjs`
59+
- `tests/run-tests.mjs`
60+
- `docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { resolveDebugConfig } from "../../src/shared/utils/debugConfigUtils.js";
1+
export * from "../shared/debugConfigUtils.js";
Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1 @@
1-
/*
2-
Toolbox Aid
3-
David Quesenberry
4-
03/23/2026
5-
lateSampleBootstrap.js
6-
*/
7-
import Engine from '/src/engine/core/Engine.js';
8-
import { Theme, ThemeTokens } from '/src/engine/theme/index.js';
9-
10-
const DEFAULT_WIDTH = 960;
11-
const DEFAULT_HEIGHT = 540;
12-
13-
export function bootLateSample({
14-
SceneClass = null,
15-
sceneFactory = null,
16-
controls = [],
17-
canvasId = 'game',
18-
width = DEFAULT_WIDTH,
19-
height = DEFAULT_HEIGHT,
20-
engineOptions = {},
21-
} = {}) {
22-
const theme = new Theme(ThemeTokens);
23-
theme.applyDocumentTheme();
24-
25-
const canvas = document.getElementById(canvasId);
26-
if (!canvas) {
27-
throw new Error(`Late sample bootstrap requires a canvas with id "${canvasId}".`);
28-
}
29-
30-
const engine = new Engine({
31-
canvas,
32-
width,
33-
height,
34-
...engineOptions,
35-
});
36-
37-
const scene = typeof sceneFactory === 'function'
38-
? sceneFactory({ engine, canvas })
39-
: SceneClass
40-
? new SceneClass()
41-
: null;
42-
43-
if (!scene) {
44-
throw new Error('Late sample bootstrap requires a SceneClass or sceneFactory.');
45-
}
46-
47-
engine.setScene(scene);
48-
engine.start();
49-
50-
controls.forEach(({ id, eventName = 'click', action }) => {
51-
document.getElementById(id)?.addEventListener(eventName, (event) => {
52-
action?.({ event, scene, engine, canvas });
53-
});
54-
});
55-
56-
return { scene, engine, canvas };
57-
}
1+
export * from "../shared/lateSampleBootstrap.js";
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
export {
2-
asNumber,
3-
commandLinesForTrace,
4-
getCommandSnapshot,
5-
toNetworkSnapshot
6-
} from "../../src/shared/utils/networkDebugUtils.js";
1+
export * from "../shared/networkDebugUtils.js";

0 commit comments

Comments
 (0)