Skip to content

Commit 1d42e08

Browse files
author
DavidQ
committed
Enforce sample metadata SSoT and remove renderer tool-link inference - PR 11.119
1 parent 35019d4 commit 1d42e08

11 files changed

Lines changed: 436 additions & 67 deletions

docs/dev/codex_commands.md

Lines changed: 74 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,81 +4,93 @@ Model: GPT-5.3-codex
44
Reasoning: medium
55

66
## PR
7-
BUILD_PR_LEVEL_11_118_SAMPLE_TILE_LINK_SSOT_ENFORCEMENT
7+
BUILD_PR_LEVEL_11_119_SAMPLE_METADATA_SSOT_AND_RENDERER_GUARD_REMOVAL
88

99
## Execute
1010

11-
This replaces PR 11.117. Do not run 11.117.
12-
13-
1. Trace where visible sample tile "Open <tool>" links actually come from.
14-
15-
2. Search candidate sources:
16-
- samples/index.html
17-
- samples index JSON/JS files
18-
- generated sample registry files
19-
- sample tile renderer data/config
20-
- samples2tools data
21-
- sample manifests
22-
- per-sample metadata JSON
23-
- generated static metadata used by samples page
24-
25-
3. Identify the one active SSoT file for sample tile tool links.
26-
27-
4. Enforce only one active source:
28-
- update loader/index code to use only the SSoT if needed
29-
- delete stale duplicate link files if safe
30-
- otherwise disable them from runtime loading and report why
31-
32-
5. Remove known-bad links from the SSoT and any active duplicates:
33-
- 0201: remove unrelated Open Tool links
34-
- 0202: remove unrelated Open Tool links
35-
- 0204: remove unrelated Open Tool links
36-
- 0210: remove unrelated Open Tool links
37-
- 0220: remove unrelated Open Tool links
38-
- 0221: remove 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload
39-
- 0226: remove unrelated Open Tool links
40-
- 0227: remove unrelated Open Tool links
41-
- 0303: remove unrelated Open Tool links
42-
- 0305: remove 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload
43-
- 0901: remove Vector Map Editor
44-
- 1204: remove SVG Asset Studio
45-
- 1205: remove Vector Map Editor
46-
- 1208: remove 3D Asset Viewer and SVG Asset Studio
47-
- 1319: remove unrelated Open Tool links
48-
49-
6. Delete bad/stale launcher data that is not the SSoT and can reintroduce bad links.
50-
51-
7. Do not:
52-
- delete samples
11+
1. Treat this as the correction to PR 11.118.
12+
13+
2. Confirm the active sample tile renderer path:
14+
- inspect `samples/index.render.js`
15+
- inspect any imports/loaders used by that renderer
16+
17+
3. Make this the only SSoT for sample tile tool roundtrip links:
18+
- `samples/metadata/samples.index.metadata.json`
19+
20+
4. Remove renderer/toolhint logic that can create roundtrip links from anything except:
21+
- `toolHints`
22+
- `roundtripToolPresets`
23+
in the metadata SSoT file.
24+
25+
5. Remove logic that:
26+
- infers tool hints from sample ids
27+
- infers tool hints from sample titles
28+
- infers tool hints from sample paths
29+
- infers tool hints from JSON files in sample folders
30+
- uses fallback/default tool hint arrays
31+
- uses samples2tools as active sample tile source
32+
- restores stale/generated tool links
33+
34+
6. Ensure empty arrays mean no rendered section:
35+
- `toolHints: []`
36+
- `roundtripToolPresets: []`
37+
must render no `sample-tool-roundtrip` section.
38+
39+
7. Delete or disable stale duplicate source files that can feed sample tile tool links outside the SSoT.
40+
- If unsafe to delete, remove runtime loading and report why file remains.
41+
42+
8. Validate these known-bad links cannot render:
43+
- 0201: 3D Camera Path Editor or unrelated Open Tool links
44+
- 0202: unrelated Open Tool links
45+
- 0204: unrelated Open Tool links
46+
- 0210: unrelated Open Tool links
47+
- 0220: unrelated Open Tool links
48+
- 0221: 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload
49+
- 0226: unrelated Open Tool links
50+
- 0227: unrelated Open Tool links
51+
- 0303: unrelated Open Tool links
52+
- 0305: 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload
53+
- 0901: Vector Map Editor
54+
- 1204: SVG Asset Studio
55+
- 1205: Vector Map Editor
56+
- 1208: 3D Asset Viewer and SVG Asset Studio
57+
- 1319: unrelated Open Tool links
58+
59+
9. Do not add a runtime hardcoded denylist as the final fix.
60+
- A temporary validation assertion is allowed only in tests/reports.
61+
62+
10. Do not:
5363
- add fake data
5464
- add fallback/default/preset inputs
55-
- reintroduce normalization or inference
65+
- reintroduce normalization
66+
- reintroduce inference
67+
- delete samples
5668

57-
8. Validate:
69+
11. Validate:
5870
- changed JSON parses
59-
- changed JS/HTML/index files are syntactically valid where practical
60-
- listed bad links no longer exist in active SSoT
71+
- changed JS syntax is valid
72+
- 0201 metadata empty arrays render no roundtrip section
73+
- known-bad links absent from active runtime-loaded source
6174
- no second active source remains
62-
- stale duplicate sources are deleted or disabled
6375

64-
9. Write populated reports:
65-
- docs/dev/reports/sample_tile_link_ssot_11_118.txt
66-
- docs/dev/reports/sample_tile_bad_links_removed_11_118.txt
67-
- docs/dev/reports/stale_launcher_sources_deleted_11_118.txt
68-
- docs/dev/reports/validation_after_11_118.txt
76+
12. Write populated reports:
77+
- docs/dev/reports/sample_metadata_ssot_11_119.txt
78+
- docs/dev/reports/renderer_toolhint_cleanup_11_119.txt
79+
- docs/dev/reports/stale_roundtrip_sources_11_119.txt
80+
- docs/dev/reports/known_bad_links_validation_11_119.txt
6981

70-
10. Reports must include:
71-
- exact files searched
82+
13. Reports must include:
83+
- files searched
84+
- files changed
85+
- exact removed logic
7286
- chosen SSoT
73-
- exact entries removed
74-
- stale files deleted/disabled
75-
- validation command/result
76-
- blockers
87+
- validation evidence for 0201
88+
- blockers if any
7789

78-
11. Roadmap:
90+
14. Roadmap:
7991
- status-only update if execution-backed
8092
- do not rewrite roadmap text
8193
- do not delete roadmap text
8294

83-
12. Package Codex output ZIP at:
84-
tmp/PR_11_118_SAMPLE_TILE_LINK_SSOT_ENFORCEMENT.zip
95+
15. Package Codex output ZIP at:
96+
tmp/PR_11_119_SAMPLE_METADATA_SSOT_AND_RENDERER_GUARD_REMOVAL.zip

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Enforce sample tile tool-link SSoT and delete stale bad launcher sources - PR 11.118
1+
Enforce sample metadata SSoT and remove renderer tool-link inference - PR 11.119
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
PR 11.119 - Known-Bad Links Validation
2+
3+
Validation commands and results
4+
- node --check samples/index.render.js
5+
Result: PASS.
6+
- node --check samples/shared/sampleDetailPageEnhancement.js
7+
Result: PASS.
8+
- node -e "const fs=require('fs');JSON.parse(fs.readFileSync('samples/metadata/samples.index.metadata.json','utf8'));console.log('PASS metadata json parse');"
9+
Result: PASS metadata json parse.
10+
- Targeted renderer VM harness for samples/index.render.js
11+
Result: PASS 0201 actual empty metadata and synthetic hint-only metadata render zero roundtrip links.
12+
- Targeted known-bad metadata and sample HTML scan
13+
Result: PASS known bad links absent from metadata and sample HTML runtime sources.
14+
- rg -l "roundtripToolPresets|toolHints" samples
15+
Result: samples/index.render.js, samples/metadata/samples.index.metadata.json, samples/shared/sampleDetailPageEnhancement.js.
16+
17+
Known-bad validation coverage
18+
- 0201: no 3D Camera Path Editor or unrelated Open Tool links.
19+
- 0202: no unrelated Open Tool links.
20+
- 0204: no unrelated Open Tool links.
21+
- 0210: no unrelated Open Tool links.
22+
- 0220: no unrelated Open Tool links.
23+
- 0221: no 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload link.
24+
- 0226: no unrelated Open Tool links.
25+
- 0227: no unrelated Open Tool links.
26+
- 0303: no unrelated Open Tool links.
27+
- 0305: no 3D JSON Payload Normalizer / 3D JSON Payload / 3d-json-payload link.
28+
- 0901: no Vector Map Editor link.
29+
- 1204: no SVG Asset Studio link.
30+
- 1205: no Vector Map Editor link.
31+
- 1208: no 3D Asset Viewer or SVG Asset Studio link.
32+
- 1319: no unrelated Open Tool links.
33+
34+
0201 proof
35+
- samples/metadata/samples.index.metadata.json currently has sample 0201 toolHints=[] and roundtripToolPresets=[].
36+
- Renderer harness built the 0201 sample row and found roundtripLinks.length = 0.
37+
- Renderer harness also tested a synthetic stale hint-only 0201 row and found links.length = 0.
38+
39+
Full samples smoke test
40+
- Skipped. This PR changes targeted sample hub/detail rendering and one stale sample HTML link; the full samples suite is approximately 20 minutes.
41+
42+
Blockers
43+
- None.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
PR 11.119 - Renderer Toolhint Cleanup
2+
3+
Files searched
4+
- samples/index.render.js
5+
- samples/shared/sampleDetailPageEnhancement.js
6+
- tools/shared/toolLaunchSSoT.js
7+
- samples/metadata/samples.index.metadata.json
8+
9+
Files changed
10+
- samples/index.render.js
11+
- samples/shared/sampleDetailPageEnhancement.js
12+
13+
Problem path removed
14+
- Before: samples/index.render.js could call resolveSampleToolLaunchHref with samplePresetPath="" when a runtime sample row had toolHints but no matching roundtripToolPresets entry.
15+
- Effect: a stale hint-only row could render a link like /tools/3D%20Camera%20Path%20Editor/index.html?sampleId=0201&sampleTitle=Camera+Follow.
16+
- After: buildRoundtripLinks returns without creating a link when getExplicitRoundtripPresetPath(sample, toolId) returns empty.
17+
18+
Related detail-page cleanup
19+
- samples/shared/sampleDetailPageEnhancement.js had the same hint-only behavior for sample detail pages.
20+
- It now skips tool links that lack an explicit presetPath.
21+
- This keeps sample detail pages aligned with the direct JSON contract and prevents stale hint-only links there too.
22+
23+
Exact removed behavior
24+
- Removed renderer behavior that treated toolHints alone as enough to generate an Open <tool> link.
25+
- Removed detail-page behavior that generated a base tool URL without samplePresetPath.
26+
27+
What remains intentionally
28+
- normalizeToken/normalizePresetPath helpers remain for safe string/path handling.
29+
- toolHints remains available for sample filter chips and tool filter indexing.
30+
- roundtripToolPresets remains the explicit source of launch JSON paths.
31+
32+
Validation
33+
- node --check samples/index.render.js: PASS
34+
- node --check samples/shared/sampleDetailPageEnhancement.js: PASS
35+
- Targeted renderer harness: PASS 0201 actual empty metadata and synthetic hint-only metadata render zero roundtrip links.
36+
37+
Blockers
38+
- None.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
PR 11.119 - Sample Metadata SSoT
2+
3+
Purpose
4+
Correct PR 11.118 by enforcing the active sample hub tile renderer contract directly.
5+
6+
Chosen SSoT
7+
samples/metadata/samples.index.metadata.json
8+
9+
Why this is the SSoT
10+
- samples/index.html loads samples/index.render.js.
11+
- samples/index.render.js fetches only ./metadata/samples.index.metadata.json for sample tile rows.
12+
- sample tile tool links are built from metadata fields toolHints and roundtripToolPresets.
13+
- No samples2tools file or generated link map is imported by samples/index.render.js.
14+
15+
Files searched
16+
- docs/pr/BUILD_PR_LEVEL_11_119_SAMPLE_METADATA_SSOT_AND_RENDERER_GUARD_REMOVAL.md
17+
- samples/index.html
18+
- samples/index.render.js
19+
- samples/shared/sampleDetailPageEnhancement.js
20+
- samples/metadata/samples.index.metadata.json
21+
- samples/phase-12/1208/index.html
22+
- tools/shared/toolLaunchSSoT.js
23+
24+
Files changed
25+
- samples/index.render.js
26+
- samples/shared/sampleDetailPageEnhancement.js
27+
- samples/phase-12/1208/index.html
28+
- docs/dev/reports/sample_metadata_ssot_11_119.txt
29+
- docs/dev/reports/renderer_toolhint_cleanup_11_119.txt
30+
- docs/dev/reports/stale_roundtrip_sources_11_119.txt
31+
- docs/dev/reports/known_bad_links_validation_11_119.txt
32+
33+
SSoT rule enforced
34+
- The sample tile renderer still reads sample rows from samples/metadata/samples.index.metadata.json.
35+
- A visible sample tile roundtrip link now requires both:
36+
- a tool id in toolHints
37+
- a matching explicit presetPath in roundtripToolPresets
38+
- toolHints alone can no longer produce a tile Open <tool> link with only sampleId/sampleTitle.
39+
40+
0201 evidence
41+
- Current metadata row for sample 0201 has toolHints=[] and roundtripToolPresets=[].
42+
- Targeted renderer harness result: PASS 0201 actual empty metadata and synthetic hint-only metadata render zero roundtrip links.
43+
44+
Blockers
45+
- None.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PR 11.119 - Stale Roundtrip Sources
2+
3+
Files searched
4+
- samples/index.html
5+
- samples/index.render.js
6+
- samples/shared/sampleDetailPageEnhancement.js
7+
- samples/metadata/samples.index.metadata.json
8+
- samples/phase-12/1208/index.html
9+
- samples/**/*.html via targeted known-bad validation script
10+
11+
Files changed
12+
- samples/phase-12/1208/index.html
13+
14+
Stale source removed
15+
- Removed stale hardcoded Open SVG Asset Studio link from samples/phase-12/1208/index.html.
16+
- The valid 1208 hardcoded links for Tilemap Studio and Parallax Scene Studio remain.
17+
18+
Duplicate source assessment
19+
- samples/index.render.js remains the sample tile renderer.
20+
- samples/metadata/samples.index.metadata.json remains the sample tile data SSoT.
21+
- samples/shared/sampleDetailPageEnhancement.js is not a tile source, but it is a runtime consumer of the same metadata, so it was aligned to require explicit presetPath.
22+
- phase-12 static sample HTML pages are sample detail pages, not tile data sources. Only the known-bad 1208 SVG Asset Studio link was removed in this PR.
23+
24+
Deleted files
25+
- None.
26+
27+
Disabled runtime loading
28+
- None.
29+
30+
Why no file deletion
31+
- No separate generated/static sample tile link data file was found.
32+
- Existing sample detail HTML files are executable sample pages, not duplicate tile metadata files.
33+
- Deleting sample pages would violate the PR rule not to delete samples.
34+
35+
Blockers
36+
- None.

docs/dev/restart_notes_11_119.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Restart Notes — PR 11.119
2+
3+
Evidence:
4+
- The bad link is rendered by `samples/index.render.js`.
5+
- `0201` metadata reportedly has empty `toolHints` and `roundtripToolPresets`.
6+
- Therefore the renderer/runtime is using stale data or inference.
7+
8+
Fix:
9+
- `samples/metadata/samples.index.metadata.json` is the only SSoT.
10+
- Renderer must not infer/fallback tool links.
11+
- Empty arrays render no roundtrip section.

0 commit comments

Comments
 (0)