You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR_26172_CHARLIE_006A determined that `/api/game-journey/completion-metrics` can return HTTP 500 when local legacy SQLite preservation protection is triggered by:
That behavior is intentional and prevents silent data loss. It is not caused by prior Charlie JS/CSS migrations. PR_034 validation must document this separately if it appears and must not misattribute the known HTTP 500 to the entrypoint move without direct evidence.
51
+
52
+
## Migration Decision
53
+
54
+
### `game-journey.js`
55
+
56
+
Decision: safe to migrate in PR_034 with targeted import and HTML updates.
57
+
58
+
Reason:
59
+
60
+
- It is a single browser entrypoint.
61
+
- It is referenced directly by the Game Journey page.
62
+
- It can keep existing behavior by importing the retained API client and tool registry client through adjusted relative paths.
63
+
- No CSS move is required.
64
+
65
+
### `game-journey-api-client.js`
66
+
67
+
Decision: do not move in PR_034. Review in PR_035.
68
+
69
+
Reason:
70
+
71
+
- The canonical guardrail currently approves the tool entrypoint path `assets/toolbox/{tool}/js/index.js`.
72
+
- Adding a second JS file under `assets/toolbox/game-journey/js/` would require either guardrail expansion or a folded/shared-client migration.
73
+
- The API client re-exports completion metrics helpers, so it should not be moved in the same PR as the entrypoint unless validation proves it is safe.
- Determine whether `game-journey.js` can safely move: PASS
99
+
- Determine whether API client should move, remain, or become shared: PASS
100
+
- Define validation that avoids confusing known SQLite preservation behavior with migration failure: PASS
101
+
- No implementation changes: PASS
102
+
- ZIP artifact exists: PASS after artifact creation.
103
+
104
+
## Manual Validation Notes
105
+
106
+
The next safe implementation step is a focused entrypoint move only. The API client should remain an exception until PR_035 because the guardrail does not currently allow a second canonical tool JS file.
107
+
108
+
## Recommendation
109
+
110
+
Continue to PR_034 and migrate only `game-journey.js` to `assets/toolbox/game-journey/js/index.js`.
+Status: PASS with temporary legacy exceptions retained.
11
+
+Status: PASS.
12
12
+
13
-
+No executable implementation files were changed in this PR. The remaining Assets tool legacy files were reviewed after the PR_031 entrypoint migration:
14
-
+
15
-
+- `toolbox/assets/assets-api-client.js`
16
-
+- `toolbox/assets/assets-upload-worker.js`
17
-
+
18
-
+Both files remain in approved legacy locations for this stack because moving them would require governance or shared-client decisions outside this PR scope.
13
+
+This audit reviewed Game Journey for canonical JS migration readiness without implementation changes.
+- `toolbox/assets/assets-api-client.js` is not Assets-only.
43
-
+- `assets/toolbox/objects/js/index.js` imports `createAssetToolApiRepository` from the same file.
44
-
+- Moving the client into `assets/toolbox/assets/js/` would either break Objects or require a shared-client migration that is outside this PR.
50
+
+## Completion Metrics Risk
45
51
+
46
-
+Removal plan:
52
+
+PR_26172_CHARLIE_006A determined that `/api/game-journey/completion-metrics` can return HTTP 500 when local legacy SQLite preservation protection is triggered by:
47
53
+
48
-
+1. Create a shared API-client placement rule for reused toolbox clients.
49
-
+2. Move shared reusable code to the approved shared location.
50
-
+3. Update Assets and Objects imports together.
51
-
+4. Remove the legacy exception after both tools validate.
+That behavior is intentional and prevents silent data loss. It is not caused by prior Charlie JS/CSS migrations. PR_034 validation must document this separately if it appears and must not misattribute the known HTTP 500 to the entrypoint move without direct evidence.
54
57
+
55
-
+Decision: retain as temporary legacy exception.
58
+
+## Migration Decision
59
+
+
60
+
+### `game-journey.js`
61
+
+
62
+
+Decision: safe to migrate in PR_034 with targeted import and HTML updates.
56
63
+
57
64
+Reason:
58
65
+
59
-
+- `toolbox/assets/assets-upload-worker.js` is a module worker and is loaded directly by URL.
60
-
+- The current canonical guardrail approves tool entrypoints at `assets/toolbox/{tool-name}/js/index.js`.
61
-
+- It does not yet define an approved worker filename or worker subpath pattern.
62
-
+- PR_031 validation confirmed the retained worker loads from `toolbox/assets/assets-upload-worker.js`.
66
+
+- It is a single browser entrypoint.
67
+
+- It is referenced directly by the Game Journey page.
68
+
+- It can keep existing behavior by importing the retained API client and tool registry client through adjusted relative paths.
69
+
+- No CSS move is required.
70
+
+
71
+
+### `game-journey-api-client.js`
63
72
+
64
-
+Removal plan:
73
+
+Decision: do not move in PR_034. Review in PR_035.
74
+
+
75
+
+Reason:
65
76
+
66
-
+1. Add a canonical worker placement rule, or explicitly approve an Assets worker exception.
67
-
+2. Move the worker only after the new placement is recognized by the guardrail.
68
-
+3. Update `new Worker(...)` URL construction.
69
-
+4. Run targeted upload validation before removing the legacy exception.
77
+
+- The canonical guardrail currently approves the tool entrypoint path `assets/toolbox/{tool}/js/index.js`.
78
+
+- Adding a second JS file under `assets/toolbox/game-journey/js/` would require either guardrail expansion or a folded/shared-client migration.
79
+
+- The API client re-exports completion metrics helpers, so it should not be moved in the same PR as the entrypoint unless validation proves it is safe.
+ - Local API product service contract findings in `src/dev-runtime/server/local-api-router.mjs`.
81
-
+ - User-facing implementation wording findings in Messages.
82
-
+ - Classification: existing broader browser-env gate findings, not caused by this report-only PR.
83
-
+- Active reference check
84
-
+ - Result: PASS
85
-
+ - `toolbox/assets/assets-api-client.js` is referenced by Assets, Objects, guardrails, and related tests.
86
-
+ - `toolbox/assets/assets-upload-worker.js` is referenced by the Assets canonical entrypoint, guardrail, and worker validation test.
86
+
+- Active stale reference check for `toolbox/game-journey/game-journey.js`
87
+
+- Targeted Game Journey Playwright validation, with any known completion-metrics legacy SQLite HTTP 500 documented separately.
87
88
+
88
89
+## Branch Validation
89
90
+
@@ -94,21 +95,22 @@ index 000000000..44d4c753c
94
95
+
95
96
+## Requirement Checklist
96
97
+
97
-
+- Use PR_030 and PR_031 results: PASS
98
-
+- Move Assets-only API client only if safe: PASS, retained because it is shared with Objects.
99
-
+- Move worker only if safe: PASS, retained because canonical worker placement is undefined.
100
-
+- Document approved temporary legacy exception with removal plan: PASS
101
-
+- Do not create shared APIs unless clearly reused by multiple tools: PASS
102
-
+- No behavior changes: PASS
103
-
+- Run targeted Assets validation: PASS by PR_031 page/worker probe; full upload Playwright remains blocked by provider persistence failure.
104
-
+- Run browser env validation: PASS with existing failure documented.
105
-
+- Run canonical structure guardrail: PASS
106
-
+- Confirm ZIP exists: PASS after artifact creation.
98
+
+- Review `game-journey.js`: PASS
99
+
+- Review `game-journey-api-client.js`: PASS
100
+
+- Review `index.html`: PASS
101
+
+- Review Game Journey tests: PASS
102
+
+- Review Local API completion metrics route: PASS
103
+
+- Review prior PR_006A findings: PASS
104
+
+- Determine whether `game-journey.js` can safely move: PASS
105
+
+- Determine whether API client should move, remain, or become shared: PASS
106
+
+- Define validation that avoids confusing known SQLite preservation behavior with migration failure: PASS
107
+
+- No implementation changes: PASS
108
+
+- ZIP artifact exists: PASS after artifact creation.
107
109
+
108
110
+## Manual Validation Notes
109
111
+
110
-
+The safest current state is to keep the API client and worker in their approved legacy paths while the active entrypoint lives in the canonical path. This keeps Objects imports working and avoids inventing an unapproved worker path.
112
+
+The next safe implementation step is a focused entrypoint move only. The API client should remain an exception until PR_035 because the guardrail does not currently allow a second canonical tool JS file.
111
113
+
112
114
+## Recommendation
113
115
+
114
-
+Continue to Game Journey audit PR_033. Open a later shared-client or worker-placement governance PR before moving the retained Assets exceptions.
116
+
+Continue to PR_034 and migrate only `game-journey.js` to `assets/toolbox/game-journey/js/index.js`.
0 commit comments