Skip to content

Remove report support gating#143

Open
asizikov wants to merge 1 commit into
mainfrom
asizikov/native-enable-hardening
Open

Remove report support gating#143
asizikov wants to merge 1 commit into
mainfrom
asizikov/native-enable-hardening

Conversation

@asizikov
Copy link
Copy Markdown
Member

@asizikov asizikov commented Jun 6, 2026

Summary

Native AI Credits report formats are now treated as first-class inputs throughout the pipeline. This removes the older support/unsupported adapter state and default-off native processing flag now that preview period, summer promotion, and post-promotion reports should all process.

Changes

Commit Change
refactor: remove report support gating Removes report supported metadata, the native processing opt-in flag, and the unsupported-native validation path so adapter selection directly processes each recognized report format.
  • Renamed the pre-AI Credits report version error and default adapter helper to avoid support/unsupported semantics while preserving malformed/pre-AIC validation.
  • Updated pipeline tests and fixtures to expect native AI Credits reports to process without flags.

Testing

  • npm test
  • npm run lint
  • npm run build

Checklist

  • Specs lint passes (npm run lint)
  • Tests updated if applicable
  • Documentation updated if applicable (N/A; no docs changes required)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 6, 2026 21:37
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 removes the “supported/unsupported” gating around usage report formats so native AI Credits reports are treated as first-class inputs throughout the pipeline, eliminating the prior opt-in flag and unsupported-native validation path.

Changes:

  • Removed supported metadata and the “unsupported native” adapter/validation flow so adapter selection always processes recognized formats.
  • Renamed the pre-AI Credits report version error to PreAiCreditsReportVersionError and updated tests/fixtures accordingly.
  • Updated the app and pipeline tests to run native AI Credits processing unconditionally (no feature flag).
Show a summary per file
File Description
src/pipeline/runPipeline.ts Removes native-processing opt-in flag; always selects an adapter and processes recognized formats.
src/pipeline/runPipeline.test.ts Updates expectations to always process native AI Credits reports; renames version error.
src/pipeline/reportUsageMetrics.test.ts Removes supported metadata expectations.
src/pipeline/reportAdapters.ts Removes supported/unsupported semantics from adapter metadata and selection/validation APIs.
src/pipeline/reportAdapters.test.ts Updates adapter routing expectations for native AI Credits; renames version error.
src/pipeline/parser.ts Replaces UnsupportedReportVersionError with PreAiCreditsReportVersionError; removes unsupported-native error.
src/pipeline/parser.test.ts Updates tests for renamed version error and removes unsupported-native validation tests.
src/pipeline/includedCreditsPolicy.test.ts Removes supported metadata expectations.
src/pipeline/aicIncludedCredits.test.ts Removes supported metadata expectations.
src/pipeline/aggregators/usageMetrics.ts Renames default adapter helper import/use to remove supported semantics.
src/App.tsx Removes the native-processing opt-in flag from the pipeline callsite.

Copilot's findings

Tip

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

  • Files reviewed: 11/11 changed files
  • Comments generated: 1

Comment on lines 66 to 70
if (!('exceeds_quota' in header.index) && !hasTransitionPeriodAicColumns(header)) {
NATIVE_AI_CREDITS_REPORT_ADAPTER.validateHeader(header)
return NATIVE_AI_CREDITS_REPORT_ADAPTER
}

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