Skip to content

fix: archive cached account facts before publishing - #490

Merged
Pigbibi merged 2 commits into
mainfrom
fix/archive-cached-account-facts
Nov 1, 2026
Merged

Pigbibi merged 2 commits into
mainfrom
fix/archive-cached-account-facts

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

AI assistance

Codex implemented and self-reviewed this change.

What changed

The daily cached-only account facts endpoint published to the console without writing the configured funds archive. When account snapshot persistence is enabled, archive the same validated observation before publishing, preserving its original UTC time, exact decimal text, null balances and position coverage. Return a sanitized HTTP 503 and skip publishing if the archive is unavailable. A later console failure retains the collected archive.

Reuse the existing store and archive paths without new broker reads, authentication, trading, schedule or configuration changes. The existing two-object write is not atomic; partial or unknown outcomes require inspection before retrying. This change does not reconstruct missed historical observations.

How verified

CI run 41287871897 passed: 1,552 tests and 13 subtests, Ruff, locked shared dependency checks, QPK pin consistency, dependency validation and package build. Documentation and engineering governance checks passed. The first CI attempt identified an over-precision test fixture; the fixture now obeys the existing amount contract, which was not relaxed.

Local Ruff, Python AST parsing and git diff --check passed. Local pytest attempts were stopped after hanging during macOS dynamic library loading; no local test pass is claimed. The regression cases passed in CI and cover archive contents and timestamps, failed or missing storage, invalid identity, disabled persistence, console failure and unrequested positions.

No deployment, IAM, secret or scheduler changes are included. Deployment requires separate owner sign-off.

Pigbibi and others added 2 commits November 1, 2026 16:10
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 342078bf-8451-4266-beac-3b0f3b216c47
  • 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 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex author self-review completed for this head after green CI (1,552 tests and 13 subtests). Checked that account identity and snapshot validation precede storage, the client closes before archival, the archive uses the original UTC observation date and exact values, missing values remain null, storage failure prevents a success response and console publishing, and no additional broker/authentication/trading calls are introduced. Confirmed the four-file diff contains only generic code, synthetic fixtures and documentation. The existing non-atomic latest/history write is documented; failures require readback rather than automatic retries. No blocking finding in this scope. This is a Codex self-review, not an independent Grok review. The user explicitly authorized owner-approved labeling and squash merge after CI/review; deployment remains gated by separate user sign-off.

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 1, 2026 — with ChatGPT Codex Connector
@Pigbibi
Pigbibi merged commit ffd7e01 into main Nov 1, 2026
9 of 10 checks passed
@Pigbibi
Pigbibi deleted the fix/archive-cached-account-facts branch November 1, 2026 09:15
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