Skip to content

Commit 82e9229

Browse files
author
DavidQ
committed
Close remaining sample JSON audit gaps with palette/reference stabilization - PR 11.67
1 parent 463e8c8 commit 82e9229

8 files changed

Lines changed: 149 additions & 3 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.66
1+
# Codex Commands — PR 11.67
22

33
Model: GPT-5.4
44
Reasoning: high
55

66
```powershell
7-
codex --model gpt-5.4 --reasoning high "Run PR 11.66 Palette Audit Stabilization. Follow docs/pr/PR_11_66_PALETTE_AUDIT_STABILIZATION.md exactly. Start by running .\scripts\PS\audit-sample-json-js-references.ps1 and reading docs/dev/reports/sample_json_js_reference_audit.csv. Repair remaining palette-related missing references by generating sample-local palette JSON from sample JS colors, fixing JS references to generated palette JSON, or removing stale metadata/index references when the JSON is not actually needed. Apply the counts-only audit output change if missing. Do not refactor. Do not run the full sample suite. Write docs/dev/reports/pr_11_66_palette_audit_stabilization_report.md with before/after counts, files changed, and blockers if any. Return a ZIP at tmp/PR_11_66_PALETTE_AUDIT_STABILIZATION.zip."
7+
codex --model gpt-5.4 --reasoning high "Run BUILD_PR_LEVEL_11_67_FINAL_SAMPLE_JSON_AUDIT_CLOSURE. Use docs/dev/reports/sample_json_js_reference_audit.csv as source of truth. Close remaining missing sample JSON references by generating palette JSON from existing sample JS color data, wiring existing/generated JSON through the existing loader pattern, removing stale metadata-only references, and documenting exact unresolved blockers. Keep changes surgical. Do not run full samples suite. Produce a ZIP at tmp/PR_11_67_FINAL_SAMPLE_JSON_AUDIT_CLOSURE.zip."
88
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Stabilize palette reference audit and repair remaining palette missing references - PR 11.66
1+
Close remaining sample JSON audit gaps with palette/reference stabilization - PR 11.67
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PR 11.67 Expected Report
2+
3+
Codex must create/update this report during execution with:
4+
5+
## Baseline
6+
- JSON files scanned:
7+
- Referenced:
8+
- Missing reference:
9+
10+
## Repairs Applied
11+
- file path
12+
- action taken
13+
- reason
14+
15+
## Final
16+
- JSON files scanned:
17+
- Referenced:
18+
- Missing reference:
19+
20+
## Remaining Blockers
21+
List exact file path and reason for every unresolved row.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# PR 11.67 Sample JSON Audit Closure
2+
3+
## Scope
4+
Executed `BUILD_PR_LEVEL_11_67_FINAL_SAMPLE_JSON_AUDIT_CLOSURE` using `docs/dev/reports/sample_json_js_reference_audit.csv` as source of truth.
5+
6+
## Baseline Audit
7+
Command:
8+
- `./scripts/PS/audit-sample-json-js-references.ps1`
9+
10+
Counts:
11+
- JSON files scanned: `66`
12+
- Referenced: `66`
13+
- Missing reference: `0`
14+
15+
Evidence:
16+
- `docs/dev/reports/pr_11_67_before_audit.txt`
17+
18+
## Missing-Reference Review
19+
- Remaining missing-reference rows in CSV: `0`
20+
- Palette-related missing rows: `0`
21+
- Metadata/index-only stale references requiring removal: `0`
22+
23+
Because no missing rows remained, no sample JSON reconstruction or JS reference rewiring changes were required in this closure pass.
24+
25+
## Audit Output Behavior Check
26+
Default audit output is counts-only and does not print YES/NO detail lines unless `-Details` is provided.
27+
28+
## Final Audit
29+
Command:
30+
- `./scripts/PS/audit-sample-json-js-references.ps1`
31+
32+
Counts:
33+
- JSON files scanned: `66`
34+
- Referenced: `66`
35+
- Missing reference: `0`
36+
37+
Evidence:
38+
- `docs/dev/reports/pr_11_67_after_audit.txt`
39+
40+
## Validation
41+
Targeted validation only:
42+
1. PowerShell parse check
43+
- `Parser::ParseFile('scripts/PS/audit-sample-json-js-references.ps1', ...)` -> PASS
44+
2. Default output mode check
45+
- verified no `YES -`, `NO -`, or `Missing references:` lines in default output -> PASS
46+
3. Full sample suite
47+
- skipped (no runtime/loader/tool changes and explicitly out of scope)
48+
49+
## Files Changed
50+
- `docs/dev/reports/pr_11_67_before_audit.txt`
51+
- `docs/dev/reports/pr_11_67_after_audit.txt`
52+
- `docs/dev/reports/PR_11_67_sample_json_audit_closure.md`
53+
54+
## Blockers
55+
- None.
330 Bytes
Binary file not shown.
330 Bytes
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# BUILD_PR_LEVEL_11_67_FINAL_SAMPLE_JSON_AUDIT_CLOSURE
2+
3+
## Codex Task
4+
Execute the final sample JSON audit closure pass.
5+
6+
## Steps
7+
1. Run:
8+
```powershell
9+
.\scripts\PS\audit-sample-json-js-references.ps1
10+
```
11+
2. Record baseline counts in:
12+
`docs/dev/reports/PR_11_67_sample_json_audit_closure.md`
13+
3. Read:
14+
`docs/dev/reports/sample_json_js_reference_audit.csv`
15+
4. For each remaining missing-reference row:
16+
- repair palette JSON when palette data can be derived from the matching sample JS file
17+
- update sample JS to reference the generated/existing JSON using the repo's existing loader style
18+
- remove stale metadata/index-only references when they are the only remaining reference
19+
- document unresolved blockers instead of guessing
20+
5. Update the audit script output so once summary counts are printed, the detailed YES/NO list is not printed again by default.
21+
6. Re-run the audit.
22+
7. Record final counts and exact remaining blockers, if any.
23+
24+
## Validation
25+
Run targeted validation only:
26+
- PowerShell syntax/parse check for the audit script
27+
- affected sample/tool smoke checks only when Codex can identify them from changed files
28+
- no full sample suite
29+
30+
## Completion Rules
31+
The PR is complete only if:
32+
- before/after counts are recorded
33+
- missing reference count decreases or every remaining row is documented as a real blocker
34+
- no broad refactor was introduced
35+
- no hidden sample/default asset loading was introduced
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PLAN_PR_LEVEL_11_67_FINAL_SAMPLE_JSON_AUDIT_CLOSURE
2+
3+
## Purpose
4+
Close the remaining sample JSON audit gap after palette reconstruction and metadata-aware cleanup.
5+
6+
## Scope
7+
- Use `docs/dev/reports/sample_json_js_reference_audit.csv` as the source of truth.
8+
- Resolve remaining `Missing reference` rows by making each case real, removed, or explicitly documented as a blocker.
9+
- Preserve controlled cleanup rules.
10+
- Include the counts-only audit output behavior requested by the user.
11+
12+
## Required Behavior
13+
For every remaining missing JSON reference in the audit CSV:
14+
1. If the JSON file is palette-related and missing, generate it from colors already present in the matching sample JS file.
15+
2. If the JSON exists but is not detected as referenced, update the matching JS sample to reference the JSON through the existing sample loader pattern.
16+
3. If the only remaining reference is stale metadata/index data, remove the stale metadata/index entry with the JSON cleanup.
17+
4. If a row is ambiguous or shared, do not guess; document it in `docs/dev/reports/PR_11_67_blockers.md`.
18+
19+
## Guardrails
20+
- Do not touch `sample 1902` unless the audit CSV proves it is required and the change is a metadata-only correction.
21+
- Do not delete `palette.json` blindly.
22+
- Do not delete `tile-map-editor-document.json`.
23+
- Do not introduce hidden defaults.
24+
- Do not add broad fallback data.
25+
- Do not refactor sample loaders or shared framework code.
26+
- Do not run the full samples suite.
27+
28+
## Acceptance
29+
- Audit runs before and after.
30+
- Final report records before/after:
31+
- JSON files scanned
32+
- Referenced
33+
- Missing reference
34+
- Missing reference count is reduced as much as safely possible.
35+
- Any non-zero remaining count is explained by exact file path and reason.

0 commit comments

Comments
 (0)