|
| 1 | +# BUILD_PR_ASSET_REMEDIATION_SYSTEM |
| 2 | + |
| 3 | +## Goal |
| 4 | +Implement the assistive remediation system defined in `PLAN_PR_ASSET_REMEDIATION_SYSTEM` on top of the existing validation engine without changing engine core APIs. |
| 5 | + |
| 6 | +## Implemented Scope |
| 7 | +- Added shared remediation engine in `tools/shared/projectAssetRemediation.js` |
| 8 | + - deterministic validation-finding to remediation-action mapping |
| 9 | + - stable remediation result contract: |
| 10 | + - `remediation.status` |
| 11 | + - ordered `remediation.actions[]` |
| 12 | + - action support for: |
| 13 | + - inspect-only flows |
| 14 | + - jump-to-problem navigation |
| 15 | + - confirmable fixes |
| 16 | + - deterministic remediation categories for: |
| 17 | + - missing asset registry entries |
| 18 | + - unresolved palette/tileset/parallax source links |
| 19 | + - duplicate IDs |
| 20 | + - stale graph snapshots |
| 21 | + - orphaned graph nodes |
| 22 | + - circular/dependency inspection |
| 23 | +- Added automated coverage in `tests/tools/AssetRemediationSystem.test.mjs` |
| 24 | + - deterministic remediation action ordering |
| 25 | + - confirmable fix generation for single-candidate relink |
| 26 | + - graph refresh remediation generation |
| 27 | + - unavailable remediation state for valid projects |
| 28 | +- Integrated assistive remediation consumption into all three registry-aware editors: |
| 29 | + - `tools/Sprite Editor/` |
| 30 | + - remediation summary text |
| 31 | + - `Inspect Issues` |
| 32 | + - `Jump to Problem` |
| 33 | + - `Apply Suggested Fix` |
| 34 | + - confirmable palette relink, graph refresh, and owned-registry refresh flows |
| 35 | + - `tools/Tile Map Editor/` |
| 36 | + - remediation summary text |
| 37 | + - `Inspect Issues` |
| 38 | + - `Jump to Problem` |
| 39 | + - `Apply Suggested Fix` |
| 40 | + - confirmable tileset relink, graph refresh, and owned-registry refresh flows |
| 41 | + - `tools/Parallax Editor/` |
| 42 | + - remediation summary text |
| 43 | + - `Inspect Issues` |
| 44 | + - `Jump to Problem` |
| 45 | + - `Apply Suggested Fix` |
| 46 | + - confirmable parallax-source relink, graph refresh, and owned-registry refresh flows |
| 47 | +- Preserved validation authority and enforcement |
| 48 | + - remediation consumes validation output |
| 49 | + - guarded save/package/export blocking remains unchanged |
| 50 | + - remediation does not auto-apply fixes without explicit confirmation |
| 51 | + - legacy invalid projects still load and can move through repair workflows |
| 52 | + |
| 53 | +## Manual Validation Checklist |
| 54 | +1. Missing asset issues produce relink suggestions when candidates exist. `PASS` |
| 55 | +2. Duplicate ID issues produce safe resolution suggestions. `PASS` |
| 56 | +3. Graph staleness can produce refresh/regenerate suggestions. `PASS` |
| 57 | +4. Confirmable fixes require explicit confirmation. `PASS` |
| 58 | +5. Navigation actions remain non-destructive. `PASS` |
| 59 | +6. Enforced blocking remains active until issues are resolved. `PASS` |
| 60 | +7. Suggestion output is deterministic across repeated validation runs. `PASS` |
| 61 | +8. Engine core APIs remain unchanged. `PASS` |
| 62 | + |
| 63 | +## Validation Summary |
| 64 | +- Syntax checks passed: |
| 65 | + - `node --check tools/shared/projectAssetRemediation.js` |
| 66 | + - `node --check tests/tools/AssetRemediationSystem.test.mjs` |
| 67 | + - `node --check tools/Sprite Editor/modules/spriteEditorApp.js` |
| 68 | + - `node --check tools/Tile Map Editor/main.js` |
| 69 | + - `node --check tools/Parallax Editor/main.js` |
| 70 | +- Targeted remediation test passed: |
| 71 | + - `node` inline runner for `tests/tools/AssetRemediationSystem.test.mjs` |
| 72 | +- Full Node test suite passed: |
| 73 | + - `node ./scripts/run-node-tests.mjs` |
| 74 | + |
| 75 | +## Scope Guard |
| 76 | +- Validation remains authoritative. |
| 77 | +- Remediation remains assistive and confirmation-based for state changes. |
| 78 | +- Jump/inspect flows remain non-destructive. |
| 79 | +- Enforced blocking still governs guarded save/package/export actions. |
| 80 | +- No engine core API files were modified. |
| 81 | + |
| 82 | +## Approved Commit Comment |
| 83 | +build(asset-remediation): add assistive remediation system for validation findings |
| 84 | + |
| 85 | +## Next Command |
| 86 | +APPLY_PR_ASSET_REMEDIATION_SYSTEM |
0 commit comments