Skip to content

Commit c3a8b9c

Browse files
committed
PR_26172_CHARLIE_037-retained-exceptions-audit
1 parent df3d138 commit c3a8b9c

3 files changed

Lines changed: 125 additions & 97 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# PR_26172_CHARLIE_037-retained-exceptions-audit
2+
3+
## Summary
4+
5+
Status: PASS.
6+
7+
This audit reviewed the four retained JavaScript exceptions from the target-tool migration stack and classified each next action.
8+
9+
No implementation files were changed.
10+
11+
## Files Reviewed
12+
13+
- `docs_build/dev/ProjectInstructions/README.txt`
14+
- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md`
15+
- `project-instructions/addendums/canonical-repository-structure.md`
16+
- `project-instructions/addendums/legacy-migration-policy.md`
17+
- `project-instructions/addendums/codex-artifact-and-reporting-standard.md`
18+
- `toolbox/controls/controls-api-client.js`
19+
- `toolbox/assets/assets-api-client.js`
20+
- `toolbox/assets/assets-upload-worker.js`
21+
- `toolbox/game-journey/game-journey-api-client.js`
22+
- `assets/toolbox/controls/js/index.js`
23+
- `assets/toolbox/assets/js/index.js`
24+
- `assets/toolbox/objects/js/index.js`
25+
- `assets/toolbox/game-journey/js/index.js`
26+
- `account/user-controls-page.js`
27+
- `scripts/validate-canonical-repository-structure.mjs`
28+
- `scripts/validate-browser-env-agnostic.mjs`
29+
- `tests/regression/CanonicalRepositoryStructureGuardrail.test.mjs`
30+
- `tests/dev-runtime/ProductDataProviderContractHardening.test.mjs`
31+
32+
## Classification
33+
34+
| Exception | Current consumers | Decision | Rationale |
35+
| --- | --- | --- | --- |
36+
| `toolbox/controls/controls-api-client.js` | Controls tool and `account/user-controls-page.js` | Move to shared | The file is a browser API helper used by more than one surface. `assets/js/shared/` is canonical and already accepted by the structure guardrail. |
37+
| `toolbox/assets/assets-api-client.js` | Assets tool and Objects tool | Move to shared | The file is shared by multiple tools. Moving to `assets/js/shared/` avoids placing a second JS file under one tool folder and removes one retained exception. |
38+
| `toolbox/assets/assets-upload-worker.js` | Assets tool only | Owner review required / keep temporary exception | The canonical rules define tool entrypoints and shared JS, but not tool-local worker module placement. Moving now would require either a new worker path rule or a possibly misleading shared location. |
39+
| `toolbox/game-journey/game-journey-api-client.js` | Game Journey tool | Move to shared if validation stays clean | The file is a browser API helper. It is not currently shared, but moving to `assets/js/shared/` is guardrail-compliant and avoids introducing an unapproved secondary tool-local JS file. |
40+
41+
## Recommended Execution
42+
43+
1. PR_26172_CHARLIE_038: investigate the existing Assets upload HTTP 500 before touching worker placement.
44+
2. PR_26172_CHARLIE_039: move `assets-api-client.js` to `assets/js/shared/` if PR_038 confirms upload behavior is not path-coupled; keep the worker as a documented exception unless owner approves a worker path rule.
45+
3. PR_26172_CHARLIE_040: move `controls-api-client.js` and `game-journey-api-client.js` to `assets/js/shared/` if targeted validation passes.
46+
4. PR_26172_CHARLIE_041: re-run guardrail and report remaining exceptions.
47+
48+
## Validation Lane Report
49+
50+
- Report exists: PASS
51+
- No runtime source changed: PASS
52+
- Active reference audit: PASS
53+
- ZIP artifact exists: PASS after artifact creation.
54+
55+
## Branch Validation
56+
57+
- Current branch: `PR_26172_CHARLIE_repository-compliance-stack`
58+
- Expected branch: `PR_26172_CHARLIE_repository-compliance-stack`
59+
- Local/origin sync before PR: `0 0`
60+
- Branch validation: PASS
61+
62+
## Requirement Checklist
63+
64+
- Audit `toolbox/controls/controls-api-client.js`: PASS
65+
- Audit `toolbox/assets/assets-api-client.js`: PASS
66+
- Audit `toolbox/assets/assets-upload-worker.js`: PASS
67+
- Audit `toolbox/game-journey/game-journey-api-client.js`: PASS
68+
- Determine migrate now / keep temporary exception / move to shared / owner review required: PASS
69+
- Do not merge: PASS
70+
- Produce ZIP artifact: PASS after artifact creation.
71+
72+
## Manual Validation Notes
73+
74+
The safest next code changes are shared-client relocations. The Assets worker should remain a temporary exception until the owner approves canonical worker placement or a guardrail update explicitly permits tool-local worker modules.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
A docs_build/dev/reports/PR_26172_CHARLIE_036-final-target-tool-compliance-reaudit.md
1+
A docs_build/dev/reports/PR_26172_CHARLIE_037-retained-exceptions-audit.md
Lines changed: 50 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,62 @@
1-
diff --git a/docs_build/dev/reports/PR_26172_CHARLIE_036-final-target-tool-compliance-reaudit.md b/docs_build/dev/reports/PR_26172_CHARLIE_036-final-target-tool-compliance-reaudit.md
1+
diff --git a/docs_build/dev/reports/PR_26172_CHARLIE_037-retained-exceptions-audit.md b/docs_build/dev/reports/PR_26172_CHARLIE_037-retained-exceptions-audit.md
22
new file mode 100644
3-
index 000000000..296d94e65
3+
index 000000000..bd470b359
44
--- /dev/null
5-
+++ b/docs_build/dev/reports/PR_26172_CHARLIE_036-final-target-tool-compliance-reaudit.md
6-
@@ -0,0 +1,120 @@
7-
+# PR_26172_CHARLIE_036-final-target-tool-compliance-reaudit
5+
+++ b/docs_build/dev/reports/PR_26172_CHARLIE_037-retained-exceptions-audit.md
6+
@@ -0,0 +1,74 @@
7+
+# PR_26172_CHARLIE_037-retained-exceptions-audit
88
+
99
+## Summary
1010
+
11-
+Status: PASS with retained exceptions documented.
11+
+Status: PASS.
1212
+
13-
+Final reaudit scope:
13+
+This audit reviewed the four retained JavaScript exceptions from the target-tool migration stack and classified each next action.
1414
+
15-
+- Controls
16-
+- Assets / Asset Browser / Vector Art
17-
+- Game Journey
15+
+No implementation files were changed.
1816
+
19-
+The active entrypoints for the target tools have moved to canonical paths. Remaining legacy paths are API-client or worker exceptions with removal plans.
20-
+
21-
+## Migrated Paths
22-
+
23-
+| Tool area | Legacy path | Canonical path | Status |
24-
+| --- | --- | --- | --- |
25-
+| Controls | `toolbox/controls/controls.js` | `assets/toolbox/controls/js/index.js` | Migrated |
26-
+| Assets | `toolbox/assets/assets.js` | `assets/toolbox/assets/js/index.js` | Migrated |
27-
+| Game Journey | `toolbox/game-journey/game-journey.js` | `assets/toolbox/game-journey/js/index.js` | Migrated |
28-
+
29-
+## Retained Exceptions
30-
+
31-
+| Path | Reason | Removal plan |
32-
+| --- | --- | --- |
33-
+| `toolbox/controls/controls-api-client.js` | Shared by Controls and `account/user-controls-page.js`. | Define shared client placement, move shared code, update both importers, then remove exception. |
34-
+| `toolbox/assets/assets-api-client.js` | Shared by Assets and Objects. | Define shared client placement, update Assets and Objects together, then remove exception. |
35-
+| `toolbox/assets/assets-upload-worker.js` | Worker filename/path pattern is not yet defined by canonical guardrail. | Add approved worker placement rule, move worker, update `new Worker(...)`, run upload validation, then remove exception. |
36-
+| `toolbox/game-journey/game-journey-api-client.js` | Guardrail currently approves only `assets/toolbox/{tool}/js/index.js`; second tool JS file placement is not approved. | Add secondary tool-module or shared-client placement rule, move/update imports, run Game Journey validation, then remove exception. |
37-
+
38-
+## Remaining Legacy Paths
39-
+
40-
+Active retained legacy paths:
17+
+## Files Reviewed
4118
+
19+
+- `docs_build/dev/ProjectInstructions/README.txt`
20+
+- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md`
21+
+- `project-instructions/addendums/canonical-repository-structure.md`
22+
+- `project-instructions/addendums/legacy-migration-policy.md`
23+
+- `project-instructions/addendums/codex-artifact-and-reporting-standard.md`
4224
+- `toolbox/controls/controls-api-client.js`
4325
+- `toolbox/assets/assets-api-client.js`
4426
+- `toolbox/assets/assets-upload-worker.js`
4527
+- `toolbox/game-journey/game-journey-api-client.js`
28+
+- `assets/toolbox/controls/js/index.js`
29+
+- `assets/toolbox/assets/js/index.js`
30+
+- `assets/toolbox/objects/js/index.js`
31+
+- `assets/toolbox/game-journey/js/index.js`
32+
+- `account/user-controls-page.js`
33+
+- `scripts/validate-canonical-repository-structure.mjs`
34+
+- `scripts/validate-browser-env-agnostic.mjs`
35+
+- `tests/regression/CanonicalRepositoryStructureGuardrail.test.mjs`
36+
+- `tests/dev-runtime/ProductDataProviderContractHardening.test.mjs`
37+
+
38+
+## Classification
39+
+
40+
+| Exception | Current consumers | Decision | Rationale |
41+
+| --- | --- | --- | --- |
42+
+| `toolbox/controls/controls-api-client.js` | Controls tool and `account/user-controls-page.js` | Move to shared | The file is a browser API helper used by more than one surface. `assets/js/shared/` is canonical and already accepted by the structure guardrail. |
43+
+| `toolbox/assets/assets-api-client.js` | Assets tool and Objects tool | Move to shared | The file is shared by multiple tools. Moving to `assets/js/shared/` avoids placing a second JS file under one tool folder and removes one retained exception. |
44+
+| `toolbox/assets/assets-upload-worker.js` | Assets tool only | Owner review required / keep temporary exception | The canonical rules define tool entrypoints and shared JS, but not tool-local worker module placement. Moving now would require either a new worker path rule or a possibly misleading shared location. |
45+
+| `toolbox/game-journey/game-journey-api-client.js` | Game Journey tool | Move to shared if validation stays clean | The file is a browser API helper. It is not currently shared, but moving to `assets/js/shared/` is guardrail-compliant and avoids introducing an unapproved secondary tool-local JS file. |
4646
+
47-
+Historical references:
48-
+
49-
+- `docs_build/pr/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff/BUILD_PR.md`
50-
+- `docs_build/pr/PR_26171_ALPHA_047-game-hub-canonical-path-journey-handoff/APPLY_PR.md`
51-
+
52-
+Historical references were not rewritten.
53-
+
54-
+## Guardrail Status
55-
+
56-
+- Command: `npm run validate:canonical-structure`
57-
+- Result: PASS
58-
+- Blocking violations: 0
59-
+- Approved legacy exceptions: 481
60-
+
61-
+## Browser Validation Status
62-
+
63-
+- Command: `npm run validate:browser-env-agnostic`
64-
+- Result: FAIL
65-
+- Findings:
66-
+ - Product service contract findings in `src/dev-runtime/server/local-api-router.mjs`.
67-
+ - User-facing implementation wording findings in Messages.
68-
+- Classification: existing broader browser-env gate findings, not introduced by this target-tool migration stack.
69-
+
70-
+## Report and ZIP Artifact Check
71-
+
72-
+| Scope | Report | ZIP |
73-
+| --- | --- | --- |
74-
+| PR_26172_CHARLIE_028 | Present | Present |
75-
+| PR_26172_CHARLIE_029 | Present | Present |
76-
+| PR_26172_CHARLIE_030 | Present | Present |
77-
+| PR_26172_CHARLIE_031 | Present | Present |
78-
+| PR_26172_CHARLIE_032 | Present | Present |
79-
+| PR_26172_CHARLIE_033 | Present | Present |
80-
+| PR_26172_CHARLIE_034 | Present | Present |
81-
+| PR_26172_CHARLIE_035 | Present | Present |
82-
+
83-
+## Stack Readiness
47+
+## Recommended Execution
8448
+
85-
+Ready for Owner review: YES, with documented retained exceptions and validation caveats.
49+
+1. PR_26172_CHARLIE_038: investigate the existing Assets upload HTTP 500 before touching worker placement.
50+
+2. PR_26172_CHARLIE_039: move `assets-api-client.js` to `assets/js/shared/` if PR_038 confirms upload behavior is not path-coupled; keep the worker as a documented exception unless owner approves a worker path rule.
51+
+3. PR_26172_CHARLIE_040: move `controls-api-client.js` and `game-journey-api-client.js` to `assets/js/shared/` if targeted validation passes.
52+
+4. PR_26172_CHARLIE_041: re-run guardrail and report remaining exceptions.
8653
+
87-
+Owner review should note:
54+
+## Validation Lane Report
8855
+
89-
+- The target entrypoint migrations are complete.
90-
+- The retained API/worker files require follow-up shared-client or worker-placement governance before removal.
91-
+- Browser-env validation remains blocked by existing non-Charlie findings.
92-
+- Assets full upload Playwright validation is blocked by Local API provider persistence behavior, not by canonical entrypoint path loading.
56+
+- Report exists: PASS
57+
+- No runtime source changed: PASS
58+
+- Active reference audit: PASS
59+
+- ZIP artifact exists: PASS after artifact creation.
9360
+
9461
+## Branch Validation
9562
+
@@ -100,27 +67,14 @@ index 000000000..296d94e65
10067
+
10168
+## Requirement Checklist
10269
+
103-
+- Verify Controls: PASS
104-
+- Verify Assets / Asset Browser / Vector Art: PASS
105-
+- Verify Game Journey: PASS
106-
+- Report migrated paths: PASS
107-
+- Report retained exceptions: PASS
108-
+- Report remaining legacy paths: PASS
109-
+- Provide removal plans: PASS
110-
+- Run canonical structure guardrail: PASS
111-
+- Run browser validation: PASS with existing failure documented.
112-
+- Confirm all reports exist: PASS
113-
+- Confirm ZIP exists: PASS after artifact creation.
70+
+- Audit `toolbox/controls/controls-api-client.js`: PASS
71+
+- Audit `toolbox/assets/assets-api-client.js`: PASS
72+
+- Audit `toolbox/assets/assets-upload-worker.js`: PASS
73+
+- Audit `toolbox/game-journey/game-journey-api-client.js`: PASS
74+
+- Determine migrate now / keep temporary exception / move to shared / owner review required: PASS
75+
+- Do not merge: PASS
76+
+- Produce ZIP artifact: PASS after artifact creation.
11477
+
11578
+## Manual Validation Notes
11679
+
117-
+This reaudit confirms the remaining target work is no longer entrypoint migration. It is shared-client and worker-placement cleanup, which should be scoped separately to avoid changing tool behavior under a structure-only migration stack.
118-
+
119-
+## Recommended Next PRs
120-
+
121-
+1. Shared API-client placement governance for reused toolbox API clients.
122-
+2. Worker placement guardrail for tool-local module workers.
123-
+3. Controls API client shared placement migration.
124-
+4. Assets API client shared placement migration with Objects.
125-
+5. Assets worker migration after worker placement rule exists.
126-
+6. Game Journey API client migration after secondary module or shared-client placement is approved.
80+
+The safest next code changes are shared-client relocations. The Assets worker should remain a temporary exception until the owner approves canonical worker placement or a guardrail update explicitly permits tool-local worker modules.

0 commit comments

Comments
 (0)