Repository navigation
fix(test): restore SDK source-mutation regression coverage - #159085
Closed
vincentkoc wants to merge 1 commit into
Closed
vincentkoc wants to merge 1 commit into
vincentkoc wants to merge 1 commit into
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
vincentkoc
marked this pull request as ready for review
September 26, 2026 18:01
Member
Author
|
Superseded by 2b2ae31, which landed while this PR was opening. I verified the canonical fixture matches this tested candidate exactly apart from one explanatory comment. Closing the duplicate and retaining the landed fix as the canonical repair. |
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.
What Problem This Solves
Fixes a failing Plugin SDK baseline regression test whose source-mutation injection stopped running after declaration diagnostics moved into declaration emission.
User Impact
No user-visible runtime change. Restores CI coverage that rejects source changes during SDK declaration generation while still accepting linked external types.
Why This Change Was Made
The fixture still intercepted
getDeclarationDiagnostics, but the compiler owner now obtains those diagnostics fromemitToString. It now awaits the real emission, checks that emission succeeded without diagnostics, and mutates the source before the existing snapshot validation. This follows the existing declaration-boundary sibling fixture and preserves its rejection and cleanup assertions.Only the test changes: 8 additions / 7 deletions; no production changes or new compatibility path.
Evidence
src/plugin-sdk/api-baseline.test.ts(26 passed, 19.58 s) andtest/scripts/native-declaration-boundary.test.ts(14 passed, 3 Windows-only cases skipped, 3.68 s). Both ran through the repository test wrapper with one worker and TypeScript7.1.0-dev.20260917.1.