Repository navigation
Closed
Labels
effort/mDaysDaysimpact/manyAffects most usersAffects most userspriority/p2Backlog-worthyBacklog-worthyseverity/mediumModerate harmModerate harmtriagedItem has been triagedItem has been triagedtype/bugDefectDefecturgency/this-quarterWithin the quarterWithin the quarter
Description
What happens
During production QA on 2026-11-04, an AWS account had an explicit IAM deny on commitment purchases. On that account I ran a direct purchase from Opportunities: one EC2 Reserved Instance, $0 upfront. I selected the recommendation, clicked Purchase, chose "Execute Now", clicked "Execute Purchase Now", then confirmed. AWS refused the purchase (authorization error), as intended. Nothing was bought. The way the UI reports this failure has several problems:
- The error toast is as tall as the viewport. The red "Failed to execute purchase: ..." toast prints the provider's whole error response. At 1921x1129 it runs from the header to the bottom edge, covers the page, and has to be dismissed by hand.
- The Review Purchase modal stays open with "Execute Purchase Now" enabled again. Nothing marks the attempt as failed inside the modal. One more click starts a second attempt.
- The duplicate-guard warning doesn't fit the failure. The Failed row in Purchase History shows: "AWS EC2 and Redshift purchases have no provider-side duplicate guard, and a lost response means the earlier attempt may already have bought the commitment. Check EC2 Reserved Instances ... if it is missing, start a new purchase instead of retrying." Here the provider answered with a definite authorization refusal, not a lost response. Telling the user the commitment may already have been bought is wrong and alarming.
- The failed row shows savings. The Failed row's Monthly Savings cell shows the estimated savings in green, styled like a realized saving.
- Total Purchases counts failed and cancelled rows. After the attempt, the "Total Purchases" card went from 3 to 4. The history held 1 failed and 3 cancelled rows, and nothing was completed. Total Upfront Spent and the savings cards correctly stayed at $0.
- The Status cell is very tall. It prints the full provider error. The row grows to about 700px, and the other columns sit centred far below the status badge. (Item 1 has the same root.)
Expected
- A short, human-readable failure message ("AWS refused the purchase: the CUDly role isn't allowed to buy Reserved Instances in this account"), with details behind an expander or in logs.
- The modal closes or shows the failure inline, and executing again needs an explicit new action.
- The duplicate-purchase warning appears only when the outcome is genuinely unknown (timeout or lost response), not on a definite provider refusal.
- Failed rows don't show savings as if realized, or show them greyed out.
- "Total Purchases" counts completed purchases, or is relabelled (for example "Purchase attempts") with a breakdown.
Notes
No Retry button appeared on the failed EC2 row. That's consistent with the warning text.
Metadata
Metadata
Assignees
Labels
effort/mDaysDaysimpact/manyAffects most usersAffects most userspriority/p2Backlog-worthyBacklog-worthyseverity/mediumModerate harmModerate harmtriagedItem has been triagedItem has been triagedtype/bugDefectDefecturgency/this-quarterWithin the quarterWithin the quarter
Activity
fix(history): show the duplicate-purchase warning only for unknown ou…
fix(purchases): close the review modal on any response a purchase may…
fix(history): reach long status text by keyboard and treat revoked ro…
fix(purchases): tie the failed-execute close to the modal's open token
fix(history): offer the full status text whenever the phone layout cl…
cristim commentedon Nov 4, 2026
Status note: #1718 covers items 1, 2, 4, 5 and 6. #1712 makes the duplicate-purchase warning (item 3) fail safe: it is kept for every non-AWS, unknown or 5xx outcome, and dropped only for an AWS 4xx refusal in a known pre-send format. But the executor stores AWS failures behind a wrapper (
failed to purchase EC2 RI: operation error ...) that this format does not accept yet, so real refused rows still show the warning. Item 3 stays open until the gate accepts that wrapper. The fix is small and needs its own test with the exact stored shape.fix(history): show the duplicate-purchase warning only for unknown ou…
fix(purchases): cap refused-purchase text, keep the review modal from…
fix(purchase): show summarized purchase failures and keep provider de…
fix(history): recognize the executor's stored AWS refusals in the dup…