Skip to content

feat(cli): validate-integration command#3266

Merged
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/validate-integration
Jun 30, 2026
Merged

feat(cli): validate-integration command#3266
ejhammond merged 1 commit into
xds-unprefix-integrationfrom
astryx/validate-integration

Conversation

@ejhammond

Copy link
Copy Markdown
Contributor

Adds astryx validate-integration — validate ONE Astryx integration package at a time and report findings using the AstryxIntegrationIssue model ({ code, severity, message }).

Usage

  • astryx validate-integration — validate the local package at the current root (nearest package.json + a single sibling astryx.integration.{ts,mjs,js}).
  • astryx validate-integration <pkg> — validate an installed package resolved from ./node_modules.
  • --json emits a typed integration.validate envelope.

Checks (stable issue codes)

  • missing_manifest / multiple_manifests — manifest presence (no-arg + no local manifest prints guidance and exits 0).
  • invalid_manifest — schema validation (unknown keys, bad issuesUrl, wrong types).
  • missing_root — a declared components/templates/codemods root that doesn't exist on disk.
  • invalid_codemod / invalid_template / invalid_component — broken contributions, surfaced via the existing discovery helpers.

Exit code is the contract: 0 when there are no error-severity issues (warnings allowed), 1 otherwise — usable as a CI gate.

Notes

  • Reuses the landed integration schema, resolution, and codemod/template/component discovery; a small per-integration template-discovery helper is extracted from the existing config-driven path (behavior unchanged).
  • Tests are hermetic (temp packages under node_modules); cover valid integrations, unknown manifest key, missing root, multiple manifests, broken codemod/template/component, installed-package resolution, and the --json envelope shape.

Targets xds-unprefix-integration; rebased on the merged component-ownership work so component validation is wired up.

Add 'astryx validate-integration' to validate one integration package at a
time — its conventional manifest, declared contribution roots, and the
codemod/template/component contributions — reporting findings with the
AstryxIntegrationIssue model (code, severity, message).

With no argument it validates the local package (nearest package.json +
sibling manifest); with a package name it validates an installed package
from node_modules. Supports --json via the integration.validate envelope
and exits 1 when any error-severity issue is present.
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview, Comment Jun 30, 2026 2:50am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Jun 30, 2026
@ejhammond ejhammond merged commit 9649f12 into xds-unprefix-integration Jun 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

1 participant