Skip to content

Normalize empty pi report totals #1480

Description

@Nicolas0315

What do you want to change?

Resolve the remaining pi-specific part of #832: empty ccusage pi JSON reports currently return totals: null, while other adapters return a zero-valued totals object. I would like to implement and test this narrow fix.

Why?

A stable totals object lets JSON consumers handle empty and non-empty reports without a special null branch.

How? (optional)

Add a regression test for an empty pi report, then return the shared zero totals object for empty rows.

Activity

  1. pullfrog commented on Jul 22, 2026

    @pullfrog
    Contributor
  2. github-actions commented on Jul 22, 2026

    @github-actions
    Contributor

    This issue was auto-closed. Issues from new contributors are auto-closed by default.

    Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.

    Keep the issue short, concrete, and written in your own voice.

    If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.

    See CONTRIBUTING.md.

  3. added
    bugSomething isn't working
    minorMerged PR requires a minor version bump
    on Jul 22, 2026
  4. ryoppippi commented on Aug 31, 2026

    @ryoppippi
    Member

    Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.

    Audit result: maintainable candidate. The request fits the current ccusage scope and can be evaluated with repository-owned code or fixtures, without vendor credentials or platform-specific release infrastructure. It remains closed for now; reopen only after confirming current relevance and expected behavior.

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

    bugSomething isn't workingminorMerged PR requires a minor version bumptriage:maintainableFits the repository's maintainable scope and needs review.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions