Skip to content

Commit 51a857b

Browse files
author
DavidQ
committed
Verify all tools enforce direct JSON-only input contract - PR 11.129
1 parent c4cccd5 commit 51a857b

20 files changed

Lines changed: 242 additions & 435 deletions

docs/dev/codex_commands.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@ Reasoning: high
66
STRICT SCOPE MODE
77

88
ALLOWED FILES:
9-
- routing files only
9+
- tools/schemas/tools/*.json
10+
- routing files ONLY if needed
1011

11-
TASK:
12+
EXECUTION:
1213

13-
1. Find payload passing code
14-
2. Remove:
15-
- normalize*
16-
- transform*
17-
- convert*
18-
- map*
19-
- enrich*
20-
3. Ensure payload passed directly
14+
FOR EACH TOOL:
2115

22-
VERIFY:
23-
- payload before == payload after
16+
1. Load schema
17+
2. Test 3 inputs:
18+
A valid tool JSON → must pass
19+
B wrapper JSON → must fail
20+
C parent JSON → must fail
2421

25-
REPORT:
26-
docs/dev/reports/no_transform_routing_11_128.txt
22+
3. If B or C passes:
23+
- fix schema (tighten)
24+
- OR fix routing
2725

28-
FAIL if any mutation remains
26+
4. DO NOT:
27+
- add compatibility
28+
- expand schema
29+
30+
5. REPORT:
31+
docs/dev/reports/tool_input_contract_11_129.txt
32+
33+
FAIL if any tool violates rule

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Enforce zero-transform payload routing across workspace/tool launch - PR 11.128
1+
Verify all tools enforce direct JSON-only input contract - PR 11.129
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Tool Input Contract Report: 11_129
2+
Date: 2026-04-30
3+
Repo: C:/Users/davidq/Documents/GitHub/HTML-JavaScript-Gaming
4+
Mode: STRICT SCOPE
5+
6+
Scope
7+
- Allowed schema files: tools/schemas/tools/*.json
8+
- Routing files: not modified (not needed)
9+
10+
Execution
11+
For each tool schema under tools/schemas/tools/*.json:
12+
1. Loaded schema.
13+
2. Tested:
14+
A: valid direct tool JSON generated from required root contract.
15+
B: wrapper JSON { tool, version, payload: A }.
16+
C: parent/workspace JSON containing tool payload under tools[toolId].
17+
3. Verified contract:
18+
A must pass, B must fail, C must fail.
19+
20+
Schema tightening applied
21+
- Wrapper-shape roots were tightened to payload-only roots.
22+
- Removed root wrapper fields from schema contracts: tool/version/payload.
23+
- Lifted former payload child properties to root.
24+
- No compatibility branches added.
25+
- No schema expansion performed.
26+
27+
Per-tool verification matrix
28+
- 3d-asset-viewer: A=pass, B=fail, C=fail
29+
- 3d-camera-path-editor: A=pass, B=fail, C=fail
30+
- 3d-json-payload: A=pass, B=fail, C=fail
31+
- asset-browser: A=pass, B=fail, C=fail
32+
- asset-pipeline: A=pass, B=fail, C=fail
33+
- palette-browser: A=pass, B=fail, C=fail
34+
- parallax-editor: A=pass, B=fail, C=fail
35+
- performance-profiler: A=pass, B=fail, C=fail
36+
- physics-sandbox: A=pass, B=fail, C=fail
37+
- replay-visualizer: A=pass, B=fail, C=fail
38+
- skin-editor: A=pass, B=fail, C=fail
39+
- sprite-editor: A=pass, B=fail, C=fail
40+
- state-inspector: A=pass, B=fail, C=fail
41+
- svg-asset-studio: A=pass, B=fail, C=fail
42+
- tile-map-editor: A=pass, B=fail, C=fail
43+
- tile-model-converter: A=pass, B=fail, C=fail
44+
- vector-map-editor: A=pass, B=fail, C=fail
45+
46+
Result
47+
- PASS: No tool violates the input contract rule.
48+
- FAIL condition not triggered.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# BUILD_PR_LEVEL_11_129_VERIFY_ALL_TOOLS_DIRECT_JSON_INPUT
2+
3+
## Purpose
4+
Verify ALL tools follow the rule: tool input = direct JSON only (no wrapper, no transform, no preset).
5+
6+
## STRICT SCOPE
7+
8+
ALLOWED FILES:
9+
- tools/** (read + minimal fix if violation)
10+
- routing files (only if needed to remove transform)
11+
12+
NO OTHER FILES
13+
14+
## RULE
15+
16+
Tool must:
17+
- receive JSON file
18+
- validate against its schema
19+
- render
20+
21+
Tool must NOT:
22+
- accept wrapper {tool,payload}
23+
- accept game/workspace JSON
24+
- build input
25+
- transform input
26+
- fallback to defaults
27+
28+
## REQUIRED VALIDATION
29+
30+
For EACH tool:
31+
32+
1. Load schema
33+
2. Identify expected JSON shape
34+
3. Test:
35+
- valid tool JSON → PASS
36+
- wrapper JSON → FAIL
37+
- parent JSON → FAIL
38+
39+
## FIX RULE
40+
41+
If violation:
42+
- fix schema OR routing (minimal)
43+
- do NOT expand schema
44+
- do NOT add compatibility
45+
46+
## REPORT
47+
48+
docs/dev/reports/tool_input_contract_11_129.txt:
49+
- tool name
50+
- schema path
51+
- pass/fail results
52+
- fixes applied
53+
54+
## FAILURE
55+
56+
FAIL if ANY tool:
57+
- accepts wrapper
58+
- accepts parent JSON
59+
- mutates input

tools/schemas/tools/3d-asset-viewer.schema.json

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,13 @@
33
"$id": "tools/schemas/tools/3d-asset-viewer.schema.json",
44
"title": "3d-asset-viewer Payload",
55
"type": "object",
6-
"required": ["tool", "version", "payload"],
6+
"required": [
7+
"asset3d"
8+
],
79
"additionalProperties": false,
810
"properties": {
9-
"tool": {
10-
"const": "3d-asset-viewer"
11-
},
12-
"version": {
13-
"oneOf": [
14-
{
15-
"type": "string",
16-
"minLength": 1
17-
},
18-
{
19-
"type": "integer",
20-
"minimum": 1
21-
}
22-
]
23-
},
24-
"payload": {
25-
"type": "object",
26-
"required": ["asset3d"],
27-
"additionalProperties": false,
28-
"properties": {
29-
"asset3d": {
30-
"$ref": "#/$defs/jsonValue"
31-
}
32-
}
11+
"asset3d": {
12+
"$ref": "#/$defs/jsonValue"
3313
}
3414
},
3515
"$defs": {

tools/schemas/tools/3d-camera-path-editor.schema.json

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,13 @@
33
"$id": "tools/schemas/tools/3d-camera-path-editor.schema.json",
44
"title": "3d-camera-path-editor Payload",
55
"type": "object",
6-
"required": ["tool", "version", "payload"],
6+
"required": [
7+
"cameraPath"
8+
],
79
"additionalProperties": false,
810
"properties": {
9-
"tool": {
10-
"const": "3d-camera-path-editor"
11-
},
12-
"version": {
13-
"oneOf": [
14-
{
15-
"type": "string",
16-
"minLength": 1
17-
},
18-
{
19-
"type": "integer",
20-
"minimum": 1
21-
}
22-
]
23-
},
24-
"payload": {
25-
"type": "object",
26-
"required": ["cameraPath"],
27-
"additionalProperties": false,
28-
"properties": {
29-
"cameraPath": {
30-
"$ref": "#/$defs/jsonValue"
31-
}
32-
}
11+
"cameraPath": {
12+
"$ref": "#/$defs/jsonValue"
3313
}
3414
},
3515
"$defs": {

tools/schemas/tools/3d-json-payload.schema.json

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,13 @@
33
"$id": "tools/schemas/tools/3d-json-payload.schema.json",
44
"title": "3d-json-payload Payload",
55
"type": "object",
6-
"required": ["tool", "version", "payload"],
6+
"required": [
7+
"mapPayload"
8+
],
79
"additionalProperties": false,
810
"properties": {
9-
"tool": {
10-
"const": "3d-json-payload"
11-
},
12-
"version": {
13-
"oneOf": [
14-
{
15-
"type": "string",
16-
"minLength": 1
17-
},
18-
{
19-
"type": "integer",
20-
"minimum": 1
21-
}
22-
]
23-
},
24-
"payload": {
25-
"type": "object",
26-
"required": ["mapPayload"],
27-
"additionalProperties": false,
28-
"properties": {
29-
"mapPayload": {
30-
"$ref": "#/$defs/jsonValue"
31-
}
32-
}
11+
"mapPayload": {
12+
"$ref": "#/$defs/jsonValue"
3313
}
3414
},
3515
"$defs": {

tools/schemas/tools/asset-browser.schema.json

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,11 @@
33
"$id": "tools/schemas/tools/asset-browser.schema.json",
44
"title": "asset-browser Payload",
55
"type": "object",
6-
"required": ["tool", "version", "assets", "payload"],
6+
"required": [
7+
"assets"
8+
],
79
"additionalProperties": false,
810
"properties": {
9-
"tool": {
10-
"const": "asset-browser"
11-
},
12-
"version": {
13-
"oneOf": [
14-
{
15-
"type": "string",
16-
"minLength": 1
17-
},
18-
{
19-
"type": "integer",
20-
"minimum": 1
21-
}
22-
]
23-
},
2411
"assets": {
2512
"type": "object",
2613
"additionalProperties": false,
@@ -35,7 +22,9 @@
3522
},
3623
{
3724
"not": {
38-
"required": ["stretchOverride"]
25+
"required": [
26+
"stretchOverride"
27+
]
3928
}
4029
}
4130
]
@@ -52,27 +41,24 @@
5241
]
5342
}
5443
},
55-
"payload": {
56-
"type": "object",
57-
"required": [],
58-
"additionalProperties": false,
59-
"properties": {
60-
"assetBrowserPreset": {
61-
"$ref": "#/$defs/jsonValue"
62-
},
63-
"approvedAssets": {
64-
"$ref": "#/$defs/jsonValue"
65-
},
66-
"importHubPreset": {
67-
"$ref": "#/$defs/jsonValue"
68-
}
69-
}
44+
"assetBrowserPreset": {
45+
"$ref": "#/$defs/jsonValue"
46+
},
47+
"approvedAssets": {
48+
"$ref": "#/$defs/jsonValue"
49+
},
50+
"importHubPreset": {
51+
"$ref": "#/$defs/jsonValue"
7052
}
7153
},
7254
"$defs": {
7355
"assetEntry": {
7456
"type": "object",
75-
"required": ["path", "kind", "source"],
57+
"required": [
58+
"path",
59+
"kind",
60+
"source"
61+
],
7662
"additionalProperties": false,
7763
"properties": {
7864
"path": {
@@ -81,15 +67,28 @@
8167
},
8268
"kind": {
8369
"type": "string",
84-
"enum": ["image", "audio", "font", "svg", "data", "other"]
70+
"enum": [
71+
"image",
72+
"audio",
73+
"font",
74+
"svg",
75+
"data",
76+
"other"
77+
]
8578
},
8679
"source": {
8780
"type": "string",
88-
"enum": ["workspace-manager", "asset-browser", "manifest"]
81+
"enum": [
82+
"workspace-manager",
83+
"asset-browser",
84+
"manifest"
85+
]
8986
},
9087
"stretchOverride": {
9188
"type": "object",
92-
"required": ["uniformEdgeStretchPx"],
89+
"required": [
90+
"uniformEdgeStretchPx"
91+
],
9392
"additionalProperties": false,
9493
"properties": {
9594
"uniformEdgeStretchPx": {

0 commit comments

Comments
 (0)