Skip to content

fix: harden metrics CLI boot and updater package manager#788

Open
rafaelscosta wants to merge 9 commits into
mainfrom
automation/issues-20260601-141910
Open

fix: harden metrics CLI boot and updater package manager#788
rafaelscosta wants to merge 9 commits into
mainfrom
automation/issues-20260601-141910

Conversation

@rafaelscosta

Copy link
Copy Markdown
Collaborator

Summary

  • lazy-load metrics runtime so missing quality/* files no longer crash CLI bootstrap
  • make updater install/uninstall respect detected project package manager metadata and lockfiles
  • add regression coverage for metrics bootstrap and updater package-manager command selection

Validation

  • npm test -- --runInBand tests/updater/aiox-updater.test.js tests/installer/dependency-installer.test.js tests/cli/metrics-bootstrap.test.js
  • npm run lint
  • npm run typecheck
  • npm test
  • npm run validate:publish
  • git submodule update --init pro
  • (cd pro && npm install)
  • (cd pro && npm run validate:publish-surface)

Closes #782
Closes #785

rafaelscosta and others added 9 commits May 20, 2026 14:25
…y 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>
…ry 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>
…ory 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>
…-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>
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>
…ack [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>
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment Jun 1, 2026 5:33pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 929580c6-0ed2-4c1c-bf4f-f615bbfa748a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch automation/issues-20260601-141910

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added type: test Test coverage and quality area: installer Installer and setup (packages/installer/) area: docs Documentation (docs/) labels Jun 1, 2026
@rafaelscosta
rafaelscosta force-pushed the feature/pro-ux-error-bridge branch from d20dcb0 to 299d730 Compare July 13, 2026 19:57
Base automatically changed from feature/pro-ux-error-bridge to main July 13, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation (docs/) area: installer Installer and setup (packages/installer/) type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant