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
{{ message }}
Repository navigation
Commit 8a8590d
Browse filesBrowse the repository at this point in the historyBrowse files
-`node ./scripts/run-node-test-files.mjs tests/dev-runtime/DevRuntimeBoundary.test.mjs` - FAIL on an existing router assertion for `parts[1] === "local-db"`.
Copy file name to clipboardExpand all lines: docs_build/dev/reports/PR_26178_ALFA_001-fix-tags-local-api-crash_manual-validation-notes.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,15 @@
5
5
- Confirmed no Tags page, browser-owned product data, local storage product source, MEM DB, or page-local product arrays were added.
6
6
- Confirmed the public failure message no longer exposes raw missing-table details such as `relation "project_tags" does not exist`.
7
7
- Confirmed the operator diagnostic still carries the raw cause for developer troubleshooting.
8
+
- Confirmed the Local API route returns HTTP 503 JSON for Tags setup failures instead of allowing the async service rejection to escape.
9
+
- Confirmed the API response body does not include `operatorDiagnostic`, raw relation text, table names, database URLs, hostnames, or credentials.
10
+
- Confirmed Assets no longer triggers an async Tags database read while the Local API data source is being constructed.
8
11
9
12
## Expected Manual Behavior
10
13
- With the Tags database schema applied, opening Tags and invoking the repository snapshot/list path should load seeded flat Tags from the API database.
11
14
- If account, Game Hub, or Tags database setup is missing, Tags API requests should fail with a 503 setup message telling the operator to verify the API database connection and apply setup.
12
15
- The service should not return fake data or silently treat missing schema as an empty Tags list.
16
+
- After a Tags setup failure, the Local API server should continue handling other API requests.
Copy file name to clipboardExpand all lines: docs_build/dev/reports/PR_26178_ALFA_001-fix-tags-local-api-crash_report.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@
10
10
- Wrapped the shared Tags `readTables` flow used by `listTags`, snapshots, and tag write preflight reads.
11
11
- Preserved raw database/schema details in `operatorDiagnostic` while returning Creator-safe actionable error text through the API error message.
12
12
- Added `tests/dev-runtime/TagsApiService.test.mjs` for the Tags service read path.
13
+
- Added a Tags repository API response mapper in `src/dev-runtime/server/local-api-router.mjs` so Tags setup failures return controlled HTTP errors.
14
+
- Prevented Assets from eagerly calling the async Tags API service during Local API data-source startup by giving Assets a synchronous cached-tags facade.
15
+
- Added `tests/dev-runtime/TagsApiErrorResponse.test.mjs` to prove Tags method failures return HTTP 503 JSON responses and do not escape the router.
- INFO: `node ./scripts/run-node-test-files.mjs tests/dev-runtime/DevRuntimeBoundary.test.mjs` was attempted and exposed an existing unrelated router assertion around the legacy `local-db` route. This branch does not modify `src/dev-runtime/server/local-api-router.mjs`.
25
31
26
32
## Result
27
-
PR-scoped validation is PASS. The Tags service now fails safely with actionable setup guidance when the API database adapter or Tags schema is missing.
33
+
PR-scoped validation is PASS. The Tags service now fails safely with actionable setup guidance when the API database adapter or Tags schema is missing, and the Local API route returns controlled HTTP errors without terminating the Node server.
- PASS - Browser response is Creator-safe: tests assert no relation name, raw table name, database URL, host, password, or operatorDiagnostic is present.
15
+
- PASS - No setup failure is converted into empty arrays: Tags API methods return HTTP errors instead of successful empty data.
16
+
- PASS - Node Local API server remains alive: route test confirms the router promise does not escape and a follow-up Tags constants request succeeds.
12
17
- PASS - Required reports produced under `docs_build/dev/reports/`.
13
18
- PASS - Repo-structured ZIP produced under `tmp/`.
- INFO/OUT-OF-SCOPE FAIL - DevRuntimeBoundary exposes an existing router assertion for `parts[1] === "local-db"` in `src/dev-runtime/server/local-api-router.mjs`. This branch does not change that file or route.
Copy file name to clipboardExpand all lines: src/dev-runtime/server/local-api-router.mjs
+45-3Lines changed: 45 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2784,6 +2784,33 @@ function repositoryMethodError(message, statusCode = 502) {
2784
2784
returnerror;
2785
2785
}
2786
2786
2787
+
constTAGS_API_SETUP_RESPONSE_MESSAGE="Tags API database setup is unavailable. Verify the API database connection and apply the account, Game Hub, and Tags database setup before using Tags.";
0 commit comments