This repository was archived by the owner on Nov 1, 2026. It is now read-only.
Repository navigation
Conversation
The fallback assigned the raw local amount to the dollar field, so a payout in dong became an invoice line a thousand times too large, and it did so exactly when Wise or Redis was unavailable, which is when nobody is watching. Roughly half the payout rows are in dong today, so this was one outage away from a wrong invoice. The fallback is kept where it is harmless, a payout already denominated in USD, and refused everywhere else. One failed conversion now fails the whole invoice rather than quietly contributing a wrong line to it: an invoice that does not generate is a support ticket, an invoice with a thousandfold line is a payment. Claude-Session: https://claude.ai/code/session_01UgkobZof5By2wCpkBXhjK4
Member
Author
|
Closing per Han: the goal is to shut GKE down, not to invest in it. The bug is real (a failed conversion assigns the raw VND figure to the dollar field, and 393 of 813 payout rows are VND), but the durable fix is on the Cloudflare side, which is where this pipeline is moving:
So the same class of failure cannot produce a wrong invoice on the new stack, and fortress keeps its behaviour unchanged for the remainder of its life rather than taking a deploy it does not need. Residual risk stays recorded in dfoundation DF-174 so it is a known-accepted exposure, not a forgotten one. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
contractor_invoice.go:463-469fell back toamountUSD = p.AmountwheneverResolveAmountUSDerrored. For a non-USD payout that assigns the raw local figure to the dollar field: a 26,000,000 VND payout becomes a $26,000,000 invoice line. It fails open, and it fails precisely when Wise or Redis is down.Not theoretical: the Contractor Payouts database currently holds 393 VND rows against 420 USD. Roughly half of all payouts take this path on every run.
The fallback is kept where it is harmless (a payout already in USD, where the raw amount is the dollar amount) and refused everywhere else. The first failure is recorded and checked after the WaitGroup, so one bad payout refuses the whole invoice instead of contributing a wrong line to it.
An invoice that fails to generate is a support ticket. An invoice with a 1000x line is a payment.
Verified:
go build,go vet, andgo test ./pkg/controller/invoice/...all pass (built with the mise Go 1.24.2 that matches GOROOT, per the repo's known toolchain trap).Found while porting this pipeline to Cloudflare, where the port refuses the same case rather than inheriting the fallback.
https://claude.ai/code/session_01UgkobZof5By2wCpkBXhjK4