Skip to content

feat(report): non-zero exit on validation failure + document the report#75

Merged
dadachi merged 1 commit into
mainfrom
feat/report-ci-exit-and-docs
May 22, 2026
Merged

feat(report): non-zero exit on validation failure + document the report#75
dadachi merged 1 commit into
mainfrom
feat/report-ci-exit-and-docs

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented May 22, 2026

What

Finishes the validation-report story (follows #74) by making the report usable in CI and discoverable.

CI exit code

The CLI now exits non-zero when validation fails (overallPass === false), so CI steps and shell && chains catch a failed run:

npx nativeapptemplate-agent "a walk-in clinic queue" && echo "validation passed"

New --exit-zero flag opts out (e.g. when you only want the report regardless of pass/fail). parseArgs is now exported and unit-tested.

Docs

New Validation report section in the README documenting:

  • validation-report.html (self-contained) + report.json (machine-readable)
  • the out/<slug>/ layout (updated the tree example)
  • the CI exit-code behavior
  • all report flags: --no-report, --report-format, --report-embed, --report-open, --exit-zero

Tests

parseArgs flag parsing — including --exit-zero, invalid --report-format ignored, and bare-spec defaults. npm run ci green — 49/49 pass.

🤖 Generated with Claude Code

Finishes the validation-report story (follows #74).

- index: the CLI now exits non-zero when overallPass is false, so CI
  steps and shell `&&` chains catch a failed run. New --exit-zero flag
  opts out (e.g. when you only want the report). parseArgs is exported
  and unit-tested.
- README: new "Validation report" section documenting validation-report.html
  + report.json, the out/<slug>/ layout, the CI exit-code behavior, and
  the --no-report / --report-format / --report-embed / --report-open /
  --exit-zero flags.

Tests: parseArgs flag parsing (incl. --exit-zero, invalid format
ignored, defaults). 49/49 pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit ccac942 into main May 22, 2026
1 check passed
@dadachi dadachi deleted the feat/report-ci-exit-and-docs branch May 22, 2026 09:38
dadachi added a commit that referenced this pull request May 22, 2026
…kflow (#76)

Adds section 10 to docs/validation-report.md covering how to render and
visually verify validation-report.html:

- Path A — Playwright MCP (interactive, inside Claude Code): local-scope
  `claude mcp add playwright`, restart to load tools, then browser_navigate
  (file:// URL) + browser_take_screenshot. Note it's a maintainer
  convenience, not part of the pipeline (device shots use mobile-mcp).
- Path B — Playwright CLI (headless, no MCP, CI-friendly):
  `npx -y playwright@latest screenshot --full-page file://… report.png`,
  no project dependency added.

Also marks section 9 as shipped (#73/#74/#75).

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant