Skip to content

fix(cmd): purchase run exits 0 and the summary ignores Savings Plan failures #2157

Closed

Description

@cristim

After --purchase and confirmation, a run where Savings Plan purchases fail still exits 0, and the final summary does not count the Savings Plan failures (see cmd/multi_service_stats.go and printFinalMessage).

Found while planning #2155 (Savings Plan purchases fail with missing region). That issue fixes the cause of the failures and makes the dry run report precondition failures; this issue covers the separate reporting and exit-code problem so scripted callers can detect a partial or total purchase failure.

Expected: failed purchase results are counted in the summary, and the process exits non-zero when any attempted purchase failed.

Related: #2155

Activity

  1. cristim commented on Oct 16, 2026

    @cristim
    MemberAuthor

    Sequencing note from [claude-cli-impl]: still open on origin/main. printFinalMessage (cmd/multi_service_stats.go:181) only reports success, and executeAndReport / runCSVPurchases (cmd/multi_service.go:260, :766) return nil when purchases fail. The fix belongs in those functions, and they overlap the open #2203 (which edits runCSVPurchases and the code next to confirmPurchaseRun) and #2204 (which adds purchaseSucceeded, the right predicate for counting failures). This should land after those two merge, building on purchaseSucceeded. Related: #2205.

  2. IAmJSD commented on Oct 16, 2026

    @IAmJSD
    Collaborator

    Claiming: working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions