Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
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, or 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 fix this CI failure" or "@codex address that feedback".
| - name: API health (offline) | ||
| run: | | ||
| DEV_NO_API=1 node backend/index.cjs & | ||
| echo $! > api.pid | ||
| sleep 1 | ||
| curl -fsS http://127.0.0.1:8790/health | tee health.json | ||
| DEV_NO_API=1 node backend/index.cjs & echo $! > api.pid | ||
| for i in {1..20}; do | ||
| if curl -fsS http://127.0.0.1:8790/health >/dev/null; then | ||
| curl -fsS http://127.0.0.1:8790/health | tee health.json; break | ||
| fi | ||
| sleep 0.3 | ||
| done |
There was a problem hiding this comment.
[P1] Fail health step when /health never responds
The new wait loop swallows all curl failures and never asserts that the API became healthy. With set -e the curl inside the if is allowed to fail without aborting the step, and after the loop there is no check of whether a successful request occurred. If the server process starts but never serves /health (e.g., it hangs during boot or the endpoint regresses), this step will exit 0 and the CI job will succeed without ever verifying the API. The previous single curl would fail in that situation. Consider tracking success in the loop and exit 1 after the loop if no healthy response was observed.
Useful? React with 👍 / 👎.
Removes job-level if filters (always create check contexts) and adds a robust /health wait loop.
This should resolve 0s failures and ensure required checks report correctly.