Skip to content

Commit a651b0f

Browse files
author
DavidQ
committed
Require repair-or-report execution for direct JSON cleanup lane - PR 11.113
1 parent 6c7c4e0 commit a651b0f

19 files changed

Lines changed: 892 additions & 161 deletions

docs/dev/codex_commands.md

Lines changed: 105 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,124 @@ Model: GPT-5.3-codex
44
Reasoning: medium
55

66
## PR
7-
BUILD_PR_LEVEL_11_111_TEST_SCHEMA_RELOCATION_AND_INFER_PATH_REMOVAL
7+
BUILD_PR_LEVEL_11_113_CODEX_REPAIR_OR_REPORT_ENFORCEMENT
88

99
## Execute
1010

11-
1. Move test-only schema files out of runtime tool folders:
12-
- tools/palette-editor/tool.schema.json -> tests/fixtures/tool-schemas/palette-editor/tool.schema.json
13-
- tools/vector-asset-studio/tool.schema.json -> tests/fixtures/tool-schemas/vector-asset-studio/tool.schema.json
14-
- tools/vector-map-editor/tool.schema.json -> tests/fixtures/tool-schemas/vector-map-editor/tool.schema.json
11+
This PR exists because the previous run applied no changes and left reports empty.
1512

16-
2. Update any tests or scripts that referenced the old paths.
13+
### Mandatory Rule
1714

18-
3. Do not leave duplicate runtime copies at:
19-
- tools/palette-editor/tool.schema.json
20-
- tools/vector-asset-studio/tool.schema.json
21-
- tools/vector-map-editor/tool.schema.json
15+
Do not finish with empty reports.
2216

23-
4. Search focused tool input/loading/shared code for inference and compatibility helpers:
24-
- infer*
25-
- normalize*
26-
- transform*
27-
- convert*
28-
- coerce*
29-
- resolve*Legacy*
30-
- fallback*
31-
- default* when used as hidden input/data injection
32-
- alias/remap helpers
17+
For every requested item, do one:
18+
1. Fix it.
19+
2. Prove no fix is needed with file/path evidence.
20+
3. Report a precise blocker with file/path/line evidence and the next required action.
3321

34-
5. Remove the smallest safe set of shared inference/compatibility code that affects tool input/source/payload loading.
22+
### Repair Loop
3523

36-
6. Keep only allowed pre-schema checks:
37-
- file exists
38-
- JSON parse
24+
For each issue:
25+
1. Search.
26+
2. Record search scope and pattern.
27+
3. If found, fix if in scope.
28+
4. Re-run targeted validation.
29+
5. If not fixed, report exact blocker.
30+
6. Repeat until fixed or explicitly blocked.
3931

40-
7. Ensure all other input validation is schema-only.
32+
### Revisit all active cleanup requests
4133

42-
8. Ensure failures render visible screen errors:
43-
- missing file
44-
- malformed JSON
45-
- schema mismatch
34+
1. Direct JSON only:
35+
- no presets
36+
- no normalizers
37+
- no transformers
38+
- no converters
39+
- no default/demo/fallback data
4640

47-
9. Preserve direct flow:
48-
explicit JSON file -> schema validation -> render as-is
41+
2. Schema-only validation:
42+
- allowed pre-schema checks: file exists, JSON parse
43+
- all other validation belongs in schema
44+
- invalid input renders visible screen error
4945

50-
10. Preserve canonical names:
46+
3. Move test-only schema files:
47+
- tools/palette-editor/tool.schema.json
48+
- tools/vector-asset-studio/tool.schema.json
49+
- tools/vector-map-editor/tool.schema.json
50+
into:
51+
- tests/fixtures/tool-schemas/<tool-id>/tool.schema.json
52+
Remove runtime duplicates.
53+
54+
4. Remove/report shared/tool input code:
55+
- infer*
56+
- normalize*
57+
- tryLoadPreset*
58+
- buildPreset*
59+
- input-mutation replace*
60+
- legacy remappers
61+
- alias acceptance
62+
- fallback/default data injection
63+
64+
5. Enforce canonical names:
5165
- palette-browser
5266
- 3d-json-payload
5367
- asset-pipeline
5468

55-
11. Preserve compact primitive-array formatting.
56-
57-
12. Validate targeted paths:
58-
- moved fixture files exist
59-
- old runtime tool.schema.json files are gone
60-
- changed test/script references work
61-
- changed JSON parses
62-
- changed manifests validate
63-
- no removed helper references remain
64-
65-
13. Write reports:
66-
- docs/dev/reports/tool_schema_fixture_relocation_11_111.txt
67-
- docs/dev/reports/inference_path_removal_11_111.txt
68-
- docs/dev/reports/schema_only_runtime_check_11_111.txt
69-
70-
14. Roadmap:
71-
- update status markers only if execution-backed
72-
- do not rewrite roadmap text
73-
- do not delete roadmap text
74-
75-
15. Package Codex output ZIP at:
76-
tmp/PR_11_111_TEST_SCHEMA_RELOCATION_AND_INFER_PATH_REMOVAL.zip
69+
6. Remove stale names:
70+
- palette as a tool key/name
71+
- palette-editor
72+
- 3d-json-payload-normalizer
73+
- Asset Pipeline Tool
74+
- asset-pipeline-tool
75+
76+
7. Enforce sample/tool truthfulness:
77+
- if sample cannot load in aligned tool, remove the tool reference
78+
- do not add fake data
79+
80+
8. Restore compact primitive arrays:
81+
- primitive arrays must be compact grouped
82+
- do not expand simple arrays one value per line
83+
84+
### Validation
85+
86+
Run targeted validation and include command/result in reports:
87+
- changed JSON parses
88+
- changed manifests validate
89+
- helper references removed or justified
90+
- moved files exist
91+
- old files removed
92+
- invalid input shows visible screen error if affected path changed
93+
94+
### Reports
95+
96+
Write populated reports:
97+
- docs/dev/reports/repair_or_report_summary_11_113.txt
98+
- docs/dev/reports/json_schema_repair_loop_11_113.txt
99+
- docs/dev/reports/shared_code_cleanup_11_113.txt
100+
- docs/dev/reports/tool_binding_truthfulness_11_113.txt
101+
- docs/dev/reports/blockers_11_113.txt
102+
103+
Each report must include:
104+
- files searched
105+
- matches found
106+
- files changed
107+
- skipped items
108+
- exact reason skipped
109+
- validation command used
110+
- validation result
111+
- remaining blockers
112+
113+
If zero matches:
114+
- report the exact search pattern
115+
- report the scope searched
116+
- state that zero matches were found
117+
118+
### Roadmap
119+
120+
- status-only update if execution-backed
121+
- do not rewrite roadmap text
122+
- do not delete roadmap text
123+
124+
### Output
125+
126+
Package Codex output ZIP at:
127+
tmp/PR_11_113_CODEX_REPAIR_OR_REPORT_ENFORCEMENT.zip

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Move test tool schemas to fixtures and remove inference input paths - PR 11.111
1+
Require repair-or-report execution for direct JSON cleanup lane - PR 11.113
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
PR 11.113 Blockers
2+
Date: 2026-04-30
3+
4+
Blocker 1: Broad removal of tryLoadPreset/buildPreset helpers would break current standalone sample launch contract
5+
- Evidence
6+
- `tryLoadPresetFromQuery` exists in standalone tools:
7+
- tools/3D Asset Viewer/main.js
8+
- tools/3D Camera Path Editor/main.js
9+
- tools/3D JSON Payload/main.js
10+
- tools/Asset Pipeline/main.js
11+
- tools/Palette Browser/main.js
12+
- tools/Performance Profiler/main.js
13+
- tools/Physics Sandbox/main.js
14+
- tools/Replay Visualizer/main.js
15+
- tools/State Inspector/main.js
16+
- tools/Tile Model Converter/main.js
17+
- tools/Vector Map Editor/editor/VectorMapEditorApp.js
18+
- These paths also emit visible errors on failure (`Preset load failed...`) and explicit no-default states (`Awaiting source ... No default ...`).
19+
- Why blocked
20+
- Removing these helpers without replacing sample launch/query contract would break executable sample/tool flows.
21+
- Next required action
22+
- New dedicated PR to replace query-driven sample preset loading with a new direct-input contract and update all sample entrypoints/tests together.
23+
24+
Blocker 2: Extensive normalize*/infer* helpers include valid runtime behavior, not only legacy compatibility
25+
- Evidence
26+
- `tools/shared/toolLoadDiagnostics.js` contains infer/normalize helpers used for diagnostics boundary classification.
27+
- `tools/shared/platformShell.js` contains normalize utilities for URL/path/tool key sanitation and display summarization.
28+
- `tools/Asset Pipeline/main.js` contains inferDomainFromCatalogKind/inferSourceToolIdForDomain used by pipeline mapping behavior.
29+
- Why blocked
30+
- Blanket removal is high-risk and exceeds surgical cleanup scope.
31+
- Next required action
32+
- Follow-up PR with explicit allowlist/denylist for helper families and behavioral parity tests before removal/rename.
33+
34+
Blocker 3: `asset-pipeline-tooling` identifier contains stale substring but represents an internal schema token, not a tool id
35+
- Evidence
36+
- tools/Asset Pipeline/main.js: `schema: "html-js-gaming.asset-pipeline-tooling"`
37+
- tools/shared/pipeline/assetPipelineTooling.js: `ASSET_PIPELINE_TOOLING_SCHEMA = "html-js-gaming.asset-pipeline-tooling"`
38+
- Why blocked
39+
- Renaming this token without a coordinated schema/version migration can break downstream tooling outputs.
40+
- Next required action
41+
- Dedicated nomenclature migration PR for pipeline output schema ids, with versioning/migration notes and validation updates.
42+
43+
Blocker 4: Required fixture destination preserves `palette-editor` token in path
44+
- Evidence
45+
- tests/tools/ToolWorkspaceSchemaManifestBoundaries.test.mjs references:
46+
- tests/fixtures/tool-schemas/palette-editor/tool.schema.json
47+
- Why blocked
48+
- BUILD requires this exact destination path for relocated fixture files.
49+
- Next required action
50+
- If canonical naming must eliminate `palette-editor` token entirely, update BUILD contract/tests/fixture destination in a dedicated PR.
51+
52+
Files searched
53+
- tools/shared/platformShell.js
54+
- tools/shared/toolLoadDiagnostics.js
55+
- tools/shared/schemaOnlyToolPresetValidation.js
56+
- tools/3D Asset Viewer/main.js
57+
- tools/3D Camera Path Editor/main.js
58+
- tools/3D JSON Payload/main.js
59+
- tools/Asset Pipeline/main.js
60+
- tools/Palette Browser/main.js
61+
- tools/Performance Profiler/main.js
62+
- tools/Physics Sandbox/main.js
63+
- tools/Replay Visualizer/main.js
64+
- tools/State Inspector/main.js
65+
- tools/Tile Model Converter/main.js
66+
- tools/Vector Map Editor/editor/VectorMapEditorApp.js
67+
- tests/tools/ToolWorkspaceSchemaManifestBoundaries.test.mjs
68+
69+
Matches found
70+
- Multiple `tryLoadPresetFromQuery` and `buildPresetLoadedStatus` matches in tool entrypoints.
71+
- Multiple `normalize*`/`infer*` matches in shared and tool files as noted above.
72+
73+
Files changed (for blocker handling)
74+
- None directly for blocker-only items.
75+
76+
Skipped items
77+
- Broad helper removal and nomenclature token migration.
78+
- Exact reason: requires cross-file contract migration and test updates beyond surgical scope.
79+
80+
Validation command used
81+
- rg scans for helper/name patterns
82+
- targeted runtime/schema checks in other reports
83+
84+
Validation result
85+
- Blockers documented with file/path evidence and explicit next action.
86+
87+
Remaining blockers
88+
- Blockers 1 through 4 remain open.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Generated by Codex during PR 11.112 execution.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
PR 11.113 JSON/Schema Repair Loop Evidence
2+
Date: 2026-04-30
3+
4+
Files searched
5+
- tests/tools/ToolWorkspaceSchemaManifestBoundaries.test.mjs
6+
- tools/shared/toolLoadDiagnostics.js
7+
- tools/shared/schemaOnlyToolPresetValidation.js
8+
- samples/metadata/samples.index.metadata.json
9+
- samples/phase-02/0204/*
10+
- samples/phase-14/1413/*
11+
- src tools samples games tests scripts (pattern scans)
12+
13+
Issue A: Test-only tool schema relocation
14+
Search scope + pattern
15+
- Scope: tools/* and tests/*
16+
- Pattern: tools/(palette-editor|vector-asset-studio|vector-map-editor)/tool.schema.json + tests/fixtures path
17+
Matches found
18+
- Runtime paths: absent
19+
- Fixture paths: present in `tests/tools/ToolWorkspaceSchemaManifestBoundaries.test.mjs`
20+
Fix applied
21+
- None in this PR (already fixed in previous pass).
22+
Validation
23+
- Runtime files missing:
24+
- tools/palette-editor/tool.schema.json
25+
- tools/vector-asset-studio/tool.schema.json
26+
- tools/vector-map-editor/tool.schema.json
27+
- Fixture files exist:
28+
- tests/fixtures/tool-schemas/palette-editor/tool.schema.json
29+
- tests/fixtures/tool-schemas/vector-asset-studio/tool.schema.json
30+
- tests/fixtures/tool-schemas/vector-map-editor/tool.schema.json
31+
- Test run: PASS ToolWorkspaceSchemaManifestBoundaries
32+
33+
Issue B: Schema-only runtime validation still enforced
34+
Search scope + pattern
35+
- Scope: tools/shared/toolLoadDiagnostics.js, tools/shared/schemaOnlyToolPresetValidation.js
36+
- Pattern: enforceToolPresetSchemaOnlyContract|Input validation failed
37+
Matches found
38+
- `toolLoadDiagnostics.js` imports and calls `enforceToolPresetSchemaOnlyContract` (loaded boundary)
39+
- `schemaOnlyToolPresetValidation.js` emits detailed visible error text beginning with `Input validation failed...`
40+
Fix applied
41+
- None required in this PR.
42+
Validation result
43+
- Existing schema-only enforcement path is present.
44+
45+
Issue C: Canonical naming/stale naming check (runtime/source scope)
46+
Search scope + pattern
47+
- Scope: src tools samples games tests scripts (excluding docs/reports)
48+
- Pattern: asset-pipeline-tool|3d-json-payload-normalizer|Asset Pipeline Tool|palette-editor
49+
Matches found
50+
- No runtime/source hits for `asset-pipeline-tool`, `3d-json-payload-normalizer`, `Asset Pipeline Tool`
51+
- One hit for `palette-editor` at required fixture path in test file
52+
Fix applied
53+
- None required for runtime ids.
54+
Skipped items
55+
- `palette-editor` fixture path retained because BUILD explicitly requires destination `tests/fixtures/tool-schemas/palette-editor/tool.schema.json`.
56+
57+
Issue D: Sample/tool truthfulness (audit-confirmed missing references)
58+
Search scope + pattern
59+
- Scope: samples/** and samples metadata
60+
- Command: audit-sample-json-js-references.ps1 -Details
61+
Matches found (before)
62+
- Missing reference files:
63+
- samples/phase-02/0204/sample.0204.3d-asset-viewer.json
64+
- samples/phase-14/1413/sample.1413.3d-asset-viewer.json
65+
- samples/phase-14/1413/sample.1413.asset-browser.json
66+
Fix applied
67+
- Deleted all three dead JSON files.
68+
- Updated sample 1413 metadata block to remove stale 3d-asset-viewer tool hint/preset path.
69+
Validation (after)
70+
- Audit result: scanned=63 referenced=63 missing=0
71+
- Deleted file references no longer found by targeted `rg` checks.
72+
- Changed JSON parses: `samples/metadata/samples.index.metadata.json` -> JSON_OK
73+
74+
Files changed
75+
- samples/metadata/samples.index.metadata.json
76+
- samples/phase-02/0204/sample.0204.3d-asset-viewer.json (deleted)
77+
- samples/phase-14/1413/sample.1413.3d-asset-viewer.json (deleted)
78+
- samples/phase-14/1413/sample.1413.asset-browser.json (deleted)
79+
- docs/dev/reports/sample_json_js_reference_audit.csv (regenerated)
80+
81+
Skipped items + exact reason
82+
- No broad schema file rewrites were made because this PR did not expose schema parse/validation failures in changed files.
83+
- No broad tool-id migration was made because runtime/source stale-id scans were already clean in scoped paths.
84+
85+
Validation commands used
86+
- powershell -ExecutionPolicy Bypass -File .\scripts\PS\audit-sample-json-js-references.ps1 -Details
87+
- node --input-type=module -e "import { run } from './tests/tools/ToolWorkspaceSchemaManifestBoundaries.test.mjs'; await run(); console.log('PASS ToolWorkspaceSchemaManifestBoundaries');"
88+
- node JSON parse check for samples/metadata/samples.index.metadata.json
89+
- rg fixed-string checks for deleted JSON paths
90+
91+
Validation result
92+
- PASS (targeted).
93+
94+
Remaining blockers
95+
- See blockers_11_113.txt (shared helper naming/flow items needing dedicated follow-up).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Generated by Codex during PR 11.112 execution.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Generated by Codex during PR 11.112 execution.

0 commit comments

Comments
 (0)