Skip to content

fix(test): restore SDK source-mutation regression coverage - #159085

Closed
vincentkoc wants to merge 1 commit into
mainfrom
fix-sdk-declaration-mutation-fixture-20260927
Closed

vincentkoc wants to merge 1 commit into
mainfrom
fix-sdk-declaration-mutation-fixture-20260927

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

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 from emitToString. 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

  • Existing failure: SDK baseline CI job. The fixture, compiler owners, dependency inputs, and relevant boundary helpers match the frozen repair base; the failing baseline was not rerun.
  • Linux native proof at the candidate tree: complete src/plugin-sdk/api-baseline.test.ts (26 passed, 19.58 s) and test/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 TypeScript 7.1.0-dev.20260917.1.
  • Targeted formatting, test lint, and Plugin SDK test types passed. Frozen install and complete source-tree checks passed before/after proof; the one-shot worker stopped successfully.
  • Superseded by the equivalent fix on main, landed while this PR was opening. Its fixture bytes match this candidate after removing its one explanatory comment. Closing this duplicate; no merge or current-head hosted-CI completion is claimed here.

@vincentkoc vincentkoc self-assigned this Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 26, 2026 18:01
@vincentkoc

Copy link
Copy Markdown
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.

@vincentkoc vincentkoc closed this Sep 26, 2026
@RomneyDa
RomneyDa deleted the fix-sdk-declaration-mutation-fixture-20260927 branch October 22, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant