Skip to content

fix: propagate validation and generation failures - #79

Open
ryanduguid wants to merge 2 commits into
ConsumerDataStandardsAustralia:mainfrom
ryanduguid:fix/validation-exit-status
Open

ryanduguid wants to merge 2 commits into
ConsumerDataStandardsAustralia:mainfrom
ryanduguid:fix/validation-exit-status

Conversation

@ryanduguid

@ryanduguid ryanduguid commented Sep 21, 2026 •

Copy link
Copy Markdown

Valid documents currently make the validation CLI exit 1, while JSON and schema failures exit 0. The root validation and generation scripts also lose a first worker's failure because they run it in the background.

Return 0 for successful validation and 1 for failure. Run the paired workers sequentially with && so either failure propagates. Remove the build step that copies a nonexistent, unused config.json, and add regression checks using the real compiler, schema engine and generators with fabricated files.

Verification at 62b51a0 on Windows with Node 24.19.0 and Git Bash:

  • npm ci --ignore-scripts --no-audit --no-fund and npm test in cli pass. All 16 regression checks pass, covering both validation modes, malformed and missing files, invalid schemas and each aggregate worker's failure.
  • The tests build the CLI and run both real generators against isolated fabricated fixtures.
  • npm run lint cannot run: the unchanged script invokes TSLint, which is not a declared dependency. This PR does not add a linter or lint policy.
  • git diff --check passes.

The runtime dependencies and schema definitions are unchanged. No package was published. Linux, older Node versions and hosted CI have not been verified in this review. The schema-output fix remains in #78.

Drop the TSLint dependency and configuration so this change covers only
the validation and generation exit codes.

This branch has not been deployed

No deployments
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