Refresh expired StepFun tokens#1162
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 26, 2026, 5:35 AM ET / 09:35 UTC. Summary Reproducibility: no. high-confidence live reproduction is included. Source inspection shows current main does not refresh manual StepFun Oasis-Token auth failures, while the PR adds stubbed coverage for that path. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the refresh path after redacted live StepFun proof shows expired-token refresh, one retry succeeds, and app/CLI token persistence works, with make check and relevant tests passing or clearly explained. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is included. Source inspection shows current main does not refresh manual StepFun Oasis-Token auth failures, while the PR adds stubbed coverage for that path. Is this the best way to solve the issue? Unclear until live proof is added. The implementation direction matches the existing token-account updater model, but the live StepFun refresh endpoint and persistence behavior need redacted real-run evidence before it is clearly the best fix. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against bba645336d3c. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 320e136778
ℹ️ 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".
| context: ProviderFetchContext, | ||
| originalError: Error) async throws -> ProviderFetchResult | ||
| { | ||
| let resolved = try await Self.resolveToken(context: context, allowCached: true) |
There was a problem hiding this comment.
Re-resolve auth without cached token after auth failure
After an authentication failure, this path calls resolveToken(..., allowCached: true) again, which reselects the cached token before trying STEPFUN_TOKEN (cache is checked earlier in resolveToken). In the common case where the cache is stale but STEPFUN_TOKEN is valid and no username/password is configured, recovery never attempts the valid env token and incorrectly fails with an auth error. Re-resolve with allowCached: false (or clear cache first) before fallback so non-cached credentials can be used.
Useful? React with 👍 / 👎.
Summary
Testing