Skip to content

PR7: Measure and document connection recovery - #1135

Merged
Tomasz Naumowicz (tnaum-ms) merged 17 commits into
feature/connection-lifecyclefrom
dev/tnaum/connection-lifecycle-telemetry-docs
Nov 26, 2026
Merged

Tomasz Naumowicz (tnaum-ms) merged 17 commits into
feature/connection-lifecyclefrom
dev/tnaum/connection-lifecycle-telemetry-docs

Conversation

@tnaum-ms

@tnaum-ms Tomasz Naumowicz (tnaum-ms) commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Document how to disconnect and reconnect, recover Microsoft Entra sign-in, and keep or reopen affected tabs. Add draft, text-only 1.2.0 release notes and record bounded post-startup Entra renewal outcomes for the extension, Shell and Playground.

Why

Users need to know when recovery is automatic, when they must act, and when they need a new tab. Renewal measurements distinguish token lookup outcomes from database acceptance, without including account, connection or token identifiers. Azure Resource Manager challenges are evaluated separately, using the final request outcome.

Scope

WI-9 and WI-10, synchronized with the reviewed #1133 head. This PR does not publish 1.2.0, change the recovery UX, or include screenshots. The dashboard worktree was not modified because it has unrelated changes in progress.

Validation

  • Case 1: build and 349 focused tests passed for WI-9 at 27af82b0e.
  • The local GitHub Pages build rendered the WI-10 manual and release notes; the three manual links and release-index link resolve.
  • Local Case 2 passed: formatting, localization check, lint, build, strict workspace test type-checking, 9,963 tests passed (one skipped), and VSIX packaging.
  • The four approved pre-review fixes are pushed. PR7 remains a draft pending verified standard-context validation. Pre-release telemetry ingestion and packaged live validation remain pending (OP-6 and CP-5).

Part of #1102. See the connection lifecycle plan and telemetry queries.

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Base automatically changed from dev/tnaum/connection-lifecycle-worker-relays to feature/connection-lifecycle November 26, 2026 11:44
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) marked this pull request as ready for review November 26, 2026 12:10
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ CI passed: standard tier (ready PR)

Commit e70ab7c, workflow run.

Layer Result Ran or skipped because
Static checks ✅ passed every push
Unit tests ✅ passed every push
npm packages: verify tarballs ⏭️ skipped no change to packages/**, package-lock.json or the CI workflow
VSIX: inspect contents ✅ passed ready PR
VSIX: self-test of the checks ⏭️ skipped no change to build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow
VSIX: activate in VS Code ✅ passed ready PR
VSIX: self-test of the activation check ⏭️ skipped no change to build/verification/**, build/vite/**, the Vite configs, package-lock.json or the CI workflow
Webview host in unbundled extensions ⏭️ skipped no change to packages/vscode-ext-webview/**, package-lock.json or the CI workflow
E2E ⏭️ not available yet arrives with the E2E iteration (full tier)

Full run: add the ci:full-requested label to run every layer once on the current commit.
No full run yet.

Code quality

Check Status How to fix
Localization (l10n) ✅ Passed Nothing to fix
ESLint ✅ Passed Nothing to fix
Prettier formatting ✅ Passed Nothing to fix

Build size

No size data for feature/connection-lifecycle yet; sizes only. VSIX: 8.8 MiB.

Artifacts: VSIX | Bundle-reports-45823247237 | L1-manifest-report-45823247237

All graphs (exact bytes)
Graph PR bytes
Collection View page (collectionView) 6,058,236
Document View page (documentView) 4,826,019
Local Quick Start page (localQuickStart) 1,592,278
Atlas Credentials page (atlasCredentials) 1,520,944
Cluster Dashboard page (clusterDashboard) 1,570,044
Diagnose Connection page (connectionDiagnostics) 1,543,859
Activation (mainStartup) 3,227,082
Extension host (main) 9,803,670
Playground worker (playgroundWorker) 5,417,400
VSIX (vsix) 9,264,273
playgroundTsPlugin 6,175
viewsEntry 1,468,371
viewsAssets 80,340
editorWorker 259,570
jsonWorker 389,427

Packaged bytes. Shared chunks count in every graph that loads them, so rows do not add up.

Updated in place on every run.

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.

🟡 Changes recommended

Unresolved telemetry defects can permanently suppress renewal reporting after unchanged credential saves and misrepresent authentication failures, client replacements, and worker callback completion.

6 open issues
What changed in this PR

Adds renewal measurements and recovery documentation to the connection-lifecycle work in #1102, building on Shell and Playground renewal from #1133. This PR documents existing recovery behavior without changing the recovery UI or publishing 1.2.0.

Changes:

  • Records bounded post-startup Entra lookup outcomes and token lifetimes across the extension, Shell, and Playground.
  • Documents reconnect, sign-in recovery, retained tabs, and changed connection settings.
  • Adds telemetry queries, unpublished release notes, and updated engineering guidance. Live ingestion and packaged validation remain pending.
File Description
src/​documentdb/​shell/​ShellSessionManager.ts Passes post-startup eligibility to the token relay.
src/​documentdb/​playground/​workerTypes.ts Adds a shared driver-abort flag to token requests.
src/​documentdb/​playground/​WorkerSessionManager.ts Captures renewal eligibility when requests arrive.
src/​documentdb/​playground/​WorkerSessionManager.test.ts Covers worker renewal outcomes and exclusions.
src/​documentdb/​playground/​playgroundWorker.ts Signals driver cancellation during token lookup.
src/​documentdb/​playground/​playgroundWorker.test.ts Checks Entra abort-flag behavior.
src/​documentdb/​playground/​PlaygroundEvaluator.ts Forwards post-startup eligibility to the relay.
src/​documentdb/​ClustersClient.ts Wires renewal observations to client lifecycle checks.
src/​documentdb/​ClustersClient.test.ts Covers host renewal counting and token lifetime.
src/​documentdb/​auth/​WorkerTokenRelay.ts Records bounded Shell and Playground lookup outcomes.
src/​documentdb/​auth/​tokenRenewalTelemetry.ts Centralizes renewal event emission.
src/​documentdb/​auth/​tokenExpiry.ts Extracts positive full JWT lifetimes.
src/​documentdb/​auth/​MicrosoftEntraIDAuthHandler.ts Gates observations and excludes canceled lookups.
src/​documentdb/​auth/​authCallerPolicy.ts Exposes shared renewal-observation hooks.
src/​commands/​signInAgain/​signInAgain.ts Enables observations after recovery establishes a client.
src/​commands/​signInAgain/​signInAgain.test.ts Checks observation eligibility after sign-in recovery.
docs/​user-manual/​query-playground.md Links Playground users to recovery guidance.
docs/​user-manual/​managing-azure-discovery.md Adds a connection-lifecycle reference.
docs/​user-manual/​interactive-shell.md Links Shell users to renewal and reconnect guidance.
docs/​user-manual/​connecting-to-databases.md Documents recovery, disconnect, and saved-edit behavior.
docs/​release-notes/​1.2.md Adds text-only, unpublished lifecycle release notes.
docs/​index.md Links the unpublished 1.2 draft.
docs/​ai-and-plans/​features/​connection-lifecycle/​telemetry.md Adds lookup, lifecycle, and ARM analysis queries.
docs/​ai-and-plans/​features/​connection-lifecycle/​README.md Updates implementation status and documentation choices.
docs/​ai-and-plans/​features/​connection-lifecycle/​iterations/​01-pr7-telemetry-and-docs-review.md Records pre-review fixes and remaining validation.
docs/​ai-and-plans/​features/​connection-lifecycle/​iterations/​01-dev-plan.md Records telemetry and documentation progress.
docs/​ai-and-plans/​features/​connection-lifecycle/​decisions.md Updates disconnect scope and decision records.
CHANGELOG.md Adds unpublished 1.2.0 lifecycle entries.
.github/​skills/​tree-cluster-architecture/​SKILL.md Documents binding, recovery, and disconnect contracts.
.github/​skills/​error-translation/​SKILL.md Documents typed lifecycle errors and presentation ownership.

Review effort: Max

Comment thread src/documentdb/ClustersClient.ts Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) merged commit d2e0695 into feature/connection-lifecycle Nov 26, 2026
12 checks passed
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) deleted the dev/tnaum/connection-lifecycle-telemetry-docs branch November 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants