Skip to content

Fix forced renewal cache acknowledgement and account validation order - #465

Merged
Pigbibi merged 1 commit into
mainfrom
codex/forced-renewal-cache-ack-20261030
Oct 30, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
codex/forced-renewal-cache-ack-20261030

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Manual session renewal previously saved a fresh session before selecting the requested account. Shared-cache write failures were swallowed by the ordinary best-effort cache helper, so the endpoint could report session_renewed=true without a usable shared cache.

Changes

  • Only the forced renewal path defers cache persistence until account selection and the balance read return.
  • Preserve the existing account contract: explicit accounts must match exactly; otherwise only a sole returned account can be selected.
  • Require non-empty string access-token, ftat and sid values, matching the cached-only consumer. Require the shared store to acknowledge the write with True; missing cache configuration, rejected writes and storage exceptions become a fixed sanitized failure.
  • Keep ordinary connect/cache behavior unchanged. Keep the existing empty-balance behavior visible as balances_read=false; renewal success does not assert valid balance contents or a subsequent snapshot.
  • Add regression cases and document the acknowledgement/unknown-write boundary. There are no automatic retries or live trading calls.

Validation

Independent Terra review found the missing access-token check in the first candidate; it is corrected and reviewed. Nine local synthetic checks and Python compilation passed. The final four-file change is verified against the exact main blobs at 91464cc. The committed pytest cases are collected by the existing full CI; full pytest, Ruff, locked dependency checks and package build passed in CI 41024408423; Documentation check 41024408144 passed.

No real login, MFA, cache write, Scheduler operation, deployment, or broker order was performed. This fixes a confirmed acknowledgement defect; it does not establish the cause of the current HTTP 503 or claim production recovery.

@Pigbibi
Pigbibi marked this pull request as ready for review October 30, 2026 08:10
@Pigbibi
Pigbibi merged commit 244b13b into main Oct 30, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the codex/forced-renewal-cache-ack-20261030 branch October 30, 2026 08:10
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