Skip to content

fix: classify cached auth and candidate persistence failures - #484

Closed
Pigbibi wants to merge 1 commit into
mainfrom
fix/auth-and-candidate-diagnostics
Closed

Pigbibi wants to merge 1 commit into
mainfrom
fix/auth-and-candidate-diagnostics

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Cached-session account-facts failures now identify when the existing manual session-renewal flow is required. Upstream 401 and missing/expired cache still return the existing redacted HTTP 503 response: no automatic login, retry, cache mutation, or snapshot publication is added.

Candidate publication previously collapsed persistence failures into an opaque storage alert. Add allowlisted stage/reason diagnostics for binding, storage initialization, archive reads, projection, candidate history/merge, serialization and writes. Pass the same localized diagnostic through the healthy-heartbeat coverage alert so its acknowledgement marker cannot hide the stage behind an earlier generic message. Keep alert deduplication, generation preconditions and bounded explicit-conflict handling; do not retry uncertain writes.

Offline coverage confirms that an initial candidate NOT_FOUND already follows the correct create-only path. The incident's precise persistence defect is still unknown; this PR does not infer an IAM defect or redesign/replay projection.

How verified

  • Full local suite: 1485 passed, 13 subtests passed (one existing third-party NumPy deprecation warning).
  • Focused auth, candidate, localization and duplicate-alert regressions passed; new diagnostics assertions failed before implementation.
  • Ruff, dependency compatibility, lock consistency, pinned shared-package imports/revisions, QPK pin consistency, and package build passed.
  • Documentation check: zero blocking findings; one existing README-outline advisory.
  • Reviewed the diff and staged file list; heuristic added-line secret/account-pattern scan passed.
  • Remote CI, Documentation check, and Engineering governance passed. PR template passed; risk-gate requires an owner approval label for the touched paths. This remains a draft with no labels or auto-merge.
  • No production invocation or deployment was performed.

Follow-up and limits

Actual session renewal and account-facts refresh remain unexecuted. The existing generic invocation workflow can create/update Scheduler bridges; any operational recovery must preserve the requested no-configuration-change boundary. Snapshot refresh also writes to the existing receiver, so it requires resolution of the stated QuantRuntimeSettings boundary.

Obtain the new safe failure stage/category through an approved adoption and observation before changing the persistence path further. Read back uncertain write outcomes before any separately authorized retry. No changes to QuantRuntimeSettings, IAM, credentials, schedules, runtime enablement or trading controls; no candidate re-projection, live trade or real notification.

AI assistance

OpenAI Codex (GPT-6 family). No delegated agents.

Co-Authored-By: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 1, 2026
@Pigbibi

Pigbibi commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR without deleting its branch (fix/auth-and-candidate-diagnostics). The candidate-publisher stage/error_code diagnostics are already covered by the merged #489. The remaining cached-auth failure classification has been re-cut onto current main as a small draft PR: #501.

@Pigbibi Pigbibi closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant