Commit 0475f1d
feat(errors): PRO-UX.1 + PRO-UX.2 — Pro CLI error UX bridge + root-cause fix (#775)
* feat(errors): pro-error-registry extending defaultErrorRegistry [Story PRO-UX.1]
5 top-5 codes mapped to EXISTING ErrorCategory (PERMISSION/NETWORK/
EXTERNAL_EXECUTOR — no invented categories). Warm G3 PT-BR userMessage +
recovery arrays. Codes mirror license-server (no AIOX_ prefix). No collision
with core registry. 7 tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(pro-cli): envelope bridge + warm render + OS-aware recovery [Story PRO-UX.1][Story PRO-UX.2]
- error-bridge: parseEnvelopeToAIOXError, 3-tier fallback (message_pt >
registry.userMessage > server message), graceful on legacy/malformed
- render-error: warm output + numbered steps + support_code + conditional
support link + technical footer
- recovery-actions: planRecoveryAction + OS-aware cache cleanup (PowerShell
vs bash — fixes the bug that made Robert run bash in PowerShell)
- 15 tests (bridge fallback, render anchor case, cross-platform)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(installer): parse nested error envelope in pro-setup _request [Story PRO-UX.1]
ROOT CAUSE of the anchor incident (Robert's opaque "HTTP 403"): _request read
parsed.message / parsed.code at the ROOT, but the structured envelope nests
them under `error`. So err.code was always undefined → the typed error
branches (NOT_A_BUYER, SEAT_LIMIT_EXCEEDED, ...) in runProWizard were NEVER
reached → fell through to the generic "HTTP <status>" message.
Fix: read errorBody from parsed.error (nested) first, attach err.httpStatus +
err.envelope for downstream renderError. Restores the existing i18n error
branches. Preserves legacy root-shape compat.
pro-setup suite 39/39 green (no regression).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(ids): register pro-error-registry in entity registry [Story PRO-UX.1]
IDS hook auto-registration for .aiox-core/core/errors/pro-error-registry.js.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(ids): regen entity-registry deterministically [Story PRO-UX.1]
The IDS hook's incremental update diverged from clean regen output (structural
delta). Regenerated via populate-entity-registry.js. validate:registry-determinism
now PASSES (821 entities).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(pro-cli): null/non-object guards in renderError + pro-setup fallback [Story PRO-UX.2]
Addresses 2 CodeRabbit Major findings on PR #775:
- renderError: guard against null/non-object err (prints generic message)
- pro-setup _request: guard parsed.message/parsed.code against parsed === null
The 5 "absolute import" suggestions are NOT applied: CLI runtime modules
(error-bridge, pro-error-registry) require relative paths — there is no runtime
module alias for `aiox-core/*` outside Jest's moduleNameMapper. Same-dir `./`
imports do not violate the no-`../../../` rule.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e9d088c commit 0475f1d
11 files changed
Lines changed: 1329 additions & 830 deletions
File tree
- .aiox-core
- core/errors
- data
- packages
- aiox-pro-cli/src
- installer/src/wizard
- tests
- core/errors
- pro-cli
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
0 commit comments