Skip to content

abctl cost --by currency: a withheld (mixed) cell is unexplained on that axis #1177

Description

@huang195

Found by the round-3 strict review of #1153. Introduced by that PR's own review round 2 (26a1ad7), so it ships with it.

Before 26a1ad7 no cell on the currency axis could be (mixed): the byUnit arm took the row label unconditionally. It now gates on isReportedUnit, so a capped row (one minute past maxLabelsPerMinute, which carries (other) on every axis) in a mixed window falls through to default and renders (mixed). But the explanatory caveat is gated if !byUnit && !labelled — cmd/abctl/cmd_cost.go:1324 — so on --by currency it is suppressed:

  CURRENCY                             REQUESTS     TOKENS           COST
  USD                                      1000          0        $146.36
  (other)                                    57          0        (mixed)
  credits                                    57          0   0.08 credits

these rows hold is absent. The reader followed the advice in the summary above the table and one row is still withheld with nothing here saying why. Two rules from the PR's own prose:

  • cmd_cost.go:1321-1323, three lines up: "A column of (mixed) with no explanation reads as a defect in the tool."
  • mixedCostCell's godoc: "the first wants a pricing entry, the second wants --by currency" — prescribing what the reader already did.

The candidate fix is unguarded. Mutant HOLE_bycurrency_withheld_cell_unexplained applies it (gate on !labelled alone) and SURVIVES — no test outcome changes. TestRunCost_ByCurrencyWithholdsACappedRowOnAMixedWindow already carries the fixture; extend it rather than adding a fourth --by currency test.

Reachable set: a genuinely mixed window and a minute past maxLabelsPerMinute and --by currency.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Activity

  1. added a commit that references this issue on Oct 4, 2026
    8362676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions