Skip to content

Commit 2d92f18

Browse files
author
DavidQ
committed
BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION
- Strengthened Workspace Manager game-open test to validate asset presence - Added shared palette and expected asset assertions - Added Bouncing-ball missing palette regression coverage PR Details: - Prevents page-load-only false positives - No validators - No start_of_day changes
1 parent 34be8f1 commit 2d92f18

11 files changed

Lines changed: 1164 additions & 64 deletions
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# Expected Codex Return / Delta Template
22

3-
## Expected Changed/Added Files
3+
## Expected Changed Files
44
- `tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs` or equivalent
5-
- `tests/run-tests.mjs` only if needed to include the new test in the correct suite
6-
- `package.json` only if a focused npm script is needed
7-
- `docs/dev/reports/level_10_2_workspace_manager_open_test_report.md`
8-
- `docs/dev/reports/level_10_2_asteroids_platform_demo_boundary_audit.md`
5+
- `docs/dev/reports/level_10_2a_workspace_manager_asset_presence_validation_report.md`
96
- `docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md` if status update needed
107

118
## Expected Validation Summary
12-
- `games_index_test_added=true`
13-
- `games_discovered=<count>`
14-
- `workspace_manager_actions_checked=<count>`
15-
- `actions_with_gameId=<count>`
16-
- `actions_with_mount_game=<count>`
17-
- `actions_using_legacy_game_query=0`
18-
- `workspace_manager_diagnostic_failures=0`
19-
- `asteroids_platform_demo_boundary_audited=true`
9+
- `games_checked=<count>`
10+
- `workspace_manager_open_actions_valid=<count>`
11+
- `diagnostic_failures=0`
12+
- `games_with_shared_palette=<count>`
13+
- `games_missing_shared_palette=<count>`
14+
- `bouncing_ball_shared_palette_present=true`
15+
- `games_with_expected_assets=<count>`
16+
- `asset_presence_test_added=true`
2017
- `start_of_day_changes=0`
2118

2219
## Expected Delta ZIP
2320
Codex must create:
2421

25-
`tmp/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT_delta.zip`
22+
`tmp/BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION_delta.zip`
Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,52 @@
11
# Level 10.2 Asteroids Platform Demo Boundary Audit
22

3-
## To Be Completed By Codex
4-
- Identify all imports of `tools/shared/asteroidsPlatformDemo.js`.
5-
- Identify imports used by that file.
6-
- Determine whether it is tool-generic, game-specific, sample-specific, or engine-generic.
7-
- Recommend final owning folder.
8-
- State whether move is safe now or should be a follow-up PR.
3+
## File Audited
4+
- `tools/shared/asteroidsPlatformDemo.js`
5+
6+
## Consumers (Who Imports It)
7+
- `tests/games/AsteroidsPlatformDemo.test.mjs`
8+
- `tests/games/AsteroidsAssetReferenceAdoption.test.mjs`
9+
10+
No runtime game boot/module import was found outside tests.
11+
12+
## Imports Used By `asteroidsPlatformDemo.js`
13+
- `./projectAssetValidation.js`
14+
- `./projectAssetRemediation.js`
15+
- `./projectPackaging.js`
16+
- `./runtimeAssetLoader.js`
17+
- `./gameplaySystemLayer.js`
18+
- `./gameTemplates.js`
19+
- `./multiTargetExport.js`
20+
- `./debugVisualizationLayer.js`
21+
- `./performanceProfiler.js`
22+
- `./publishingPipeline.js`
23+
- `./vector/vectorAssetBridge.js`
24+
- `../../src/shared/utils/jsonUtils.js`
25+
- `./pipeline/runtimeAssetLookup.js`
26+
27+
## Domain Ownership Assessment
28+
- The file is strongly Asteroids/game-specific:
29+
- hardcoded `Asteroids` identifiers
30+
- `games/Asteroids/...` manifest fragment paths
31+
- `games/Asteroids/main.js` runtime handoff expectations
32+
- Asteroids-specific vector/tilemap/parallax/palette asset IDs
33+
- It orchestrates tool/shared pipeline modules, but the orchestration content is game-domain specific.
34+
35+
## Boundary Conclusion
36+
- Current placement in `tools/shared/` is a boundary smell.
37+
- The file is not a tool-agnostic shared utility.
38+
39+
## Recommended Target
40+
- Preferred ownership target:
41+
- `games/Asteroids/shared/asteroidsPlatformDemo.js`
42+
- Alternative if retained as test fixture-only orchestration:
43+
- `tests/fixtures/games/asteroidsPlatformDemo.js`
44+
45+
## Move Decision For This PR
46+
- **No move in Level 10.2**.
47+
- Reason:
48+
- safe move requires coordinated import updates and re-validation across the Asteroids demo tests and dependent pipeline assumptions.
49+
- this PR scope is focused on Workspace Manager open-action runtime testing plus audit.
50+
51+
## Follow-Up Recommendation
52+
- Create a focused follow-up BUILD to relocate `tools/shared/asteroidsPlatformDemo.js` to a game-owned or test-fixture-owned boundary and update imports atomically.
Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,71 @@
11
# Level 10.2 Workspace Manager Open Test Report
22

3-
## To Be Completed By Codex
4-
- List games discovered from `games/index.html`.
5-
- List Workspace Manager actions found.
6-
- Confirm `gameId` query usage.
7-
- Confirm `mount=game`.
8-
- Confirm no `?game=` legacy query usage.
9-
- Confirm no Workspace Manager diagnostic appears.
3+
## Scope
4+
- BUILD: `BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT`
5+
- Focused runtime/browser test added:
6+
- `tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs`
7+
- Focused npm command added:
8+
- `npm run test:workspace-manager:games`
9+
10+
## Test Coverage
11+
- Opens `/games/index.html` through local static server.
12+
- Discovers game cards from DOM (`#games-index-list article[data-game-id]`).
13+
- Discovers Workspace Manager actions (`a[data-workspace-launch-href]`) per launchable game.
14+
- Validates each Workspace Manager action URL:
15+
- path resolves to `tools/Workspace Manager/index.html`
16+
- query contains `gameId=<id>`
17+
- query contains `mount=game`
18+
- query does not use legacy `?game=`
19+
- Opens each Workspace Manager URL and verifies diagnostic text does not appear:
20+
- `Workspace Manager game launch requires a valid gameId`
21+
22+
## Validation Run
23+
- Command: `npm run test:workspace-manager:games`
24+
- Result: `PASS`
25+
26+
## Discovery And Counts
27+
- Games discovered from metadata: `29`
28+
- Game cards discovered from DOM: `29`
29+
- Launchable games (expected Workspace Manager actions): `11`
30+
- Workspace Manager actions discovered: `11`
31+
32+
## Game IDs Discovered From `games/index.html`
33+
- `AITargetDummy`
34+
- `ArenaShooter`
35+
- `Asteroids`
36+
- `Bouncing-ball`
37+
- `Breakout`
38+
- `ConnectFour`
39+
- `DefenderLite`
40+
- `DonkeyKong`
41+
- `DualStickArena`
42+
- `Frogger`
43+
- `FullArenaShooter`
44+
- `Galaga`
45+
- `GravityWell`
46+
- `KingOfTheIceberg`
47+
- `MultiplayerOptional`
48+
- `Othello`
49+
- `Pacman`
50+
- `PlatformerDemo`
51+
- `Pong`
52+
- `RallyX`
53+
- `ReplaySystem`
54+
- `Robotron2084`
55+
- `ScrollingWorldTest`
56+
- `SolarSystem`
57+
- `SpaceDuel`
58+
- `SpaceInvaders`
59+
- `TicTacToe`
60+
- `TileCollisionDemo`
61+
- `vector-arcade-sample`
62+
63+
## Query Validation Summary
64+
- actions with `gameId=<id>`: `11/11`
65+
- actions with `mount=game`: `11/11`
66+
- actions using legacy `?game=`: `0`
67+
- Workspace Manager diagnostic failures after open: `0`
68+
- structural/action validation failures: `0`
69+
70+
## Notes
71+
- The new test is games-index/workspace-manager specific and does not execute sample or tool launch suites.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Level 10.2A Workspace Manager Asset Presence Validation Report
2+
3+
## Scope
4+
- BUILD: `BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION`
5+
- Extended runtime/browser test: `tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs`
6+
- Command: `npm run test:workspace-manager:games`
7+
- Samples/tools suites were not executed; this path only targets `games/index.html` Workspace Manager actions.
8+
9+
## Existing Checks Preserved
10+
- actions with `gameId=<id>`: `11/11`
11+
- actions with `mount=game`: `11/11`
12+
- actions using legacy `?game=`: `0`
13+
- diagnostic failures: `0`
14+
15+
## Added Asset Presence Checks
16+
- workspace loaded in mounted tool frame: `11/11`
17+
- shared palette present: `0/11`
18+
- shared assets present: `10/11`
19+
- asset presence failures: `24`
20+
21+
## Bouncing-ball Regression Check
22+
- shared palette present: `False`
23+
- palette label: `No shared palette selected`
24+
- expected skin visible (`Bouncing Ball Classic Skin`): `True`
25+
- failure(s):
26+
- Shared palette missing for Bouncing-ball.
27+
- Manifest palette expected but UI shows missing palette for Bouncing-ball.
28+
- Bouncing-ball regression: UI shows "Shared Palette: No shared palette selected".
29+
30+
## Per-Game Results
31+
| Game | Open Action Valid | Diagnostic Absent | Workspace Loaded | Shared Palette Present | Shared Assets Present | Expected Skin | Observed Shared Asset | Failures |
32+
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
33+
| Bouncing-ball | yes | yes | yes | no | yes | Bouncing Ball Classic Skin | Bouncing Ball Classic Skin | Shared palette missing for Bouncing-ball.; Manifest palette expected but UI shows missing palette for Bouncing-ball.; Bouncing-ball regression: UI shows "Shared Palette: No shared palette selected". |
34+
| Breakout | yes | yes | yes | no | yes | Breakout Classic Skin | Breakout Classic Skin | Shared palette missing for Breakout.; Manifest palette expected but UI shows missing palette for Breakout. |
35+
| SolarSystem | yes | yes | yes | no | yes | Solar System Classic Skin | Solar System Classic Skin | Shared palette missing for SolarSystem.; Manifest palette expected but UI shows missing palette for SolarSystem. |
36+
| GravityWell | yes | yes | yes | no | yes | n/a | image.gravitywell.preview | Shared palette missing for GravityWell.; Manifest palette expected but UI shows missing palette for GravityWell. |
37+
| Pong | yes | yes | yes | no | yes | Pong Classic Skin | Pong Classic Skin | Shared palette missing for Pong.; Manifest palette expected but UI shows missing palette for Pong. |
38+
| Asteroids | yes | yes | yes | no | no | n/a | No shared asset selected | Shared palette missing for Asteroids.; Shared assets missing for Asteroids.; Manifest palette expected but UI shows missing palette for Asteroids. |
39+
| SpaceInvaders | yes | yes | yes | no | yes | n/a | audio.space-invaders.shoot | Shared palette missing for SpaceInvaders.; Manifest palette expected but UI shows missing palette for SpaceInvaders. |
40+
| SpaceDuel | yes | yes | yes | no | yes | n/a | audio.space-duel.thrust | Shared palette missing for SpaceDuel.; Manifest palette expected but UI shows missing palette for SpaceDuel. |
41+
| AITargetDummy | yes | yes | yes | no | yes | n/a | image.ai-target-dummy.preview | Shared palette missing for AITargetDummy.; Manifest palette expected but UI shows missing palette for AITargetDummy. |
42+
| Pacman | yes | yes | yes | no | yes | n/a | image.pacman.preview-svg | Shared palette missing for Pacman.; Manifest palette expected but UI shows missing palette for Pacman. |
43+
| vector-arcade-sample | yes | yes | yes | no | yes | n/a | Vector Arcade Template Sprite | Shared palette missing for vector-arcade-sample.; Manifest palette expected but UI shows missing palette for vector-arcade-sample. |
44+
45+
## Failure Summary
46+
- Test intentionally fails when required data is missing after page load. Current failures:
47+
- Shared palette missing for Bouncing-ball.
48+
- Manifest palette expected but UI shows missing palette for Bouncing-ball.
49+
- Bouncing-ball regression: UI shows "Shared Palette: No shared palette selected".
50+
- Shared palette missing for Breakout.
51+
- Manifest palette expected but UI shows missing palette for Breakout.
52+
- Shared palette missing for SolarSystem.
53+
- Manifest palette expected but UI shows missing palette for SolarSystem.
54+
- Shared palette missing for GravityWell.
55+
- Manifest palette expected but UI shows missing palette for GravityWell.
56+
- Shared palette missing for Pong.
57+
- Manifest palette expected but UI shows missing palette for Pong.
58+
- Shared palette missing for Asteroids.
59+
- Shared assets missing for Asteroids.
60+
- Manifest palette expected but UI shows missing palette for Asteroids.
61+
- Shared palette missing for SpaceInvaders.
62+
- Manifest palette expected but UI shows missing palette for SpaceInvaders.
63+
- Shared palette missing for SpaceDuel.
64+
- Manifest palette expected but UI shows missing palette for SpaceDuel.
65+
- Shared palette missing for AITargetDummy.
66+
- Manifest palette expected but UI shows missing palette for AITargetDummy.
67+
- Shared palette missing for Pacman.
68+
- Manifest palette expected but UI shows missing palette for Pacman.
69+
- Shared palette missing for vector-arcade-sample.
70+
- Manifest palette expected but UI shows missing palette for vector-arcade-sample.
71+
72+
## Outcome
73+
- Result: `FAIL` (expected for current missing shared palette conditions).
74+
- Page-load-only false positives are prevented because the test now requires mounted shared palette/asset data, not just shell load.

docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,3 +899,5 @@
899899
- [x] Tool input alignment contract is documented as `toolInput = gameManifest.tools[toolId]` (no game-owned file-path JSON input).
900900
- [x] Palette standalone singleton correction is complete (`game.manifest.json` root `palette`, no tool-owned `palettes`).
901901
- [x] Palette tool singleton + tool section metadata correction is complete (`tools["palette-browser"].palette` + metadata on all tool sections).
902+
- [x] Games index Workspace Manager open-action browser test is complete (`gameId` + `mount=game`, legacy `?game=` rejected, diagnostic check included).
903+
- [x] `tools/shared/asteroidsPlatformDemo.js` shared-boundary audit is complete with move recommendation captured for follow-up.

docs/operations/dev/codex_commands.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,37 @@ MODEL: GPT-5.3-codex
22
REASONING: high
33

44
TASK:
5-
Apply BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.
5+
Apply BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION.
66

77
STEPS:
8-
1. Read docs/pr/PLAN_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.md.
9-
2. Read docs/pr/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.md.
10-
3. Add a focused runtime/browser test for `games/index.html`:
11-
- discover all games/cards/actions
12-
- validate "Open with Workspace Manager" uses `gameId=<id>&mount=game`
13-
- reject legacy `?game=`
14-
- ensure Workspace Manager diagnostic does not appear when clicked/opened
15-
4. Ensure the new test does not run samples or tools.
16-
5. Add a focused npm script only if useful, such as:
17-
- `test:workspace-manager:games`
18-
6. Audit `tools/shared/asteroidsPlatformDemo.js`:
19-
- imports
20-
- consumers
21-
- domain ownership
22-
- move recommendation
23-
7. Move `tools/shared/asteroidsPlatformDemo.js` only if safe and obvious; otherwise report follow-up.
24-
8. Write reports:
25-
- docs/dev/reports/level_10_2_workspace_manager_open_test_report.md
26-
- docs/dev/reports/level_10_2_asteroids_platform_demo_boundary_audit.md
27-
9. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
28-
- [ ] -> [.]
29-
- [.] -> [x]
30-
- no prose rewrite/delete
31-
10. Do not modify start_of_day.
8+
1. Read docs/pr/PLAN_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION.md.
9+
2. Read docs/pr/BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION.md.
10+
3. Open the Level 10.2 Workspace Manager open test.
11+
4. Extend it so it validates game data presence after opening each game through Workspace Manager.
12+
5. Keep existing checks:
13+
- gameId query
14+
- mount=game
15+
- no ?game=
16+
- no diagnostic
17+
6. Add asset presence checks:
18+
- shared palette present
19+
- expected shared assets/tool sections present
20+
- skin data present when expected
21+
7. Specifically fail Bouncing-ball if the UI shows:
22+
- `Shared Palette: No shared palette selected`
23+
8. Ensure this test does not run samples/tools.
24+
9. Write docs/dev/reports/level_10_2a_workspace_manager_asset_presence_validation_report.md.
25+
10. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
26+
- [ ] -> [.]
27+
- [.] -> [x]
28+
- no prose rewrite/delete
3229
11. Do not add validators.
33-
12. Create Codex delta ZIP:
34-
tmp/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT_delta.zip
30+
12. Do not modify start_of_day.
31+
13. Create Codex delta ZIP:
32+
tmp/BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION_delta.zip
3533

3634
ACCEPTANCE:
37-
- games index Workspace Manager action test exists
38-
- all game actions use gameId + mount=game
39-
- boundary audit exists
35+
- page-load-only false positives are prevented
36+
- missing palette is caught
37+
- Bouncing-ball missing palette issue is detected/fixed or reported
4038
- delta ZIP exists
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT
1+
BUILD_PR_LEVEL_10_2A_WORKSPACE_MANAGER_ASSET_PRESENCE_VALIDATION
22

3-
- Added games/index Workspace Manager open-action validation
4-
- Verified gameId + mount=game query contract
5-
- Audited tools/shared/asteroidsPlatformDemo.js boundary ownership
3+
- Strengthened Workspace Manager game-open test to validate asset presence
4+
- Added shared palette and expected asset assertions
5+
- Added Bouncing-ball missing palette regression coverage
66

77
PR Details:
8-
- Supports manifest/tool alignment work
9-
- No start_of_day changes
8+
- Prevents page-load-only false positives
109
- No validators
10+
- No start_of_day changes

0 commit comments

Comments
 (0)