Repository navigation
Description
- Copilot Chat Extension Version: Not recorded
- VS Code Version: Regression introduced by managed settings: fix stale cache case when moving to unavailable #330896; fixed on main by managed settings: keep policy through transient refresh failures #337583 and backported to release/1.139 by [cherry-pick] managed settings: keep policy through transient refresh failures #337739
- OS Version: Not recorded
- Feature (e.g. agent/edit/ask mode): Enterprise managed settings / Copilot OpenTelemetry configuration
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): N/A
- Logs: Not attached; diagnosis and validation are documented in managed settings: keep policy through transient refresh failures #337583.
Steps to Reproduce:
- Sign in with an enterprise account that supplies server-managed settings, such as an OpenTelemetry endpoint, and allow a successful settings fetch.
- Allow the cached response to become older than one hour, then encounter a failed refresh (no response, transient 401/403, 429, 5xx, or malformed response).
- Observe that the previously applied policy is dropped. A subsequent successful fetch restores it.
Actual behavior: Managed settings alternate between the enterprise policy and defaults during refresh failures. For an OTel endpoint, affected users see recurring notifications such as "Copilot OTel endpoint will change to http://localhost:4318 after reload.", especially after idle. Other server-managed restrictions are also temporarily lifted.
Expected behavior: A failed refresh is not evidence that policy was withdrawn. Keep the last successful settings, even when stale, without renewing their original fetch timestamp so subsequent polls or focus events retry. Successful responses, explicit withdrawal, sign-out/account changes, and forced-refresh behavior retain their existing semantics.
Fix and release tracking
- Main fix: managed settings: keep policy through transient refresh failures #337583 (merged).
- Cherry-pick: [cherry-pick] managed settings: keep policy through transient refresh failures #337739 (merged into
release/1.139).
This issue tracks the stale-policy retention regression addressed by those PRs. The separate session-lookup-error and managedSettingsActive lifecycle problems described in #337583 are outside this issue's scope.
Activity