Skip to content

Merge pro UX error bridge cleanup into main#780

Merged
rafaelscosta merged 10 commits into
mainfrom
devops/merge-pro-ux-error-bridge-main
May 21, 2026
Merged

Merge pro UX error bridge cleanup into main#780
rafaelscosta merged 10 commits into
mainfrom
devops/merge-pro-ux-error-bridge-main

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary\n- Merge feature/pro-ux-error-bridge into main\n- Remove leaked Pro IDE artifacts from core Claude/Codex surfaces\n- Keep Claude/Codex validation gates preventing future leaks\n- Include latest main installer npm CLI fix\n\n## Validation\n- npm run lint\n- npm run typecheck\n- npm run validate:claude-integration\n- npm run validate:claude-sync\n- npm run validate:codex-skills\n- npm run validate:codex-sync\n- npm run validate:manifest\n- npm run test:ci (8746 passed, 172 skipped)\n

Summary by CodeRabbit

  • Tests

    • Added validation tests covering ecosystem artifacts and strict enforcement of allowed agent/command/skill entries.
    • Added integration/unit tests that surface orphaned or disallowed artifacts and a readiness-polling helper to improve async test reliability.
  • Chores

    • Removed numerous agent, skill, and agent-memory documents.
    • Strengthened validation to enforce allowlists and report counts for agent/command/skill/memory categories.
    • Updated install manifest integrity metadata and lint ignores.

Review Change Stack

rafaelscosta and others added 8 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>
# Conflicts:
#	.aiox-core/install-manifest.yaml
@vercel

vercel Bot commented May 21, 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 May 21, 2026 1:49pm

Request Review

@github-actions github-actions Bot added area: agents Agent system related type: test Test coverage and quality area: docs Documentation (docs/) labels May 21, 2026
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4052e8d1-ded6-480a-8ba5-59c4b96045b9

📥 Commits

Reviewing files that changed from the base of the PR and between 8df44e1 and 0bcf2d0.

📒 Files selected for processing (3)
  • .aiox-core/infrastructure/scripts/validate-claude-integration.js
  • .aiox-core/install-manifest.yaml
  • tests/core/events/dashboard-emitter-bob.test.js
💤 Files with no reviewable changes (1)
  • .aiox-core/infrastructure/scripts/validate-claude-integration.js
✅ Files skipped from review due to trivial changes (1)
  • .aiox-core/install-manifest.yaml

Walkthrough

Adds allowlists and a directory-listing helper, extends validateClaudeIntegration to check .claude/agents, .claude/commands, .claude/skills, and .claude/agent-memory against allowlists, records disallowed entries as errors, expands returned metrics and exports, updates tests, and refreshes manifest/infra entries.

Changes

Claude Integration Allowlist Enforcement and Cleanup

Layer / File(s) Summary
Allowlist constants and validation infrastructure
.aiox-core/infrastructure/scripts/validate-claude-integration.js
Three Set constants define allowed native subagents, command entries, and skill entries. New listTopLevelNames() helper enumerates artifact directories. validateClaudeIntegration() now scans .claude/agents, .claude/commands, .claude/skills, and .claude/agent-memory against allowlists, collecting disallowed entries as errors and extending returned metrics with claudeNativeAgents, claudeCommandNamespaces, claudeSkillArtifacts, and claudeAgentMemoryNamespaces counts.
Validation enforcement tests
tests/claude/subagent-governance.test.js, tests/unit/validate-claude-integration.test.js, tests/integration/codex-skills-sync.test.js
New expectedCoreNativeSubagents constant establishes the approved subagent roster. Jest tests verify validation fails for disallowed native subagents, command namespaces, skill artifacts, and agent-memory namespaces. Integration test asserts validateCodexSkills rejects orphaned locally-generated skills in strict mode.
Infrastructure and configuration updates
.aiox-core/install-manifest.yaml, .claude/commands/AIOX/scripts/agent-config-loader.js, eslint.config.js
ESLint flat config excludes VCS directories (.git/**, .hg/**, .svn/**). Manifest timestamp and script hash are refreshed. CLI preload command's default agent ID list is updated.
Removal of non-approved Claude artifacts
.claude/commands/design-system/agents/nano-banana-generator.md
Removed a non-approved agent file; many other agent/skill/command/memory files in the raw summary were deleted as part of cleanup enforced by the allowlist validations.
Test helper: waitForPath
tests/core/events/dashboard-emitter-bob.test.js
Adds waitForPath(filePath, timeoutMs) polling helper and replaces a fixed delay in the fallback-file test with a readiness poll.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • SynkraAI/aiox-core#641: Earlier PR that tightened .aiox-core/infrastructure/scripts/validate-claude-integration.js allowlist-based validation for Claude namespaces and artifacts.

Suggested labels

area: workflows, squad, mcp, area: core, area: installer, area: synapse, area: cli, area: pro, area: health-check, area: devops

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Merge pro UX error bridge cleanup into main' is directly related to the PR's main objective: merging the pro UX error bridge feature and removing leaked Pro IDE artifacts from the core Claude/Codex surfaces.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devops/merge-pro-ux-error-bridge-main

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.

coderabbitai[bot]
coderabbitai Bot previously requested changes May 21, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.aiox-core/infrastructure/scripts/validate-claude-integration.js:
- Around line 7-21: The ALLOWED_NATIVE_SUBAGENTS Set currently includes non-core
entries that relax the governance baseline; update the ALLOWED_NATIVE_SUBAGENTS
constant to only contain the 10 approved core native subagents by removing
"aiox-master", "aiox-squad-creator", and "aiox-ux-design-expert" so the set
exactly matches the strict governance whitelist used by the tests (leave the
other listed entries unchanged), then run the validation/tests to confirm the
allowlist and tests align.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1743a79d-4aef-4a32-a212-569203af2a6f

📥 Commits

Reviewing files that changed from the base of the PR and between d23248f and 8df44e1.

📒 Files selected for processing (42)
  • .aiox-core/infrastructure/scripts/validate-claude-integration.js
  • .aiox-core/install-manifest.yaml
  • .claude/agent-memory/oalanicolas/MEMORY.md
  • .claude/agent-memory/pedro-valerio/MEMORY.md
  • .claude/agent-memory/sop-extractor/MEMORY.md
  • .claude/agent-memory/squad/MEMORY.md
  • .claude/agents/brad-frost.md
  • .claude/agents/copy-chief.md
  • .claude/agents/cyber-chief.md
  • .claude/agents/dan-mall.md
  • .claude/agents/data-chief.md
  • .claude/agents/dave-malouf.md
  • .claude/agents/db-sage.md
  • .claude/agents/design-chief.md
  • .claude/agents/design-system.md
  • .claude/agents/legal-chief.md
  • .claude/agents/nano-banana-generator.md
  • .claude/agents/oalanicolas.md
  • .claude/agents/pedro-valerio.md
  • .claude/agents/sop-extractor.md
  • .claude/agents/squad-chief.md
  • .claude/agents/squad.md
  • .claude/agents/story-chief.md
  • .claude/agents/tools-orchestrator.md
  • .claude/agents/traffic-masters-chief.md
  • .claude/commands/AIOX/scripts/agent-config-loader.js
  • .claude/commands/cohort-squad/agents/cohort-manager.md
  • .claude/commands/design-system/agents/brad-frost.md
  • .claude/commands/design-system/agents/dan-mall.md
  • .claude/commands/design-system/agents/dave-malouf.md
  • .claude/commands/design-system/agents/design-chief.md
  • .claude/commands/design-system/agents/nano-banana-generator.md
  • .claude/skills/clone-mind.md
  • .claude/skills/course-generation-workflow.md
  • .claude/skills/enhance-workflow.md
  • .claude/skills/ralph.md
  • .claude/skills/squad.md
  • .codex/skills/aiox-claude-mastery-chief/SKILL.md
  • eslint.config.js
  • tests/claude/subagent-governance.test.js
  • tests/integration/codex-skills-sync.test.js
  • tests/unit/validate-claude-integration.test.js
💤 Files with no reviewable changes (35)
  • .claude/agent-memory/sop-extractor/MEMORY.md
  • .claude/agent-memory/squad/MEMORY.md
  • .claude/commands/design-system/agents/dan-mall.md
  • .claude/agents/dan-mall.md
  • .claude/agents/legal-chief.md
  • .claude/agents/pedro-valerio.md
  • .claude/skills/ralph.md
  • .claude/agents/traffic-masters-chief.md
  • .claude/commands/design-system/agents/brad-frost.md
  • .claude/skills/course-generation-workflow.md
  • .claude/agent-memory/oalanicolas/MEMORY.md
  • .claude/agents/oalanicolas.md
  • .codex/skills/aiox-claude-mastery-chief/SKILL.md
  • .claude/agents/design-chief.md
  • .claude/agents/design-system.md
  • .claude/agents/cyber-chief.md
  • .claude/commands/design-system/agents/dave-malouf.md
  • .claude/agents/sop-extractor.md
  • .claude/commands/cohort-squad/agents/cohort-manager.md
  • .claude/agent-memory/pedro-valerio/MEMORY.md
  • .claude/agents/nano-banana-generator.md
  • .claude/commands/design-system/agents/design-chief.md
  • .claude/agents/story-chief.md
  • .claude/agents/brad-frost.md
  • .claude/agents/db-sage.md
  • .claude/agents/squad-chief.md
  • .claude/agents/squad.md
  • .claude/skills/squad.md
  • .claude/agents/tools-orchestrator.md
  • .claude/agents/dave-malouf.md
  • .claude/skills/enhance-workflow.md
  • .claude/agents/copy-chief.md
  • .claude/commands/design-system/agents/nano-banana-generator.md
  • .claude/skills/clone-mind.md
  • .claude/agents/data-chief.md

Comment thread .aiox-core/infrastructure/scripts/validate-claude-integration.js
@rafaelscosta rafaelscosta dismissed coderabbitai[bot]’s stale review May 21, 2026 13:54

Dismiss stale CodeRabbit change request: addressed in 0bcf2d0 and CodeRabbit approved latest head.

@rafaelscosta

Copy link
Copy Markdown
Collaborator Author

DevOps update: cleanup PR is ready from my side. CI is green across the matrix, CodeRabbit approved the latest head, and the stale CodeRabbit change request was dismissed after the requested fix landed in 0bcf2d0. Squash merge is currently blocked only by CODEOWNERS review: waiting on Pedrovaleriolopez and/or oalanicolas.

@rafaelscosta rafaelscosta merged commit 71b14b6 into main May 21, 2026
41 checks passed
@rafaelscosta rafaelscosta deleted the devops/merge-pro-ux-error-bridge-main branch May 21, 2026 14:29
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
* 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 SynkraAI#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>

* fix: remove leaked pro IDE artifacts

* test: stabilize dashboard fallback test

* fix: tighten claude native agent allowlist

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent system related area: docs Documentation (docs/) type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant