Handle claude-swap relogin status - #2446
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 11:56 AM ET / 15:56 UTC. ClawSweeper reviewWhat this changesThe PR maps Claude Swap’s Merge readiness⛔ Blocked until real behavior proof is added - 3 items remain This PR is a focused candidate fix for the reported Claude Swap status-mapping bug and has no discrete correctness finding from the supplied diff. It should remain open because the contributor has not yet provided inspectable after-fix evidence from a real Priority: P2 Review scores
Verification
How this fits togetherCodexBar reads Claude Swap’s JSON account list, maps provider status strings into typed account state, and projects that state into account cards and CLI output. The projected state supplies recovery guidance and controls whether an account can be activated. flowchart LR
A[Claude Swap JSON account list] --> B[Status parser]
B --> C[Typed usage status]
C --> D[Account projection]
D --> E[Account card and CLI output]
D --> F[Activation eligibility]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Obtain a redacted after-fix terminal capture or visible CodexBar CLI/account-state result from a real Claude Swap account reporting Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was provided for this review. The JSON-to-projection path is clear from the supplied diff and issue context, but the contributor confirms no real Claude Swap account or provider probe was run. Is this the best way to solve the issue? Yes, the proposed typed status mapping and existing projection seam are the narrow maintainable solution for a newly recognized provider status. The remaining question is validation of the exact real-provider recovery behavior, not a different implementation direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c52b0efa13b0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The failed macOS shard is outside this patch. It reports 10 missing-
The branch diff remains limited to the five Claude Swap parser/projection/test files. The focused Claude Swap tests, GitHub rejected a failed-job rerun because the fork account does not have repository admin rights. Could a maintainer rerun the failed jobs? The separate ClawSweeper request for redacted proof from a real |
|
Refreshed this branch onto current Verification on the refreshed tree:
Hosted checks are now running on the new head. The separate request for redacted real |
0813d36 to
24815a3
Compare
Fixes #2444.
Problem
cswap 0.23.0 can report
"usageStatus": "relogin_required"for an inactive account. CodexBar currently treats that value as unknown, so the account card shows the raw status instead of recovery guidance.Change
relogin_requiredto a dedicated Claude swap usage status.This does not change credential reading or account switching behavior.
Verification
swift test --filter ClaudeSwapListParserTests: the new regression failed before the implementation, then all 13 tests passed.swift test --no-parallel --filter ClaudeSwap: 69 tests passed.make check: passed (SwiftFormat: 0/1582 files; SwiftLint: 0 violations in 1581 files).git diff --check: passed.make test: stopped after its automatic retry because two unchangedAdaptiveRefreshTimerTeststimed out withCancellationError()at 30 seconds:menu open advances a long idle timer during refresh without postponing an earlier tickcoding activity advances a long idle timer without postponing an earlier tickBoth timer failures reproduce when that untouched suite runs alone.
Compatibility risk is low: this only changes handling for the newly recognized status string. Unknown future values still use the existing fallback.
Review focus: whether the recovery text and non-activatable state match the expected cswap behavior.