refactor(github-copilot): localize internal helpers#101393
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(github-copilot): localize internal helpers This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Land-ready proof for
Known proof gap: the baseline-red GitHub Copilot token test cannot currently provide a green assertion until its response mock implements the repository HTTP body contract. The patch only narrows TypeScript export visibility and does not change that runtime path. |
|
Merged via squash.
|
What Problem This Solves
The private GitHub Copilot provider implementation exposed five declarations that have no consumers outside their defining modules, plus one unused type re-export from
token.ts. This widened the apparent internal API without providing a supported plugin contract.Why This Change Was Made
Localize same-file-only declarations and remove the unused type re-export. The plugin entrypoint,
api.tsfacade, runtime functions, auth behavior, stream rewriting, and token resolution remain unchanged.User Impact
No runtime behavior changes. Maintainers get a smaller, more accurate provider implementation surface.
Evidence
tbx_01kwxhm0bgg9b6dc31tf9y7xsx: 7 focused suites, 52 tests passed on the rebased headpnpm check:changedpassedoxfmt --checkon all 5 changed filesgit diff --check0.89confidencemodels.test.tshas one unrelated existing failure because its response mock lacksarrayBuffer():origin/mainbaseline Testboxtbx_01kwxhbwtc9ry6gdsxbzt6j7ym: identical failure and stackAI-assisted: yes. Transcript not attached.