Files
vscode/extensions/copilot/test/base
Dmitriy VasyuraandCopilot a97b5d408a nes: latch quota-triggered Copilot token refreshes (#339839)
* nes: latch quota-triggered Copilot token refreshes

Refresh quota metadata once per account and model instead of repeatedly resetting tokens whose legacy quota flags never latch. Preserve recovery and request ordering, distinguish static-token accounts, and force explicit refreshes to pick up plan changes.

Fixes #331579

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* nes: preserve quota latches across telemetry ID rotation

Use authenticated account and issuer identity instead of the rotatable Copilot tracking ID. Snapshot static session IDs separately and use the cached username for token-only clients. Cover ordinary and quota-triggered tracking ID rotation, in-flight responses, and static-session account switches.

Addresses feedback on #339839.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* auth: omit static GitHub sessions without credentials

Keep credential-free BYOK and injected Copilot token managers usable when quota identity tracking inspects authentication metadata. Do not advertise a GitHub session backed by a provider that can only throw for missing credentials. Preserve PAT/OAuth selection and add regression coverage.

Fixes CI failures in #339839.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* nes: simplify quota refresh state and focus tests

Consolidate session identity and request sequencing while preserving quota latching, ordering, coalescing, and retry behavior. Replace the broader added test suites with focused quota refresh unit coverage and shorten the authentication guidance per review feedback.

Updates #339839.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: latch mid-stream WebSocket quota errors

Rearm quota refreshes only after a completed WebSocket stream. Route mid-stream CAPI quota failures through the same quota request coordinator, retain error propagation, and share quota-code classification with initial failures.

Add regression coverage for delayed quota failures, successful recovery, and non-quota stream errors. Addresses review feedback in #339839.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: trim WebSocket tests and format quota checks

Remove the added mid-stream quota tests and unused fixture support per review feedback. Split the quota error predicate for readability without changing production behavior.

Updates #339839.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-06 12:22:17 -04:00
..
…
…
…
…
…
…