fix: bound gateway recovery epochs - #103
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: 1 serious issue(s) found in high-risk files ⚖️ Codex Review Arbitration🚫 block: 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Logic in
|
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5afce3beb
ℹ️ 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".
| from datetime import datetime, timezone | ||
| lower = datetime.fromisoformat(sys.argv[1].replace("Z", "+00:00")) | ||
| terminal = re.compile(r"IBC closing because login has not completed|(?:authentication|login).*(?:timeout|timed out|failed)", re.I) | ||
| progress = re.compile(r"IBC: (Starting Gateway|Login attempt|Second Factor Authentication|Login has completed|Configuration tasks completed)|Authentication window found|Auto-fill submitted|Passed token authentication|Authentication completed|Security code:", re.I) |
There was a problem hiding this comment.
Preserve IBC config-flow progress markers
When a first-run Gateway is still moving through IBC configuration, the launcher can emit progress such as IBC: Getting config dialog, IBC: Getting main window, or IBC: Found Gateway main window; the previous recovery guard treated those as reasons to extend instead of restarting. This new snapshot regex no longer matches any of those config/main-window markers, so after the readiness timeout snapshot_decision returns none and the script can restart/recreate the container while IBC is actively completing the setup flow the guard is meant to protect.
Useful? React with 👍 / 👎.
| if stage == "initial": | ||
| lower = max(start, datetime.now(timezone.utc) - timedelta(seconds=int(window))) | ||
| else: | ||
| lower = start |
There was a problem hiding this comment.
Require recent progress when extending retries
For restart and recreate stages this lower bound is always the container's StartedAt, so each later extension re-scans the entire epoch. A normal early line like IBC: Starting Gateway can keep snapshot_decision returning progress for every configured extension even when no progress occurred during the last wait, delaying recreate/failure by the full extension budget for a stuck gateway; the reassessment should use a recent window bounded by StartedAt, not the full epoch.
Useful? React with 👍 / 👎.
|
Closed under absolute-final permanent freeze. Preserved review evidence: accepted IBC config/main-window progress markers were dropped, risking recovery flapping. No further closure, merge, rerun, or live action. |
Fresh production-offline reslice from e001c6d.
No deploy, restart, trigger, scheduler, trading, account, secret, or live operation was performed.
Validation: all shell tests individually printed and passed; py_compile; compileall; bash -n; actionlint; focused shellcheck; diff-check.
Review policy: one closure maximum; do not merge or rerun.