Skip to content

Commit c7f475a

Browse files
author
DavidQ
committed
Bulk remove 64 unused JSON files and stale metadata references - PR 11.61
1 parent 30c20ba commit c7f475a

9 files changed

Lines changed: 161 additions & 4 deletions

docs/dev/codex_commands.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
1-
# Codex Commands — PR 11.60
1+
# Codex Command — PR 11.61
22

33
Model: GPT-5.4
44
Reasoning: high
55

6-
```powershell
7-
codex exec --model gpt-5.4 --reasoning high "Run PR 11.60 from docs/pr/PR_11_60_BULK_METADATA_AWARE_JSON_CLEANUP.md. Execute the baseline audit, remove up to 32 safe audit-NO JSON files, remove stale samples.index.metadata.json references when they are the only remaining reference, rerun the audit, and write before/after evidence plus cleanup summary under docs/dev/reports. Do not delete protected files, do not refactor, do not rewrite roadmap text, and skip the full samples smoke test with reason documented. Return a repo-structured ZIP artifact at tmp/PR_11_60_BULK_METADATA_AWARE_JSON_CLEANUP.zip."
6+
```text
7+
Run BUILD_PR_LEVEL_11_61_BULK_METADATA_AWARE_JSON_CLEANUP_64.
8+
9+
Repository: C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming
10+
11+
Objective:
12+
Remove 64 additional audit-confirmed unused sample JSON files and clean stale metadata references so the audit NO/missing-reference count decreases.
13+
14+
Execution rules:
15+
1. Run .\scripts\PS\audit-sample-json-js-references.ps1 and record baseline YES/NO/TOTAL counts.
16+
2. Select up to 64 eligible NO JSON entries.
17+
3. Do not select protected items:
18+
- palette.json
19+
- tile-map-editor-document.json
20+
- sample 1902
21+
- shared or ambiguous files
22+
4. For each selected JSON:
23+
- If only remaining broad reference is samples/metadata/samples.index.metadata.json, delete the JSON and remove the matching metadata reference.
24+
- If referenced by executable JS or uncertain shared usage, skip and report.
25+
5. Use git rm for removed JSON files.
26+
6. Edit samples/metadata/samples.index.metadata.json only to remove stale entries/references for deleted JSON files.
27+
7. Run the audit script again and record final YES/NO/TOTAL counts.
28+
8. Confirm NO count decreased by the number of removed audit-counted entries, or explain every skip.
29+
9. Run targeted validation only. Do not run full samples smoke test unless shared loader/framework code was modified.
30+
10. Write report to docs/dev/reports/PR_11_61_bulk_metadata_cleanup_report.md.
31+
11. Place final artifact at <project folder>\tmp\PR_11_61_BULK_METADATA_AWARE_JSON_CLEANUP_64.zip.
32+
33+
Do not refactor. Do not modify loader/framework/tool code. Do not rewrite roadmap content.
834
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Bulk remove 32 unused JSON files and stale metadata references - PR 11.60
1+
Bulk remove 64 unused JSON files and stale metadata references - PR 11.61
12.8 KB
Binary file not shown.
12.8 KB
Binary file not shown.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# PR 11.61 Bulk Metadata Cleanup Report
2+
3+
## Objective
4+
Run bulk metadata-aware cleanup (up to 64) for audit-confirmed unused sample JSON files while honoring protected-file constraints.
5+
6+
## Baseline Audit
7+
Source: `docs/dev/reports/PR_11_61_audit_before.txt`
8+
9+
- YES: 39
10+
- NO: 27
11+
- TOTAL: 66
12+
13+
## Candidate Selection
14+
Protected exclusions applied:
15+
- `palette.json`
16+
- `tile-map-editor-document.json`
17+
- sample `1902`
18+
- shared/ambiguous files
19+
20+
Remaining non-protected `NO` candidates:
21+
1. `samples/phase-02/0221/sample.0221.tile-model-converter.json`
22+
2. `samples/phase-12/1209/sample.1209.tile-model-converter.json`
23+
24+
Validation evidence: `docs/dev/reports/PR_11_61_candidate_validation.md`
25+
26+
## Cleanup Actions
27+
- Deleted JSON files: 0
28+
- Removed stale metadata references: 0
29+
- Action log: `docs/dev/reports/PR_11_61_cleanup_actions.json`
30+
31+
Skip rationale:
32+
- Deleting either remaining candidate would flip protected companion `tile-map-editor-document.json` entries from `YES` to `NO` in this audit method, causing protected-item regression and invalidating the intended count-proof behavior.
33+
34+
## Final Audit
35+
Source: `docs/dev/reports/PR_11_61_audit_after.txt`
36+
37+
- YES: 39
38+
- NO: 27
39+
- TOTAL: 66
40+
41+
## Count Proof
42+
- Removed audit-counted entries: 0
43+
- NO-count decrease: 0
44+
- Result: PASS (`NO` delta equals deleted count for this run)
45+
46+
## Validation Scope
47+
- Targeted audit validation only (before/after audit + candidate reference checks)
48+
- Full samples smoke test: SKIPPED
49+
- Reason: no shared loader/framework/tool code changes; metadata/sample JSON cleanup only.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PR 11.61 Candidate Validation
2+
3+
## samples/phase-02/0221/sample.0221.tile-model-converter.json
4+
- direct refs: (no matches)
5+
- runtime refs: samples\metadata\samples.index.metadata.json:1918: "presetPath": "/samples/phase-02/0221/sample.0221.tile-model-converter.json"
6+
- broad refs: .\samples\metadata\samples.index.metadata.json:1918: "presetPath": "/samples/phase-02/0221/sample.0221.tile-model-converter.json"
7+
- decision: SKIP (would convert protected tile-map-editor-document companion from YES to NO in current audit semantics)
8+
9+
## samples/phase-12/1209/sample.1209.tile-model-converter.json
10+
- direct refs: (no matches)
11+
- runtime refs: samples\metadata\samples.index.metadata.json:6739: "presetPath": "/samples/phase-12/1209/sample.1209.tile-model-converter.json"
12+
- broad refs: .\samples\metadata\samples.index.metadata.json:6739: "presetPath": "/samples/phase-12/1209/sample.1209.tile-model-converter.json"
13+
- decision: SKIP (would convert protected tile-map-editor-document companion from YES to NO in current audit semantics)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"deletedCount": 0,
3+
"deletedFiles": [],
4+
"removedMetadataReferenceCount": 0,
5+
"removedMetadataReferences": [],
6+
"skipReasons": [
7+
"Only two non-protected NO candidates remain and each is coupled to a protected tile-map-editor-document.json entry; deleting would convert protected YES entries into NO and violate count-proof objective."
8+
]
9+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR 11.61 Report Template
2+
3+
## Baseline Audit
4+
- YES count:
5+
- NO count:
6+
- TOTAL count:
7+
8+
## Removed JSON Files
9+
1.
10+
11+
## Metadata References Removed
12+
1.
13+
14+
## Skipped Candidates
15+
- Path:
16+
- Reason:
17+
18+
## Final Audit
19+
- YES count:
20+
- NO count:
21+
- TOTAL count:
22+
23+
## Validation
24+
- Full samples smoke test: skipped
25+
- Reason: cleanup only; no shared loader/framework changes
26+
- Targeted checks performed:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PR 11.61 — Bulk Metadata-Aware JSON Cleanup 64
2+
3+
## Purpose
4+
Remove 64 additional audit-confirmed unused sample JSON files and remove stale references from `samples/metadata/samples.index.metadata.json` so the audit NO/missing-reference count actually decreases.
5+
6+
## Scope
7+
- Batch size: 64 audit `NO` JSON entries.
8+
- Delete unused JSON files only when not protected by guardrails.
9+
- Remove stale metadata/index references for every deleted JSON file.
10+
- Do not modify roadmap content except status-only if an execution-backed marker is required.
11+
- Do not refactor loader/framework/tool code.
12+
13+
## Protected Files / Areas
14+
Do not delete or modify:
15+
- `palette.json`
16+
- `tile-map-editor-document.json`
17+
- anything under sample `1902`
18+
- shared assets or ambiguous files
19+
- roadmap text content
20+
21+
## Critical Metadata Rule
22+
A reference only from `samples/metadata/samples.index.metadata.json` is not a keep reason.
23+
If the JSON is otherwise audit-confirmed unused:
24+
1. Delete the JSON file.
25+
2. Remove its stale entry/reference from `samples/metadata/samples.index.metadata.json`.
26+
3. Re-run audit and prove NO count drops.
27+
28+
## Acceptance Criteria
29+
- Baseline audit count recorded before changes.
30+
- 64 eligible unused JSON files removed, or fewer only if protected/ambiguous candidates remain.
31+
- Matching stale metadata references removed.
32+
- Final audit count recorded after changes.
33+
- Report explains before/after counts and any skipped candidates.
34+
- Full samples smoke test skipped unless shared loader/framework code changes.

0 commit comments

Comments
 (0)