Skip to content

Harden cache expiry notification logic - #328301

Merged
lramos15 merged 3 commits into
mainfrom
lramos15/coherent-armadillo
Jul 31, 2026
Merged

Harden cache expiry notification logic#328301
lramos15 merged 3 commits into
mainfrom
lramos15/coherent-armadillo

Conversation

@lramos15

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 30, 2026 22:31
@lramos15
lramos15 enabled auto-merge (squash) July 30, 2026 22:31
@lramos15 lramos15 self-assigned this Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens prompt-cache expiry tracking and notifications across resumed sessions and model changes.

Changes:

  • Notify precisely at cache expiration.
  • Restore and reconcile cache metadata from SDK usage metrics.
  • Expand expiry, resume, and model-switch tests.
Show a summary per file
File Description
agentHostPromptCacheNotification.test.ts Updates exact-expiry tests.
agentHostPromptCacheNotification.ts Removes the expiration grace period.
copilotAgentSession.test.ts Adds cache restoration and transition coverage.
copilotAgentSession.ts Reconciles cache state with usage metrics.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
roblourens
roblourens previously approved these changes Jul 30, 2026
…adillo

# Conflicts:
#	src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts
The Copilot client-tool E2E capture has no cacheExpiresAt, so the old
code called _setPromptCacheState(undefined) on every main-agent usage
event and unconditionally wrote session meta, emitting two no-op
session/metaChanged actions. Those writes are now deduped, so drop the
entries from the snapshot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5a85f27d-5a24-405c-bc70-5fd820001e64
@lramos15
lramos15 merged commit 9fee93e into main Jul 31, 2026
29 checks passed
@lramos15
lramos15 deleted the lramos15/coherent-armadillo branch July 31, 2026 12:44
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants