Skip to content

fix(scorer): BreakEvenMonths is never computed, so --max-break-even-months is inert #367

Closed

Description

@cristim

Live audit (CLI main 68f6b774): EC2 partial-upfront with --max-break-even-months 1 lets all 23 of 23 recs through, and the table Break-even column is always '-'.

Root cause: pkg/scorer/scorer.go:85 reads rec.BreakEvenMonths, but no AWS parser assigns it (only pkg/common/types.go declares it). 0 therefore always passes.

Plan: compute break-even in pkg (upfront / gross monthly savings, where gross = net monthly savings + upfront amortised over the term), with defined behaviour for no-upfront (0, nothing to recover) and for uncomputable (distinct from 0; filtered by the scorer rather than silently passed). Populate the field on passed recs so the table shows it.

Activity

  1. IAmJSD commented on Oct 15, 2026

    @IAmJSD
    Collaborator

    Released: this turned out to be already fixed on main (details in the comment below), so I'm not working on it.

  2. IAmJSD commented on Oct 15, 2026

    @IAmJSD
    Collaborator

    Releasing my claim: this is already fixed. #376 (merged 2026-10-13 as 9551cce, Refs #367) computes break-even in common.BreakEven and the scorer now enforces --max-break-even-months; its tests pass on main. The CLI already picks it up (its go.mod pins pkg at 9b35837, which contains 9551cce) and docs/cli/filtering.md describes the new behaviour. I think this can be closed.

  3. IAmJSD commented on Oct 15, 2026

    @IAmJSD
    Collaborator

    @cristim could you close this one? It was fixed by #376 (which used Refs rather than Closes, so it stayed open).

  4. cristim commented on Oct 16, 2026

    @cristim
    MemberAuthor

    Checked against main 740dfbd: #376 (9551cce) added common.BreakEven (pkg/common/breakeven.go:22) and the scorer now enforces MaxBreakEvenMonths (pkg/scorer/scorer.go:92). It used Refs, so this stayed open. Marking needs-info for a close decision. The unknown-upfront case is tracked separately in #392.

  5. added
    status/needs-infoAwaiting clarification from the asker
    and removed
    status/needs-infoAwaiting clarification from the asker
    on Oct 16, 2026
  6. cristim commented on Oct 17, 2026

    @cristim
    MemberAuthor

    Closing as completed per owner decision (2026-10-17): fixed by #376 (9551cce, common.BreakEven; the scorer enforces MaxBreakEvenMonths). The unknown-upfront case is tracked in #392.

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