Skip to content

Start 2FA bot after gateway recovery restarts#45

Merged
Pigbibi merged 1 commit into
mainfrom
codex/start-2fa-bot-after-recovery-restart
May 10, 2026
Merged

Start 2FA bot after gateway recovery restarts#45
Pigbibi merged 1 commit into
mainfrom
codex/start-2fa-bot-after-recovery-restart

Conversation

@Pigbibi
Copy link
Copy Markdown
Collaborator

@Pigbibi Pigbibi commented May 10, 2026

Summary

  • start the 2FA bot immediately after recovery compose up/restart/recreate operations
  • avoid waiting for the once-per-minute systemd timer while a live 2FA prompt is already active

Verification

  • bash tests/test_gateway_recovery_scripts.sh

@Pigbibi Pigbibi merged commit 65ce7c1 into main May 10, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/start-2fa-bot-after-recovery-restart branch May 10, 2026 19:26
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.

Reviewed commit: 4c33226b8b

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


echo "Ensuring ${container_name} is running before readiness check."
docker compose up -d --no-build
ensure_2fa_bot_running
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 Do not abort readiness recovery on 2FA bot startup errors

Because this script runs with set -e, calling ensure_2fa_bot_running as a required step makes the whole recovery fail whenever ensure_2fa_bot_running.sh returns non-zero (for example, if 2fa_bot.py exits immediately due to invalid/missing TOTP_SECRET while IBKR_2FA_AUTOFILL is enabled). In that case the script exits before wait_for_ready, so the health check can report failure even when the gateway API is already healthy or would recover without the bot (e.g., existing authenticated session / non-2FA path).

Useful? React with 👍 / 👎.

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.

1 participant