Repository navigation
fix(billing): durable usage recovery and canonical monetary accounting - #559
Merged
Merged
Conversation
ranxi2001
marked this pull request as ready for review
October 24, 2026 12:32
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.
Scope and acceptance
One Draft PR for authorized source repairs F1–F4. Not ready to merge.
Published increment
Published head f3c7a89.
Parent reviewed diff f0e0247..f3c7a89 and git show f3c7a89, and executed git diff --check. Added actual native OpenAIGatewayHandler HTTP stage/execute failure test with handler completion synchronization; actual batch submit/database round-trip/settlement regression and capture/release competition; explicit mixed-writer admission/drain and rollback prerequisites. This is static source review, NOT a passing dynamic result.
All F1–F4 boxes remain unchecked until independent source acceptance and exact-head push AND PR CI results are verified. Local Go compilation/tests/build/lint/race, Docker and vue-tsc remain prohibited. Old-head checks do not validate this head.
Boundaries
Upstream results lost before durable staging remain unrecoverable. Recovery never replays a model request or invents zero-cost success. No automatic historical back-charge, unfreeze or ledger repair; unmatched high-precision legacy operations stay blocked. Old quote encoding version 0 may already have lost precision and is not retrospectively repaired. Migrations 302 onward avoid neighboring migration 301.
Mixed old/new financial writers are a release blocker. Admission stop and drain of old requests, usage/batch workers and already-popped flusher snapshots must be reviewed; all relevant nodes need the same verified financial protocol before new admission. Old binary rollback cannot ignore new projections and owned holds. The documentation neither executes drain nor authorizes historical reconciliation.
No production DB/SSH, paid model probes, secrets, payment/recharge changes, pricing-policy changes, merge, tag, release or deployment authorized. Revenue decline/loss remains unproven. v2.17.1 stays on hold.