Skip to content

Commit f8d467f

Browse files
author
DavidQ
committed
Update Workspace loader to consume strict tools manifest payloads - PR 11.20
1 parent 9ea6a8c commit f8d467f

9 files changed

Lines changed: 511 additions & 63 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33
model: gpt-5.3-codex
44
reasoning: high
55

6-
Apply PR_11_19_SCHEMA_CLEANUP_TOOL_PAYLOADS_AND_PALETTE_CANONICALIZATION.
6+
Apply PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT.
77

88
Required:
9-
- Make `tools/schemas/tools/palette-browser.schema.json` the only canonical palette schema.
10-
- Move/merge correct palette schema content into `palette-browser.schema.json`.
11-
- Delete/remove all `tools/schemas/palette.schema*` files.
12-
- Ensure palette-browser schema is strict with `additionalProperties: false` everywhere.
13-
- Review `tools/schemas/sample.tool-payload.schema.json`; tools must validate only direct tool JSON schemas, not broad sample wrapper objects.
14-
- Remove/demote/narrow `sample.tool-payload.schema.json` so it cannot be used to validate arbitrary extra objects as tool payloads.
15-
- Rename tool schema `config` fields to a clearer field, preferably `payload`, consistently across schemas and sample 1902.
16-
- Replace generic use of `gameId` with a more generic identifier, preferably `projectId`; keep `gameId` only inside explicitly game-specific schemas.
17-
- Update Workspace manifest `$ref` targets to the canonical tool schemas.
18-
- Keep full strict mode: no `additionalProperties: true`, no omitted object `additionalProperties`.
19-
- Validate/rebuild only sample 1902 as needed.
20-
- Do not modify other samples.
9+
- Update Workspace loader/runtime to consume the corrected strict Workspace manifest shape where tool payloads live under `tools`.
10+
- Build available tool list from `Object.keys(manifest.tools)` filtered/validated against tool registry.
11+
- Ensure valid tools are not silently dropped.
12+
- Map singular `tools.palette` to the Palette Browser UI if that is the schema decision, but do not let it become the only visible tool.
13+
- Stop relying on old top-level `palettes`, `activeWorkspaceTools`, `games[].tools`, top-level `config`, top-level `payload`, or sample tool-payload wrappers for sample 1902.
14+
- Validate sample 1902 opens Workspace with all valid tools, not only Palette.
15+
- Do not loosen schemas.
2116
- Do not add fallback/default/hidden data.
17+
- Do not modify other samples.
2218
- Do not modify start_of_day folders.
23-
- Add validation report at docs/dev/reports/PR_11_19_SCHEMA_CLEANUP_TOOL_PAYLOADS_AND_PALETTE_CANONICALIZATION_report.md.
24-
- Return ZIP artifact at tmp/PR_11_19_SCHEMA_CLEANUP_TOOL_PAYLOADS_AND_PALETTE_CANONICALIZATION_delta.zip.
19+
- Add validation report at docs/dev/reports/PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT_report.md.
20+
- Return ZIP artifact at tmp/PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT_delta.zip.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Canonicalize palette schema and enforce direct strict tool payload schemas - PR 11.19
1+
Update Workspace loader to consume strict tools manifest payloads - PR 11.20
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# PR 11.20 - Workspace Loader Schema V2 Tools Payload Support Report
2+
3+
## PASS/FAIL
4+
PASS
5+
6+
## Files Changed
7+
- tools/Workspace Manager/main.js
8+
- tools/shared/platformShell.js
9+
- docs/dev/reports/PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT_report.md
10+
11+
## Old Loader Assumptions Found
12+
- Workspace Manager previously derived available tools from registry/game filters, not strictly from `Object.keys(manifest.tools)` when a sample workspace manifest was provided.
13+
- Shared shell sample preset scoping previously matched `manifest.tools` keys by exact tool id only, so a singular `tools.palette` key would not resolve for `palette-browser` launches.
14+
15+
## New Loader Path
16+
- Workspace Manager now reads `samplePresetPath` workspace manifest, classifies `manifest.tools` keys, validates each key against tool host registry IDs (with explicit singular palette mapping), validates payload `tool` id equality, and uses accepted tool IDs as the active tool list filter.
17+
- Shared shell scoped preset resolution now supports singular `tools.palette` mapped to `palette-browser` and rejects mismatched/malformed tool payload entries.
18+
19+
## Sample 1902 Manifest Tool Key Evidence
20+
Source:
21+
- samples/phase-19/1902/sample.1902.workspace-all-tools.json
22+
23+
Discovered tool keys:
24+
- vector-map-editor
25+
- vector-asset-studio
26+
- tile-map-editor
27+
- parallax-editor
28+
- sprite-editor
29+
- skin-editor
30+
- asset-browser
31+
- palette-browser
32+
- state-inspector
33+
- replay-visualizer
34+
- performance-profiler
35+
- physics-sandbox
36+
- asset-pipeline-tool
37+
- tile-model-converter
38+
- 3d-json-payload-normalizer
39+
- 3d-asset-viewer
40+
- 3d-camera-path-editor
41+
- palette
42+
43+
Accepted tool ids:
44+
- vector-map-editor
45+
- vector-asset-studio
46+
- tile-map-editor
47+
- parallax-editor
48+
- sprite-editor
49+
- skin-editor
50+
- asset-browser
51+
- palette-browser
52+
- state-inspector
53+
- replay-visualizer
54+
- performance-profiler
55+
- physics-sandbox
56+
- asset-pipeline-tool
57+
- tile-model-converter
58+
- 3d-json-payload-normalizer
59+
- 3d-asset-viewer
60+
- 3d-camera-path-editor
61+
62+
Rejected tool keys:
63+
- none
64+
65+
Result:
66+
- Workspace manifest resolves to 17 accepted tool IDs, proving Workspace availability is not Palette-only.
67+
68+
## Proof Workspace Shows More Than Palette
69+
- Accepted manifest tools for sample 1902 include 17 valid tool IDs (not only `palette-browser`).
70+
- Launch smoke includes PASS for `samples/phase-19/1902/index.html` and all listed active tools, including but not limited to Asset Browser, Sprite Editor, Tilemap Studio, Vector Asset Studio, Vector Map Editor, and Palette Browser.
71+
72+
## Validation Commands and Results
73+
- `node --check "tools/Workspace Manager/main.js"` -> PASS
74+
- `node --check "tools/shared/platformShell.js"` -> PASS
75+
- `npm run test:launch-smoke -- --tools --samples --sample-range=1902-1902` -> PASS (suite executed; report summary `PASS=287 FAIL=0` includes sample `1902` PASS and all active tool entries PASS)
76+
- Manifest classification evidence command (Node inline script against sample 1902 + tool host manifest) -> PASS (`acceptedCount=17`, `rejected=[]`)
77+
78+
## Scope Confirmation
79+
- No schema loosening was introduced.
80+
- No fallback/default/hidden data was added.
81+
- No standalone sample behavior paths were modified.
82+
- No files under `start_of_day` were changed.
83+
- No samples other than sample 1902 were touched by this PR implementation (code changes were limited to Workspace loader/shared shell paths).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# REPORT_PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT
2+
3+
## Summary
4+
This PR updates Workspace runtime loading to match the corrected strict Workspace manifest schema.
5+
6+
## Target
7+
- Workspace reads `manifest.tools`.
8+
- Tool list is built from valid manifest tool keys.
9+
- Palette is singular but not exclusive.
10+
- Sample 1902 shows all valid tools.

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-29T02:49:57.040Z
3+
Generated: 2026-04-29T03:15:56.917Z
44

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

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# BUILD_PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT
2+
3+
## Required Codex Work
4+
5+
### 1. Inspect current Workspace loader path
6+
Find where Workspace loads manifests and determines available tools.
7+
8+
Expected areas:
9+
- tools/workspace*
10+
- tools/shared/platformShell*
11+
- tools/toolRegistry.js
12+
- any schema validation utilities
13+
- sample 1902 launch page only if required
14+
15+
### 2. Update loader to new manifest contract
16+
Workspace must consume the corrected shape:
17+
18+
```json
19+
{
20+
"$schema": ".../workspace.manifest.schema.json",
21+
"documentKind": "workspace-manifest",
22+
"schema": "html-js-gaming.project",
23+
"version": 1,
24+
"id": "sample-1902-workspace-all-tools",
25+
"name": "Sample 1902 Workspace All Tools",
26+
"tools": {
27+
"asset-browser": { "tool": "asset-browser", "version": "1", "payload": {} },
28+
"sprite-editor": { "tool": "sprite-editor", "version": "1", "payload": {} },
29+
"palette": { "tool": "palette-browser", "version": "1", "payload": {} }
30+
}
31+
}
32+
```
33+
34+
### 3. Build available tools from manifest.tools
35+
Available tools must come from:
36+
`Object.keys(manifest.tools)`
37+
38+
Then:
39+
- validate key exists in Workspace-supported registry list
40+
- validate payload `tool` matches the registered tool id or the documented special-case mapping for singular palette
41+
- reject/report unknown keys
42+
- do not silently drop valid tools
43+
44+
### 4. Palette mapping rule
45+
Resolve the naming ambiguity explicitly:
46+
- If schema uses `tools.palette` as the singular palette payload, map it to the Palette Browser tool UI.
47+
- Do not treat Palette as the only workspace tool.
48+
- Do not require a top-level `palettes` collection.
49+
- Do not require a separate `sample.1902.palette.json`.
50+
51+
### 5. Remove old assumptions
52+
Remove or bypass old loader behavior that expects:
53+
- `palettes`
54+
- `games[].tools`
55+
- `activeWorkspaceTools`
56+
- top-level `config`
57+
- top-level `payload`
58+
- broad sample tool-payload schema wrappers
59+
60+
unless still needed for legacy files and clearly documented as compatibility, not as the 1902 path.
61+
62+
### 6. Validation report
63+
Create:
64+
docs/dev/reports/PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT_report.md
65+
66+
Report must include:
67+
- files changed
68+
- old loader assumption found
69+
- new loader path
70+
- all manifest tool keys discovered for sample 1902
71+
- tool keys accepted
72+
- tool keys rejected with reason
73+
- proof Workspace shows more than Palette
74+
- validation command/results
75+
- confirmation no other samples changed
76+
- confirmation no start_of_day changes
77+
78+
## Constraints
79+
- One PR purpose only.
80+
- No schema loosening.
81+
- No fallback/default/hidden data.
82+
- No unrelated UI polish.
83+
- No edits to standalone sample behavior.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# PLAN_PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT
2+
3+
## Purpose
4+
Update the Workspace loader/runtime to consume the corrected strict Workspace manifest schema where all tool payloads live under `tools`.
5+
6+
## Problem
7+
Sample 1902 now contains a schema-shaped `tools` object with many tool payloads, but Workspace still shows only Palette. This means the Workspace UI/loader is still using an older contract, likely reading:
8+
- top-level palettes
9+
- old config/payload branches
10+
- old sample tool-payload wrappers
11+
- a hardcoded Palette-only fallback
12+
- or filtering only one recognized tool
13+
14+
## Scope
15+
- Workspace loader/runtime only.
16+
- Sample 1902 validation only.
17+
- Do not rebuild all tools.
18+
- Do not modify other samples.
19+
- Do not modify start_of_day folders.
20+
21+
## Acceptance
22+
- Workspace reads `sample.1902.workspace-all-tools.json` using the new schema:
23+
- top-level workspace metadata
24+
- `tools` object
25+
- one entry per supported tool id
26+
- `tools.palette` / `tools.palette-browser` handled correctly per schema decision
27+
- Workspace tool list is built from `Object.keys(manifest.tools)` filtered through registry-supported ids.
28+
- Workspace no longer shows only Palette when valid tool payloads exist.
29+
- Unknown tool ids fail or are reported clearly.
30+
- Invalid tool payloads fail validation clearly.
31+
- Sample 1902 opens Workspace with all valid supported tools.

0 commit comments

Comments
 (0)