Repository navigation
fix: flag cached auth failures needing manual renewal - #501
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Pigbibi
marked this pull request as ready for review
November 1, 2026 14:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI assistance
Grok Bot (AI agent) prepared this change; reviewed against the original diff in #484.
What changed
Re-cuts only the cached-auth classification from #484 onto current
main. When the account-facts sync fails because the cached session is missing/expired (cache_missing,cache_stale,cache_missing_or_stale) or upstream returned 401 (read_http_erroratuserinfo/account_list/account_read), the existing structured failure log now also carriesrecovery_action=manual_session_renewal_required. Storage read failures, upstream 403 and 5xx do not get the field. HTTP status and the redacted 503 response body are unchanged; no automatic login, retry, cache mutation or publication is added.Files:
main.py(+4),tests/test_account_facts_endpoint.py(+31),docs/account-archive-history.md(+7).Not included: the candidate-publisher stage/reason diagnostics and notification wiring from #484. #489 already covers those, so they are not duplicated here.
How verified
tests/test_account_facts_endpoint.py: 37 passed; the 4 new parametrized cases fail without themain.pychange.Why
Operators reading the failure log can tell when the existing manual
/session-renewflow is the right recovery and when it would not help. Supersedes the cached-auth part of #484 (closed, branch kept).Risk
Low. Adds one log field in an existing failure path; touches
main.py, which the risk gate may flag for an owner approval label. No label added, draft, not merged. No changes to IAM, credentials, schedules, runtime or trading controls.