Skip to content

Commit 9267aff

Browse files
author
DavidQ
committed
Remove 8 unused JSON files and stale metadata references with audit proof - PR 11.57
1 parent 322be55 commit 9267aff

17 files changed

Lines changed: 190 additions & 408 deletions

docs/dev/codex_commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Codex Command — PR 11.56
1+
# Codex Commands — PR 11.57
22

33
Model: GPT-5.4
44
Reasoning: high
55

66
```powershell
7-
codex exec --model gpt-5.4 --reasoning high "Run PR 11.56 exactly as documented in docs/pr/PR_11_56_METADATA_REFERENCE_CLEANUP.md. This is controlled cleanup mode. Remove up to exactly 8 audit NO JSON files only when there are no runtime references. If the only remaining reference is metadata/index JSON such as samples/metadata/samples.index.metadata.json, delete the unused JSON file and remove the stale metadata/index reference. Save before/after audit reports under docs/dev/reports. Prove the audit NO/missing-reference count decreases or fail the PR. Do not run the full samples suite unless shared loader/framework files are changed. Do not touch sample 1902, palette.json, or tile-map-editor-document.json. Do not rewrite roadmap content. Return a repo-structured ZIP at tmp/PR_11_56_METADATA_REFERENCE_CLEANUP.zip."
7+
codex --model gpt-5.4 --reasoning high "Execute PR 11.57 metadata-aware controlled JSON cleanup. Run .\scripts\PS\audit-sample-json-js-references.ps1 and save before output to docs/dev/reports/PR_11_57_audit_before.txt. Select exactly 8 audit NO JSON files that are tool-specific and safe. Exclude palette.json, tile-map-editor-document.json, sample 1902, shared assets, and ambiguous files. For each candidate, validate JS/runtime references. If the only broad repo reference is samples/metadata/samples.index.metadata.json, remove the stale metadata/index reference and delete the JSON. Save validation notes to docs/dev/reports/PR_11_57_validation.md. Re-run the audit and save after output to docs/dev/reports/PR_11_57_audit_after.txt. Confirm NO count decreases by 8 or document fewer safe remaining candidates. Use targeted validation only; do not run the full samples suite. Keep scope surgical and do not refactor."
88
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Remove unused JSON files and stale metadata references verified by audit count reduction - PR 11.56
1+
Remove 8 unused JSON files and stale metadata references with audit proof - PR 11.57
15.7 KB
Binary file not shown.
17.6 KB
Binary file not shown.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"deletedFiles": [
3+
"samples/phase-02/0205/sample.0205.state-inspector.json",
4+
"samples/phase-02/0208/sample.0208.state-inspector.json",
5+
"samples/phase-02/0217/sample.0217.state-inspector.json",
6+
"samples/phase-07/0708/sample.0708.replay-visualizer.json",
7+
"samples/phase-13/1315/sample.1315.replay-visualizer.json",
8+
"samples/phase-13/1319/sample.1319.performance-profiler.json",
9+
"samples/phase-14/1406/sample.1406.replay-visualizer.json",
10+
"samples/phase-14/1407/sample.1407.performance-profiler.json"
11+
],
12+
"deletedCount": 8,
13+
"removedMetadataReferences": [
14+
{
15+
"sampleId": "0205",
16+
"toolId": "state-inspector",
17+
"presetPath": "/samples/phase-02/0205/sample.0205.state-inspector.json"
18+
},
19+
{
20+
"sampleId": "0208",
21+
"toolId": "state-inspector",
22+
"presetPath": "/samples/phase-02/0208/sample.0208.state-inspector.json"
23+
},
24+
{
25+
"sampleId": "0217",
26+
"toolId": "state-inspector",
27+
"presetPath": "/samples/phase-02/0217/sample.0217.state-inspector.json"
28+
},
29+
{
30+
"sampleId": "0708",
31+
"toolId": "replay-visualizer",
32+
"presetPath": "/samples/phase-07/0708/sample.0708.replay-visualizer.json"
33+
},
34+
{
35+
"sampleId": "1315",
36+
"toolId": "replay-visualizer",
37+
"presetPath": "/samples/phase-13/1315/sample.1315.replay-visualizer.json"
38+
},
39+
{
40+
"sampleId": "1319",
41+
"toolId": "performance-profiler",
42+
"presetPath": "/samples/phase-13/1319/sample.1319.performance-profiler.json"
43+
},
44+
{
45+
"sampleId": "1406",
46+
"toolId": "replay-visualizer",
47+
"presetPath": "/samples/phase-14/1406/sample.1406.replay-visualizer.json"
48+
},
49+
{
50+
"sampleId": "1407",
51+
"toolId": "performance-profiler",
52+
"presetPath": "/samples/phase-14/1407/sample.1407.performance-profiler.json"
53+
}
54+
],
55+
"removedMetadataReferenceCount": 8
56+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# PR 11.57 Validation Notes
2+
3+
## Candidate Classification
4+
### samples/phase-02/0205/sample.0205.state-inspector.json
5+
- Audit status: NO
6+
- Direct JS/runtime check in sample subtree: (no matches)
7+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:1201: "presetPath": "/samples/phase-02/0205/sample.0205.state-inspector.json"
8+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:1201: "presetPath": "/samples/phase-02/0205/sample.0205.state-inspector.json"
9+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
10+
11+
### samples/phase-02/0208/sample.0208.state-inspector.json
12+
- Audit status: NO
13+
- Direct JS/runtime check in sample subtree: (no matches)
14+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:1329: "presetPath": "/samples/phase-02/0208/sample.0208.state-inspector.json"
15+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:1329: "presetPath": "/samples/phase-02/0208/sample.0208.state-inspector.json"
16+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
17+
18+
### samples/phase-02/0217/sample.0217.state-inspector.json
19+
- Audit status: NO
20+
- Direct JS/runtime check in sample subtree: (no matches)
21+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:1715: "presetPath": "/samples/phase-02/0217/sample.0217.state-inspector.json"
22+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:1715: "presetPath": "/samples/phase-02/0217/sample.0217.state-inspector.json"
23+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
24+
25+
### samples/phase-07/0708/sample.0708.replay-visualizer.json
26+
- Audit status: NO
27+
- Direct JS/runtime check in sample subtree: (no matches)
28+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:5223: "presetPath": "/samples/phase-07/0708/sample.0708.replay-visualizer.json"
29+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:5223: "presetPath": "/samples/phase-07/0708/sample.0708.replay-visualizer.json"
30+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
31+
32+
### samples/phase-13/1315/sample.1315.replay-visualizer.json
33+
- Audit status: NO
34+
- Direct JS/runtime check in sample subtree: (no matches)
35+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:7684: "presetPath": "/samples/phase-13/1315/sample.1315.replay-visualizer.json"
36+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:7684: "presetPath": "/samples/phase-13/1315/sample.1315.replay-visualizer.json"
37+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
38+
39+
### samples/phase-13/1319/sample.1319.performance-profiler.json
40+
- Audit status: NO
41+
- Direct JS/runtime check in sample subtree: (no matches)
42+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:7850: "presetPath": "/samples/phase-13/1319/sample.1319.performance-profiler.json"
43+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:7850: "presetPath": "/samples/phase-13/1319/sample.1319.performance-profiler.json"
44+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
45+
46+
### samples/phase-14/1406/sample.1406.replay-visualizer.json
47+
- Audit status: NO
48+
- Direct JS/runtime check in sample subtree: (no matches)
49+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:8040: "presetPath": "/samples/phase-14/1406/sample.1406.replay-visualizer.json"
50+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:8040: "presetPath": "/samples/phase-14/1406/sample.1406.replay-visualizer.json"
51+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
52+
53+
### samples/phase-14/1407/sample.1407.performance-profiler.json
54+
- Audit status: NO
55+
- Direct JS/runtime check in sample subtree: (no matches)
56+
- Runtime reference check (samples/tools/tests): samples\metadata\samples.index.metadata.json:8072: "presetPath": "/samples/phase-14/1407/sample.1407.performance-profiler.json"
57+
- Broad repo check (excluding docs/tmp/.git): .\samples\metadata\samples.index.metadata.json:8072: "presetPath": "/samples/phase-14/1407/sample.1407.performance-profiler.json"
58+
- Classification: SAFE_DELETE_WITH_METADATA_REMOVAL
59+
60+
Safe candidates identified: 8 / 8
61+
62+
## Cleanup Actions
63+
- Deleted JSON files (8):
64+
- `samples/phase-02/0205/sample.0205.state-inspector.json`
65+
- `samples/phase-02/0208/sample.0208.state-inspector.json`
66+
- `samples/phase-02/0217/sample.0217.state-inspector.json`
67+
- `samples/phase-07/0708/sample.0708.replay-visualizer.json`
68+
- `samples/phase-13/1315/sample.1315.replay-visualizer.json`
69+
- `samples/phase-13/1319/sample.1319.performance-profiler.json`
70+
- `samples/phase-14/1406/sample.1406.replay-visualizer.json`
71+
- `samples/phase-14/1407/sample.1407.performance-profiler.json`
72+
- Removed stale metadata/index references from:
73+
- `samples/metadata/samples.index.metadata.json` (`roundtripToolPresets[].presetPath` entries matching deleted files)
74+
- Cleanup action log:
75+
- `docs/dev/reports/PR_11_57_cleanup_actions.json`
76+
77+
## Audit Count Proof
78+
- Before audit file: `docs/dev/reports/PR_11_57_audit_before.txt`
79+
- YES: 39
80+
- NO: 47
81+
- TOTAL: 86
82+
- After audit file: `docs/dev/reports/PR_11_57_audit_after.txt`
83+
- YES: 39
84+
- NO: 39
85+
- TOTAL: 78
86+
- Required delta: NO count decreases by 8
87+
- Observed delta: `47 -> 39` (decrease of 8) ✅
88+
89+
## Targeted Validation
90+
- Ran audit script before and after cleanup.
91+
- Ran per-candidate direct JS and runtime/broad reference classification checks.
92+
- Verified removed preset filenames are cleared from `samples/metadata/samples.index.metadata.json`.
93+
- Confirmed no protected files were modified:
94+
- no `palette.json`
95+
- no `tile-map-editor-document.json`
96+
- no sample 1902 files
97+
- Full sample suite: skipped (per PR scope; no shared loader/framework changes).

docs/dev/reports/sample_json_js_reference_audit.csv

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
"samples\metadata\samples.index.metadata.json","samples\metadata\samples.index.metadata.json","False","","",""
33
"samples\phase-02\0204","samples\phase-02\0204\sample.0204.3d-asset-viewer.json","True","sample.0204.asset-browser.json","sample\.0204\.3d-asset-viewer\.json",""
44
"samples\phase-02\0204","samples\phase-02\0204\sample.0204.asset-browser.json","True","main.js","sample\.0204\.asset-browser\.json","Multiple JS references found"
5-
"samples\phase-02\0205","samples\phase-02\0205\sample.0205.state-inspector.json","False","","",""
65
"samples\phase-02\0207","samples\phase-02\0207\sample.0207.palette.json","False","","",""
76
"samples\phase-02\0207","samples\phase-02\0207\sample.0207.sprite-editor.json","True","AnimationSystemScene.js","sample\.0207\.sprite-editor\.json",""
8-
"samples\phase-02\0208","samples\phase-02\0208\sample.0208.state-inspector.json","False","","",""
97
"samples\phase-02\0213","samples\phase-02\0213\sample.0213.palette.json","False","","",""
108
"samples\phase-02\0213","samples\phase-02\0213\sample.0213.sprite-editor.json","True","SpriteRenderLayerScene.js","sample\.0213\.sprite-editor\.json",""
119
"samples\phase-02\0214","samples\phase-02\0214\sample.0214.palette.json","False","","",""
1210
"samples\phase-02\0214","samples\phase-02\0214\sample.0214.sprite-editor.json","True","AnimationSpriteBindingScene.js","sample\.0214\.sprite-editor\.json",""
13-
"samples\phase-02\0217","samples\phase-02\0217\sample.0217.state-inspector.json","False","","",""
1411
"samples\phase-02\0219","samples\phase-02\0219\sample.0219.palette.json","False","","",""
1512
"samples\phase-02\0219","samples\phase-02\0219\sample.0219.sprite-editor.json","True","SpriteAtlasImageRenderingScene.js","sample\.0219\.sprite-editor\.json",""
1613
"samples\phase-02\0221","samples\phase-02\0221\sample.0221.palette.json","False","","",""
@@ -35,7 +32,6 @@
3532
"samples\phase-03\0306","samples\phase-03\0306\sample.0306.parallax-editor.json","False","","",""
3633
"samples\phase-03\0308","samples\phase-03\0308\sample.0308.palette.json","False","","",""
3734
"samples\phase-03\0313","samples\phase-03\0313\sample.0313.palette.json","False","","",""
38-
"samples\phase-07\0708","samples\phase-07\0708\sample.0708.replay-visualizer.json","False","","",""
3935
"samples\phase-09\0901","samples\phase-09\0901\sample.0901.palette.json","False","","",""
4036
"samples\phase-09\0901","samples\phase-09\0901\sample.0901.svg-asset-studio.json","False","","",""
4137
"samples\phase-09\0901","samples\phase-09\0901\sample.0901.vector-map-editor.json","False","","",""
@@ -72,10 +68,6 @@
7268
"samples\phase-12\1218","samples\phase-12\1218\sample-1218-parallax-editor.json","True","index.html","sample-1218-parallax-editor\.json",""
7369
"samples\phase-12\1219","samples\phase-12\1219\sample-1219-parallax-editor.json","True","index.html","sample-1219-parallax-editor\.json",""
7470
"samples\phase-12\1220","samples\phase-12\1220\sample-1220-parallax-editor.json","True","index.html","sample-1220-parallax-editor\.json",""
75-
"samples\phase-13\1315","samples\phase-13\1315\sample.1315.replay-visualizer.json","False","","",""
76-
"samples\phase-13\1319","samples\phase-13\1319\sample.1319.performance-profiler.json","False","","",""
77-
"samples\phase-14\1406","samples\phase-14\1406\sample.1406.replay-visualizer.json","False","","",""
78-
"samples\phase-14\1407","samples\phase-14\1407\sample.1407.performance-profiler.json","False","","",""
7971
"samples\phase-14\1413","samples\phase-14\1413\sample.1413.3d-asset-viewer.json","True","sample.1413.asset-browser.json","sample\.1413\.3d-asset-viewer\.json",""
8072
"samples\phase-14\1413","samples\phase-14\1413\sample.1413.asset-browser.json","True","sample.1413.asset-browser.json","sample\.1413\.asset-browser\.json",""
8173
"samples\phase-14\1413","samples\phase-14\1413\sample.1413.asset-pipeline-tool.json","True","main.js","sample\.1413\.asset-pipeline-tool\.json","Multiple JS references found"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR 11.57 — Metadata-Aware JSON Cleanup
2+
3+
## Purpose
4+
Continue controlled JSON cleanup with count-backed proof by removing 8 unused JSON files and their stale metadata/index references.
5+
6+
## Scope
7+
- Run `scripts/PS/audit-sample-json-js-references.ps1` before changes.
8+
- Select exactly 8 audit `NO` JSON files.
9+
- Validate each candidate is not directly or indirectly used by JS/runtime.
10+
- If the only broad repo reference is `samples/metadata/samples.index.metadata.json`, treat it as stale metadata and remove that metadata entry/reference too.
11+
- Delete the unused JSON files.
12+
- Re-run audit and prove `NO count` drops by 8.
13+
14+
## Hard Exclusions
15+
- Do not touch `palette.json`.
16+
- Do not touch `tile-map-editor-document.json`.
17+
- Do not touch sample 1902.
18+
- Do not modify roadmap text except execution-backed status markers if already required.
19+
- Do not run full samples suite.
20+
21+
## Acceptance
22+
- 8 unused JSON files deleted.
23+
- Matching stale references removed from `samples/metadata/samples.index.metadata.json`.
24+
- Before/after audit evidence captured in `docs/dev/reports/PR_11_57_audit_before.txt` and `docs/dev/reports/PR_11_57_audit_after.txt`.
25+
- `NO count` decreases by exactly 8, unless fewer than 8 safe candidates remain; if fewer remain, document why and remove all safe candidates.
26+
- Targeted validation notes captured in `docs/dev/reports/PR_11_57_validation.md`.

samples/metadata/samples.index.metadata.json

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,12 +1195,7 @@
11951195
"toolHints": [
11961196
"state-inspector"
11971197
],
1198-
"roundtripToolPresets": [
1199-
{
1200-
"toolId": "state-inspector",
1201-
"presetPath": "/samples/phase-02/0205/sample.0205.state-inspector.json"
1202-
}
1203-
]
1198+
"roundtripToolPresets": []
12041199
},
12051200
{
12061201
"id": "0206",
@@ -1323,12 +1318,7 @@
13231318
"toolHints": [
13241319
"state-inspector"
13251320
],
1326-
"roundtripToolPresets": [
1327-
{
1328-
"toolId": "state-inspector",
1329-
"presetPath": "/samples/phase-02/0208/sample.0208.state-inspector.json"
1330-
}
1331-
]
1321+
"roundtripToolPresets": []
13321322
},
13331323
{
13341324
"id": "0209",
@@ -1709,12 +1699,7 @@
17091699
"toolHints": [
17101700
"state-inspector"
17111701
],
1712-
"roundtripToolPresets": [
1713-
{
1714-
"toolId": "state-inspector",
1715-
"presetPath": "/samples/phase-02/0217/sample.0217.state-inspector.json"
1716-
}
1717-
]
1702+
"roundtripToolPresets": []
17181703
},
17191704
{
17201705
"id": "0218",
@@ -5217,12 +5202,7 @@
52175202
"toolHints": [
52185203
"replay-visualizer"
52195204
],
5220-
"roundtripToolPresets": [
5221-
{
5222-
"toolId": "replay-visualizer",
5223-
"presetPath": "/samples/phase-07/0708/sample.0708.replay-visualizer.json"
5224-
}
5225-
]
5205+
"roundtripToolPresets": []
52265206
},
52275207
{
52285208
"id": "0709",
@@ -7678,12 +7658,7 @@
76787658
"toolHints": [
76797659
"replay-visualizer"
76807660
],
7681-
"roundtripToolPresets": [
7682-
{
7683-
"toolId": "replay-visualizer",
7684-
"presetPath": "/samples/phase-13/1315/sample.1315.replay-visualizer.json"
7685-
}
7686-
]
7661+
"roundtripToolPresets": []
76877662
},
76887663
{
76897664
"id": "1316",
@@ -7844,12 +7819,7 @@
78447819
"toolHints": [
78457820
"performance-profiler"
78467821
],
7847-
"roundtripToolPresets": [
7848-
{
7849-
"toolId": "performance-profiler",
7850-
"presetPath": "/samples/phase-13/1319/sample.1319.performance-profiler.json"
7851-
}
7852-
]
7822+
"roundtripToolPresets": []
78537823
},
78547824
{
78557825
"id": "1320",
@@ -8034,12 +8004,7 @@
80348004
"toolHints": [
80358005
"replay-visualizer"
80368006
],
8037-
"roundtripToolPresets": [
8038-
{
8039-
"toolId": "replay-visualizer",
8040-
"presetPath": "/samples/phase-14/1406/sample.1406.replay-visualizer.json"
8041-
}
8042-
]
8007+
"roundtripToolPresets": []
80438008
},
80448009
{
80458010
"id": "1407",
@@ -8066,12 +8031,7 @@
80668031
"toolHints": [
80678032
"performance-profiler"
80688033
],
8069-
"roundtripToolPresets": [
8070-
{
8071-
"toolId": "performance-profiler",
8072-
"presetPath": "/samples/phase-14/1407/sample.1407.performance-profiler.json"
8073-
}
8074-
]
8034+
"roundtripToolPresets": []
80758035
},
80768036
{
80778037
"id": "1408",

samples/phase-02/0205/sample.0205.state-inspector.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)