Skip to content

refactor(validate): switch from YAML to registry-based validation#943

Merged
jackwener merged 3 commits intomainfrom
fix/validate-js-first
Apr 10, 2026
Merged

refactor(validate): switch from YAML to registry-based validation#943
jackwener merged 3 commits intomainfrom
fix/validate-js-first

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • Rewrites opencli validate and opencli verify to use the in-memory registry instead of scanning YAML files
  • YAML adapter format is no longer supported — the old validator was effectively dead code
  • Adds new validation checks: missing description, browser commands without domain, commands without func/pipeline, duplicate arg names, positional arg ordering, pipeline step name typos

Context

Part of the JS-first alignment work identified in #942 review. The validate/verify commands were still scanning for .yaml/.yml files while all adapters have migrated to JavaScript.

Test plan

  • npx tsc --noEmit passes
  • npm test — 594 tests pass
  • opencli validate runs against registry and reports PASS
  • opencli validate hackernews filters by site
  • opencli validate hackernews/top filters by command

…ation

The validate/verify commands only scanned YAML files, which are no
longer supported. Rewrite to validate commands from the in-memory
registry populated by discoverClis(), aligning with the JS-first
adapter architecture.

New checks: missing description, browser commands without domain,
pipeline step name typos, commands without func/pipeline, duplicate
arg names, and positional arg ordering.
Manifest-registered commands have _lazy=true and no func/pipeline
until execution time. Recognize this as a valid execution form.
- Emit warning when registry is empty instead of silent PASS
- Resolve alias targets to canonical key before filtering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant