Skip to content

Commit 17ea567

Browse files
author
DavidQ
committed
Validate and repair sample system
- inventoried active sample surfaces - validated sample discovery, launch, and runtime integration - fixed validated sample failures - re-ran validation after fixes - preserved unrelated working-tree changes PR Details - advances the sample validation and repair lane with execution-backed fixes
1 parent d6d42d2 commit 17ea567

13 files changed

Lines changed: 219 additions & 16 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES — Failures
2+
3+
## Failure F-001 (Validated)
4+
- Surface: sample runtime contract alignment (Node execution path)
5+
- Command: `node ./tests/games/GravityValidation.test.mjs`
6+
- Status: FAIL (pre-fix)
7+
- Error:
8+
- `Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\src\engine\scene\index.js' imported from ...\samples\phase-03\0325\game\GravityScene.js`
9+
- Root cause:
10+
- Sample `0325` used browser-root absolute `/src/...` module imports, which resolve to an invalid filesystem root in Node validation execution.
11+
12+
## Non-failing Validation Surfaces (pre-fix)
13+
- Sample inventory/index alignment: PASS
14+
- `missingLinkCount=0`
15+
- Sample discovery + launch smoke: PASS
16+
- `node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples`
17+
- `PASS=242 FAIL=0 TOTAL=242`
18+
- Sample structural/contract metadata checks: PASS
19+
- `node --input-type=module -e "import { run } from './tests/samples/SamplesProgramCombinedPass.test.mjs'; run(); ..."`
20+
21+
## Failure Scope Decision
22+
Only F-001 was fixed in this PR. No speculative or unrelated changes were applied.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES — Fixes Applied
2+
3+
## Fix Summary
4+
Resolved the validated sample contract issue in `samples/phase-03/0325` by replacing Node-incompatible browser-root imports (`/src/...`) with correct repo-relative imports.
5+
6+
## Files Changed
7+
1. `samples/phase-03/0325/main.js`
8+
- Updated:
9+
- `/src/engine/core/Engine.js` -> `../../../src/engine/core/Engine.js`
10+
- `/src/engine/input/index.js` -> `../../../src/engine/input/index.js`
11+
- `/src/engine/theme/index.js` -> `../../../src/engine/theme/index.js`
12+
13+
2. `samples/phase-03/0325/game/GravityScene.js`
14+
- Updated:
15+
- `/src/engine/scene/index.js` -> `../../../../src/engine/scene/index.js`
16+
- `/src/shared/utils/index.js` -> `../../../../src/shared/utils/index.js`
17+
18+
3. `samples/phase-03/0325/game/GravityInputController.js`
19+
- Updated:
20+
- `/src/engine/input/index.js` -> `../../../../src/engine/input/index.js`
21+
- `/src/engine/utils/math.js` -> `../../../../src/engine/utils/math.js`
22+
23+
4. `samples/phase-03/0325/game/GravityWorld.js`
24+
- Updated:
25+
- `/src/engine/utils/math.js` -> `../../../../src/engine/utils/math.js`
26+
27+
## Scope Guard Confirmation
28+
- No feature additions
29+
- No broad redesign
30+
- No start_of_day modifications
31+
- No unrelated refactors
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES — Sample Inventory
2+
3+
## Active Sample System Inventory
4+
- Total phases discovered: `19`
5+
- Total active samples with `index.html`: `242`
6+
- Missing sample links in `samples/index.html`: `0`
7+
8+
## Phase Breakdown
9+
- `phase-01`: 24
10+
- `phase-02`: 25
11+
- `phase-03`: 27
12+
- `phase-04`: 13
13+
- `phase-05`: 12
14+
- `phase-06`: 14
15+
- `phase-07`: 13
16+
- `phase-08`: 10
17+
- `phase-09`: 6
18+
- `phase-10`: 3
19+
- `phase-11`: 6
20+
- `phase-12`: 8
21+
- `phase-13`: 20
22+
- `phase-14`: 18
23+
- `phase-15`: 6
24+
- `phase-16`: 22
25+
- `phase-17`: 13
26+
- `phase-18`: 1
27+
- `phase-19`: 1
28+
29+
## Inventory Method
30+
Inventory was computed from on-disk sample folders under `samples/phase-xx/<id>/index.html` and cross-checked against `samples/index.html` link entries.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES — Validation
2+
3+
## Validation Commands Executed
4+
### Pre-fix validation
5+
1. Inventory + index alignment check (Node inline script)
6+
2. `node --input-type=module -e "import { run } from './tests/samples/SamplesProgramCombinedPass.test.mjs'; run(); console.log('PASS SamplesProgramCombinedPass');"`
7+
3. `node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples`
8+
4. `node ./tests/games/GravityValidation.test.mjs`
9+
10+
### Post-fix revalidation
11+
1. `node ./tests/games/GravityValidation.test.mjs`
12+
2. `node --input-type=module -e "import { run } from './tests/samples/SamplesProgramCombinedPass.test.mjs'; run(); console.log('PASS SamplesProgramCombinedPass');"`
13+
3. `node ./tests/runtime/LaunchSmokeAllEntries.test.mjs --samples`
14+
15+
## Results
16+
### Pre-fix
17+
- Inventory/index alignment: PASS
18+
- phases=`19`, samples=`242`, missing links=`0`
19+
- `SamplesProgramCombinedPass`: PASS
20+
- Launch smoke samples: PASS (`242/242`)
21+
- `GravityValidation`: FAIL (ERR_MODULE_NOT_FOUND on `C:\src\engine\scene\index.js`)
22+
23+
### Post-fix
24+
- `GravityValidation`: PASS
25+
- `SamplesProgramCombinedPass`: PASS
26+
- Launch smoke samples: PASS (`242/242`)
27+
28+
## Conclusion
29+
Sample discovery, index, launch, boot, and runtime contract alignment are validated and clean after applying the targeted 0325 import-path fix.
30+
31+
## Roadmap Update (execution-backed)
32+
- Updated status in `docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md`:
33+
- `[x] sample system validation and repair executed with post-fix clean sample launch/runtime checks (BUILD_PR_LEVEL_23_4)`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
This PR removes ambiguity in the tools shared layer by consolidating overlapping shared surfaces into a single authoritative location: tools/shared.
1+
This PR moves the post-tools effort into the sample system by combining validation and repair in one execution pass, so broken sample paths and contract issues are fixed immediately instead of deferred.

docs/dev/reports/launch_smoke_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Launch Smoke Report
22

3-
Generated: 2026-04-18T21:45:31.313Z
3+
Generated: 2026-04-18T22:06:33.986Z
44

55
Filters: games=false, samples=true, tools=false, sampleRange=all
66

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
- [ ] inventory completed for tools/shared and tools/dev/shared
2-
- [ ] move map completed
3-
- [ ] dedupe/merge decisions documented
4-
- [ ] imports and references updated
5-
- [ ] no live references to tools/dev/shared remain
6-
- [ ] affected tools load successfully
1+
- [ ] sample inventory completed
2+
- [ ] sample discovery/index validated
3+
- [ ] representative sample launch/boot coverage executed
4+
- [ ] failures documented
5+
- [ ] validated fixes applied
6+
- [ ] revalidation completed after fixes
77
- [ ] no start_of_day changes
88
- [ ] unrelated working-tree changes preserved

docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,3 +864,4 @@
864864
## 23. Engine Runtime Validation Sweep
865865
- [x] validation sweep executed across samples, runtime, and engine boundaries (BUILD_PR_LEVEL_23_1)
866866
- [x] integration fixes applied and validated for 23.1-reported runtime/guard gaps (BUILD_PR_LEVEL_23_2)
867+
- [x] sample system validation and repair executed with post-fix clean sample launch/runtime checks (BUILD_PR_LEVEL_23_4)
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES
2+
3+
## Purpose
4+
Execute the next combined engine/runtime lane by validating the sample system end-to-end and fixing the real issues found in the same pass.
5+
6+
This PR is intended to do real work:
7+
- validate sample launch and sample/runtime integration
8+
- identify broken sample paths, contract drift, and execution failures
9+
- fix the validated issues
10+
- re-run validation to confirm recovery
11+
12+
## Scope
13+
Included:
14+
- validate the active sample system
15+
- validate sample index / discovery / launch paths
16+
- validate sample-to-engine and sample-to-runtime contracts
17+
- fix real sample issues found in the sweep
18+
- re-run validation after fixes
19+
- produce explicit failure/fix/validation reports
20+
21+
Excluded:
22+
- no unrelated feature expansion
23+
- no broad redesign
24+
- no start_of_day changes
25+
- no roadmap rewrites
26+
- no speculative refactors outside validated fixes
27+
28+
## Inputs
29+
Use existing validation context where available, including:
30+
- prior engine/runtime validation sweep outputs
31+
- sample index / sample discovery surfaces
32+
- current sample runtime contracts
33+
34+
## Required outputs
35+
- `docs/dev/reports/BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES_SAMPLE_INVENTORY.md`
36+
- `docs/dev/reports/BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES_FAILURES.md`
37+
- `docs/dev/reports/BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES_FIXES_APPLIED.md`
38+
- `docs/dev/reports/BUILD_PR_LEVEL_23_4_SAMPLE_SYSTEM_VALIDATION_AND_FIXES_VALIDATION.md`
39+
40+
## Required work
41+
42+
### 1. Sample validation sweep
43+
Validate at minimum:
44+
- sample discovery/index surfaces
45+
- launch/boot of active samples or representative coverage set
46+
- sample contract alignment with engine/runtime
47+
- missing asset / broken import / wrong-path failures
48+
- sample numbering or routing issues that block execution
49+
50+
### 2. Fixes
51+
Apply only validated, execution-backed fixes:
52+
- broken imports
53+
- bad launch wiring
54+
- sample routing/index mismatches
55+
- sample/runtime contract mismatches
56+
- obvious sample asset/path issues
57+
58+
### 3. Revalidation
59+
After fixes:
60+
- re-run sample validation
61+
- record remaining failures separately from fixed items
62+
- preserve unrelated working-tree changes
63+
64+
## Acceptance
65+
- sample inventory exists
66+
- failures are explicitly documented
67+
- validated fixes are applied
68+
- sample system is revalidated after fixes
69+
- no unrelated churn
70+
- roadmap updates are status-only and execution-backed
71+
72+
## Validation requirements
73+
Validation must confirm:
74+
- sample inventory completed
75+
- representative sample coverage executed
76+
- fixes applied only to real failures
77+
- revalidation performed after fixes
78+
- no start_of_day changes
79+
- unrelated working-tree changes preserved
80+
81+
## Roadmap advancement
82+
This PR may advance only if fully executed and validated:
83+
- sample system validation / repair work tied directly to this lane
84+
- any directly related sample stability item only if actually completed here
85+
86+
Do not advance unrelated roadmap items in this PR.

samples/phase-03/0325/game/GravityInputController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ David Quesenberry
44
03/24/2026
55
GravityInputController.js
66
*/
7-
import { GamepadInputAdapter } from '/src/engine/input/index.js';
8-
import { clamp } from '/src/engine/utils/math.js';
7+
import { GamepadInputAdapter } from '../../../../src/engine/input/index.js';
8+
import { clamp } from '../../../../src/engine/utils/math.js';
99

1010
export default class GravityInputController {
1111
constructor(input) {

0 commit comments

Comments
 (0)