Repository navigation
Log organization resource cache creation failures - #326958
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits intoJul 28, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Dmitriy Vasyura (dmitrivMS) merged 3 commits into
Conversation
Preserve cached instructions on fetch failures and refresh organization resources when authentication or workspace selection changes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614
Contributor
There was a problem hiding this comment.
Pull request overview
Restores organization instruction and custom-agent refreshes after authentication or workspace changes while preserving caches on transient failures.
Changes:
- Adds event-driven, serialized resource refreshes with queued reruns.
- Distinguishes confirmed absence from authentication/request failures.
- Adds regression coverage and refresh-capable test mocks.
Show a summary per file
| File | Description |
|---|---|
mockWorkspaceService.ts |
Adds workspace-change event support. |
mockAuthenticationService.ts |
Adds authentication-change event support. |
octoKitServiceImpl.ts |
Propagates request failures and handles confirmed absence. |
githubService.ts |
Documents updated API semantics. |
githubOrgInstructionsProvider.spec.ts |
Covers caching, failures, and invalidation. |
githubOrgChatResourcesService.spec.ts |
Covers lifecycle refresh and disposal behavior. |
githubOrgInstructionsProvider.ts |
Refreshes instructions and preserves cache on failures. |
githubOrgCustomAgentProvider.ts |
Refreshes agents after organization changes. |
githubOrgChatResourcesService.ts |
Implements event-driven serialized refreshes. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Medium
Log refresh outcomes, cache resource counts, prompt length, and cache preservation without recording instruction content. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614
Contributor
Author
|
We chatted in slack and we're now thinking the that the actual problem here is that the cache directory doesn't exist, rather than there being a timing problem. |
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 5b647a0f-5022-4a32-959a-ad8c129b1614
Contributor
Author
|
Paul (@pwang347) Per our conversation, I've updated this PR to just add a little bit more cache related trace logging. |
| try { | ||
| await this.fileSystem.createDirectory(cacheDir); | ||
| } catch (error) { | ||
| this.logService.error(error, '[GitHubOrgChatResourcesService] Failed to create cache directory'); |
Contributor
Author
There was a problem hiding this comment.
I'm thinking these should probably also be trace level logs instead of error level?
Contributor
Author
There was a problem hiding this comment.
I looked around a bit and I think it's reasonable to keep these at error.
Paul (pwang347)
approved these changes
Jul 23, 2026
Megan Rogge (meganrogge)
approved these changes
Jul 23, 2026
roblourens
approved these changes
Jul 23, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Organization-level instructions can be missing from chat even when VS Code selects the expected organization. Existing trace output reports that the cache directory does not exist when instructions are read, but it does not show whether directory creation or the following file write succeeded.
This change adds trace logs before and after organization resource cache directory creation and cache file writes. If either filesystem operation fails, it logs the error with operation context and rethrows it so existing caller behavior remains unchanged.
No refresh, authentication, request, or cache behavior changes. Added focused tests for directory creation and file write failures.