Remove report support gating#143
Open
asizikov wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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
supportedmetadata and the “unsupported native” adapter/validation flow so adapter selection always processes recognized formats. - Renamed the pre-AI Credits report version error to
PreAiCreditsReportVersionErrorand 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 | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
refactor: remove report support gatingsupportedmetadata, the native processing opt-in flag, and the unsupported-native validation path so adapter selection directly processes each recognized report format.Testing
npm testnpm run lintnpm run buildChecklist
npm run lint)