Skip to content

fix: wait for backend readiness during startup - #36

Merged
abruption merged 5 commits into
mainfrom
fix/startup-readiness-25
Oct 19, 2026
Merged

abruption merged 5 commits into
mainfrom
fix/startup-readiness-25

Conversation

@abruption

@abruption abruption commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

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.

  • Retry NoState/Starting and transient query errors; do not require an early Self.ID.
  • Distinguish final outcomes: ready0, login10, readiness deadline11, no-valid-query12, machine approval13. Existing authenticated-state-loss protection and explicit-only login/auth remain.
  • Skip the old 20-second status probe for an already identified daemon; cap new-launch probes at three seconds. Component initialization and explicit authentication retain separate bounds.
  • Update English/Korean exit-code and timeout guidance.

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.

@abruption abruption added this to the v0.3.1 milestone Oct 19, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T05:36:22.919600Z 6e0a0dd Manual request
🔒 Security Review ✅ Completed 2026-10-19T05:07:42.155732Z ab54900 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption abruption mentioned this pull request Oct 19, 2026
6 tasks done

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

Copy link
Copy Markdown

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.

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

Comment thread tailscale-setup.sh
Comment thread tailscale-setup.sh
@abruption

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 6e0a0dd7aa

ℹ️ 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".

@abruption
abruption merged commit ab88063 into main Oct 19, 2026
7 checks passed
@abruption
abruption deleted the fix/startup-readiness-25 branch October 19, 2026 08:18
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.

fix: wait for backend readiness during startup

1 participant