Add bytecode compilation to health check script#162
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def test_health_check_degrades_gracefully_when_django_missing(): | ||
| result = _run_script(HEALTH_CHECK) | ||
|
|
||
| assert result.returncode in (0, 2), "Health check should pass or skip when Django is unavailable" | ||
| combined_output = f"{result.stdout}\n{result.stderr}" | ||
| assert "Skipping Django checks" in combined_output | ||
|
|
There was a problem hiding this comment.
Make CI shell tests agnostic to installed CLIs
The new regression tests under scripts/tests/test_ci_shell_scripts.py hard‑code the assumption that Django/Bandit/npm are absent in the developer’s machine. For example, test_health_check_degrades_gracefully_when_django_missing (lines 35‑41) asserts that the health check always prints "Skipping Django checks", test_bandit_scan_skips_quickly_when_cli_missing (57‑63) asserts exit code 2 plus "Bandit CLI not detected", test_npm_audit_detects_ui_workspace_and_skips_without_npm (65‑83) asserts npm is missing, and test_test_execution_time_skips_without_django (86‑91) expects a skip as well. In a normal workflow we actually install Django, Bandit, npm, etc. to run these scripts; once those tools are present the scripts correctly return success, but every one of these tests now fails because the asserted skip messages never appear. This makes pytest scripts/tests/test_ci_shell_scripts.py impossible to run after setting up the documented dependencies, defeating the purpose of the regression suite. Please relax the assertions so the tests accept both outcomes (skip when the CLI is missing, pass when it is installed) instead of requiring the environment to be broken.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task