Google API errors as typed findings, never raw JSON: cli/lib/google-errors.ts parses SERVICE_DISABLED (api-disabled: service, Cloud project, console page), PERMISSION_DENIED (no-app-access: which app, Users and permissions), 401 / invalid_grant (auth-revoked) and 429 (quota); health / analytics print one line with the URL, raw text in detail and the log; desktop Health tab: the line, 'Turn it on in Google Cloud' and 'Check again', raw text in a collapsed Details; Portfolio shows a Cloud project blocking several apps once. Findings exit codes are results: the sidecar reports outcome (ok / findings / declined / failed) and the command's own error line; scan / check / validate / health exit 1 with findings show and cache the findings; no bare 'Exit code N' anywhere. tests/google-errors.test.ts, boot check errors cases (api-disabled, scan-findings, scan-failed) (pitfall 57)

This commit is contained in:
CRTkafa 2026-10-13 23:20:04 +08:00
parent f69c10d3a0
commit 89256f1e80
28 changed files with 666 additions and 47 deletions

View file

@ -2,6 +2,18 @@
## Unreleased
- **Google API errors in words, not JSON.** Google's error bodies are parsed centrally (`cli/lib/google-errors.ts`)
into typed findings: `api-disabled` (403 SERVICE_DISABLED: service, Cloud project id, the console page to turn it
on), `no-app-access` (403 PERMISSION_DENIED: which app, the Users and permissions step), `auth-revoked` (401,
invalid_grant) and `quota` (429, RESOURCE_EXHAUSTED). `health`, `analytics` and the health JSON say one line with the
URL ("Crash and ANR data needs the Google Play Developer Reporting API turned on in Google Cloud project <id>. Turn
it on: ..."); the raw text stays in `detail` and the log. The desktop Health tab shows that line with "Turn it on in
Google Cloud" and "Check again", the raw text only in a collapsed Details; the Portfolio shows a Cloud project that
blocks several apps once ("1 Google Cloud project needs an API turned on: affects ..."). Pitfall 57.
- **Findings are results, not errors, in the desktop.** `scan`, `check`, `validate` and `health` exit 1 when they find
problems (by design); the sidecar now reports an `outcome` (ok / findings / declined / failed) and, for a real
failure, the command's own `error` line (stderr's last "error: ..." line). The Checks tab lists the findings instead
of "Exit code 1", findings results are cached, and every place that showed a bare "Exit code N" shows the error line.
- **Play "Live" only when the store page proves it.** The Play Developer API has no review state: a production release
reads `completed` while Google still reviews it. `play status` now checks the public store page (no auth, fast
timeout, cached 5 minutes) and adds `publicPage` to its JSON: page 404 = "Sent to Google (in review or not yet