Skip to content

Restore strict shell flags without losing CI summary#159

Merged
NestorMonroy merged 2 commits intodevelopfrom
feature/investigate-failing-github-actions-09-06-25
Nov 13, 2025
Merged

Restore strict shell flags without losing CI summary#159
NestorMonroy merged 2 commits intodevelopfrom
feature/investigate-failing-github-actions-09-06-25

Conversation

@2-Coatl
Copy link
Copy Markdown
Collaborator

@2-Coatl 2-Coatl commented Nov 13, 2025

Summary

  • reinstate set -euo pipefail in run-all-checks.sh and wrap each suite execution so failures surface in the final report without aborting the pipeline
  • add a lightweight invoke_check helper to keep fail-fast semantics while allowing aggregated reporting under strict mode
  • add a regression test that asserts the master CI orchestrator keeps the strict shell flags mandated by the scripting constitution

Testing

  • pytest scripts/tests/test_ci_shell_scripts.py

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread scripts/tests/test_ci_shell_scripts.py Outdated
Comment on lines +19 to +24
def test_run_all_checks_reports_summary_even_on_failure():
result = _run_script(RUN_ALL_CHECKS)

assert result.returncode != 0, "Expected the aggregated checks to fail in the default dev environment"
combined_output = f"{result.stdout}\\n{result.stderr}"
assert "FINAL CI/CD REPORT" in combined_output
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove assumption that run-all-checks fails

The new test test_run_all_checks_reports_summary_even_on_failure now hard-codes assert result.returncode != 0 when invoking scripts/ci/run-all-checks.sh. That means the Python test suite will always fail in any environment where the CI suite actually passes (which is the desired steady state once dependencies are installed). Nothing in the test enforces or simulates failure—it simply assumes the host lacks prerequisites. As soon as someone runs the suite in a configured environment (or once CI is fixed), the entire test module will fail even though the code under test works, blocking merges.

Useful? React with 👍 / 👎.

Comment thread scripts/tests/test_ci_shell_scripts.py Outdated
Comment on lines +27 to +32
def test_health_check_surfaces_underlying_error_details():
result = _run_script(HEALTH_CHECK)

assert result.returncode != 0, "The health check should fail when dependencies are missing"
combined_output = f"{result.stdout}\\n{result.stderr}"
assert "ModuleNotFoundError" in combined_output or "No module named" in combined_output
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Health check test expects failure-specific output

test_health_check_surfaces_underlying_error_details likewise asserts that running scripts/ci/infrastructure/health-check.sh must exit non‑zero and emit ModuleNotFoundError/No module named. This bakes in a very specific failure mode (missing Python deps) and causes the test suite to fail whenever the health check actually succeeds or fails for a different reason (e.g., DB connectivity). Once the environment is healthy, this test will fail 100% of the time even though the code is correct, so the suite cannot pass.

Useful? React with 👍 / 👎.

@NestorMonroy NestorMonroy merged commit 2ee6277 into develop Nov 13, 2025
2 of 36 checks passed
@NestorMonroy NestorMonroy deleted the feature/investigate-failing-github-actions-09-06-25 branch November 13, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants