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(exchange): surface an unknown accept outcome as a typed result, not a plain failure #443
Follow-up from the independent review of #442 (RI exchange accept sent once, halt on unknown outcome).
Problem
When the accept outcome is unknown, processRecommendation puts the recommendation in result.Failed (pkg/exchange/auto.go:266-269, 552-559). RunAutoExchange returns a nil error. The only signals of "unknown" are the error text "purchase outcome unknown" and the record staying processing.
providers/aws/ladder/reshape.go:96-110 (summarizeExchangeResult) likely counts it as a plain failure. Consumers, including the platform, can only tell "unknown, do not retry, reconcile" apart from "failed, safe to retry" by string-matching or via GetStaleProcessingExchanges.
Suggested fix
Add a typed field or bucket (for example result.Unknown, or an OutcomeUnknown flag on the per-rec result carrying errors.Is(err, common.ErrOutcomeUnknown)). Surface it in summarizeExchangeResult and in the platform's handling, so an unknown exchange is never auto-retried or shown as an ordinary failure.
Related: the duplicated classifier in pkg/exchange/outcome.go and providers/aws/internal/purchasecfg/outcome.go (the comments cross-reference each other). A shared helper reachable from both modules would remove the drift risk.
Activity
cristim commentedon Oct 17, 2026
Claiming: working on this (planning first; pkg/exchange plus the aws ladder consumer).
feat(exchange): flag an exchange whose accept outcome is unknown
feat(exchange): flag an exchange whose accept outcome is unknown (#497)
fix(aws/ladder): report an exchange with an unknown accept outcome as…