Repository navigation
fix: wait for backend readiness during startup - #36
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab54900de5
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Startup previously treated the first CLI response as sufficient readiness and could return unavailable during a transient NoState. This change retries backend readiness within a single monotonic 30-second phase and bounds every query by the remaining time and three seconds.
Closes #25.
Validation: nine new isolated readiness tests plus eight existing authentication tests passed on Python3.13; Bash syntax and ShellCheck passed. Tests cover delayed transitions, remaining-budget query timeout, authentication/approval, malformed replies, redaction and retained identity/missing-state refusal. Full Linux CI passed on Python3.11/3.13; the nine new readiness checks also passed on actual Python3.8. No live deployment or watchdog change.
Readiness expiry keeps exit11 once a valid transient backend state has been observed; exit12 means no valid state was obtained, avoiding boundary-dependent reclassification from a final short query timeout.
Automatic-review follow-up (
6e0a0dd): wait for a valid local API response before explicit login/auth without requiring Running; inspect backend after failed/timed-out up; skip repeated login/key input for pending approval. Thirteen auth checks and nine readiness checks passed locally; full Linux CI passed 171 tests on each of Python 3.11/3.13. Failed up with a Running backend retains its failure status.