Skip to content

fix(cli): use purchaseSucceeded in interrupt summary, stats and CSV success column #2205

Closed

Description

@cristim

Problem

PR #2204 (closes #1900) adds purchaseSucceeded(result) (Success && Error == nil). It uses it for audit status and the ✅/❌ diagnostics on the recommendation and CSV purchase paths. Four other sites still read the raw result.Success flag. For a provider result {Success: true, Error: non-nil}, they now disagree with the audit record for the same purchase:

  • cmd/interrupt.go printInterruptedSummary: skips the result, so the Ctrl-C summary does not list it under "verify in AWS before re-running".
  • cmd/interrupt.go auditStopMessage: reports "(commitment )" instead of "(errored: ...)".
  • cmd/multi_service_stats.go calculateServiceStats: counts it as Successful, and the totals inherit that.
  • cmd/multi_service_csv.go: the CSV Success column writes true next to the error text.

No pinned provider is known to return this shape today, so this is defensive.

Expected

Route these sites through purchaseSucceeded. If the CSV column is meant to stay raw provider data, keep it and document that.

Acceptance criteria

  • Regression tests for printInterruptedSummary and calculateServiceStats with a Success=true, Error!=nil result.
  • Existing behaviour is unchanged for ordinary success, Success=false and a separate Go error.

Found during independent review of #2204.

Activity

  1. self-assigned this
    on Oct 17, 2026
  2. cristim commented on Oct 17, 2026

    @cristim
    MemberAuthor

    Claiming: working on this [claude-cli-impl]

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions