Skip to content

feat: retry Schwab refresh with proxy after auth rejection#14

Open
Pigbibi wants to merge 2 commits into
mainfrom
fix/schwab-direct-proxy-toggle
Open

feat: retry Schwab refresh with proxy after auth rejection#14
Pigbibi wants to merge 2 commits into
mainfrom
fix/schwab-direct-proxy-toggle

Conversation

@Pigbibi
Copy link
Copy Markdown
Collaborator

@Pigbibi Pigbibi commented May 13, 2026

Default the refresh workflow to try direct Schwab login first, then retry with the configured proxy when Schwab rejects the login page as an auth/risk failure or when the direct path hits a retryable network error.\n\nAlso adds a small retry classification helper and tests, and keeps manual workflow dispatch able to force proxy-first when needed.

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: db60422b17

ℹ️ 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 main.js
];
}

async function runRefreshOnce({ modeLabel, proxyUrl }) {
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 Pass attempt label into runRefreshOnce

buildAttemptPlan() creates attempts with a label field, but runRefreshOnce destructures { modeLabel, proxyUrl }, so modeLabel is always undefined. That means both direct and proxy attempts reuse the same persistent profile directory (schwab-local-session-undefined) instead of isolated per-mode sessions, which can carry over cookies/state from the failed direct attempt and make the proxy retry unreliable; it also obscures logs for diagnosing which mode ran.

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