Skip to content

Reject native AI Credits reports#129

Merged
asizikov merged 2 commits into
mainfrom
asizikov/report-validation
May 30, 2026
Merged

Reject native AI Credits reports#129
asizikov merged 2 commits into
mainfrom
asizikov/report-validation

Conversation

@asizikov
Copy link
Copy Markdown
Member

Summary

June and later billing exports use native AI Credits units, which this preview app does not support yet. This PR rejects those reports early with a clear message and clarifies that the app currently accepts April and May PRU vs usage-based billing reports.

Changes

Commit Change
fix: reject native AI Credits reports Adds first-row report format validation so native AI Credits reports fail before aggregation, with tests for rejection and PRU acceptance.
fix: clarify supported report uploads Updates upload-page helper copy to describe the supported April and May report scope.

Testing

  • npm run build
  • npm run lint -- --quiet
  • npm test

Checklist

  • Specs lint passes (npm run lint)
  • Tests updated if applicable
  • Documentation updated if applicable

asizikov and others added 2 commits May 30, 2026 23:34
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 30, 2026 21:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rejects unsupported native AI Credits billing exports early while clarifying the upload UI around the currently supported April/May PRU vs usage-based billing CSV reports.

Changes:

  • Adds first-data-row report format validation before pipeline aggregation.
  • Introduces a specific unsupported native AI Credits report error.
  • Updates parser and pipeline tests plus upload helper copy.
Show a summary per file
File Description
src/pipeline/runPipeline.ts Validates header and first record format before analysis/processing.
src/pipeline/runPipeline.test.ts Covers native AI Credits rejection and existing pipeline behavior.
src/pipeline/parser.ts Adds native AI Credits report detection and error type.
src/pipeline/parser.test.ts Tests native report rejection and PRU acceptance without exceeds_quota.
src/components/UploadPage.tsx Updates upload copy to describe supported April/May reports.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 0

@asizikov asizikov merged commit 4f5afd0 into main May 30, 2026
10 checks passed
@asizikov asizikov deleted the asizikov/report-validation branch May 30, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants