You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ladder): floor commitment dollars to provider precision at the purchase boundary #354
pkg/ladder.Allocate (go#353, go#349 PR-B) computes commitment dollars exactly with big.Rat and never rounds up, but it does not floor to the provider's commitment precision. The provider sends the Savings Plan commitment as %.2f of amount_usd_hr (providers/aws/savingsplans/client.go:~235), and the platform stores r.Float64() in a NUMERIC(20,6) column, so a stored tranche can exceed the planned amount by up to ~$0.0000005/hr, and a tranche under $0.005/hr becomes "0.00" and is rejected by AWS after submission.
Proposed fix
Floor commitment dollars to the provider precision at the purchase boundary (AWS adapter / platform PR-D) and refuse or hold tranches that floor to zero; document the precision per provider. Platform PR-D must also refuse old tranches stored without a CommitmentRate.
Blocks
go#349 chain (AWS adapter PR-C, platform PR-D) and the platform ladder executor (A17 min amount).
The AWS provider portion merged in #403 as 29adce1c3883bfb71a926451c323eafea601e87f. The merged tree exactly matches independently reviewed d7dfc842.
Purchases and previews now share five-decimal flooring within the AWS [0.001, 1000000] range; invalid/nil/nonfinite amounts fail before submission, caller details stay unchanged, and token/authoritative cost behavior is preserved. Normal hooks, exact-head CI, independent affected race/build/public-client verification, and the included CodeRabbit review passed. Runtime verification used a fake SDK boundary; no live AWS purchase was made.
This issue stays open for platform storage precision, the old-tranche CommitmentRate gate, and cross-provider documentation. No consumer pins or MCP whole-cent guard changed. Post-merge workflow verification is being watched separately.
Released: this repo's remaining piece (cross-provider precision docs) merged in #438. The other two items you listed, platform storage precision (NUMERIC(20,6) / r.Float64()) and the old-tranche CommitmentRate gate in the executor, are platform-repo changes. @cristim, you might want to close this and track those two in a platform issue.
Checked against main: the in-repo work is done. AWS flooring merged in #403 and the cross-provider precision docs in #438. What remains (NUMERIC(20,6) storage and the old-tranche CommitmentRate gate) is platform-side. Proposing to close once a platform issue tracks it; marking status/needs-info.
Activity
cristim commentedon Oct 14, 2026
The AWS provider portion merged in #403 as
29adce1c3883bfb71a926451c323eafea601e87f. The merged tree exactly matches independently reviewedd7dfc842.Purchases and previews now share five-decimal flooring within the AWS [0.001, 1000000] range; invalid/nil/nonfinite amounts fail before submission, caller details stay unchanged, and token/authoritative cost behavior is preserved. Normal hooks, exact-head CI, independent affected race/build/public-client verification, and the included CodeRabbit review passed. Runtime verification used a fake SDK boundary; no live AWS purchase was made.
This issue stays open for platform storage precision, the old-tranche CommitmentRate gate, and cross-provider documentation. No consumer pins or MCP whole-cent guard changed. Post-merge workflow verification is being watched separately.
IAmJSD commentedon Oct 16, 2026
Claiming: working on this
docs(ladder): document provider commitment precision at PurchaseLayer (…
IAmJSD commentedon Oct 16, 2026
Released: this repo's remaining piece (cross-provider precision docs) merged in #438. The other two items you listed, platform storage precision (NUMERIC(20,6) /
r.Float64()) and the old-tranche CommitmentRate gate in the executor, are platform-repo changes. @cristim, you might want to close this and track those two in a platform issue.cristim commentedon Oct 17, 2026
Checked against main: the in-repo work is done. AWS flooring merged in #403 and the cross-provider precision docs in #438. What remains (NUMERIC(20,6) storage and the old-tranche CommitmentRate gate) is platform-side. Proposing to close once a platform issue tracks it; marking
status/needs-info.