Skip to content

Fix concore validate exit code and add missing source file checks#304

Merged
pradeeban merged 2 commits intoControlCore-Project:devfrom
Titas-Ghosh:fix-validate-exit-code
Feb 14, 2026
Merged

Fix concore validate exit code and add missing source file checks#304
pradeeban merged 2 commits intoControlCore-Project:devfrom
Titas-Ghosh:fix-validate-exit-code

Conversation

@Titas-Ghosh
Copy link
Copy Markdown
Contributor

Hi @pradeeban , This PR fixes issue #303

Summary

  • concore validate now exits non‑zero when errors are found.
  • Validates node source file existence relative to the workflow (default src/).
  • Adds a regression test for missing node source files.
  • Documents the --source option for validate.

Problem
concore validate prints errors but still exits with code 0, which makes it ineffective in CI/pre‑commit usage. The README also states file references are validated, but validate didn’t actually check whether node source files exist.

Solution

  • validate_workflow now returns success/failure and the CLI exits with code 1 on errors.
  • Missing node source files are flagged as errors (checked relative to workflow + source dir).
  • Added --source to concore validate to align with run and inspect.

Tests

python -m pytest -v tests/test_cli.py
Screenshot 2026-02-14 032651

Checklist

  • Tested locally (python -m pytest -v tests/test_cli.py)
  • No breaking changes to existing CLI usage
  • Docs updated

Note to Maintainers
Thanks for reviewing! I aimed to align concore validate with the documented behavior and make it reliable for CI by returning a proper exit code and checking missing node source files. If you want the validation scope or error/warning thresholds adjusted, I’m happy to iterate quickly.

@pradeeban pradeeban merged commit 54ba773 into ControlCore-Project:dev Feb 14, 2026
6 checks passed
@Titas-Ghosh Titas-Ghosh deleted the fix-validate-exit-code branch February 18, 2026 19:56
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.

2 participants