Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 32 additions & 41 deletions docs/ai-and-plans/features/connection-lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,23 @@ code:

# Connection lifecycle

**Status:** package P (A2, B2, C-balanced and D2; decisions 0026, 0027, 0029–0032) is implemented
in [draft #1149](https://github.com/microsoft/vscode-documentdb/pull/1149), stacked on the feature
branch. Integrated host checks pass; rendered/workbench and live verification remain incomplete. The
[iteration 3 section 6 evidence ledger](./iterations/03-complexity-reduction-analysis.md#6-packages-regenerated-2026-11-30)
records committed slices and remaining verification. **Issues:**

- [#1102](https://github.com/microsoft/vscode-documentdb/issues/1102)
- [#1059](https://github.com/microsoft/vscode-documentdb/issues/1059)
- [#566](https://github.com/microsoft/vscode-documentdb/issues/566)
- [#990](https://github.com/microsoft/vscode-documentdb/issues/990)
- follow-ups after 1.2.0: [#1105](https://github.com/microsoft/vscode-documentdb/issues/1105)
(Kubernetes tunnels, network resilience), [#1106](https://github.com/microsoft/vscode-documentdb/issues/1106)
(out-of-date results), and [#1119](https://github.com/microsoft/vscode-documentdb/issues/1119)
(prompt handling of Microsoft account sign-out)

**Branch:** `feature/connection-lifecycle`, with stacked sub-PRs from `dev/tnaum/*`. Implementation
does not wait for intermediate merges; the operator handles approvals and merges (decision 0006).

**Review follow-up:** [decision 0033](./decisions.md#0033-approve-the-pr1149-review-dispositions-with-explicit-complexity-tradeoffs)
approves nine fixes and three no-code dispositions from the
[PR #1149 review](./iterations/03-pr1149-copilot-review.md). The follow-up fixes are implemented in
[draft #1154](https://github.com/microsoft/vscode-documentdb/pull/1154); workbench and live
verification remain incomplete. The accepted C01/C08 exceptions and selected C06/C10 behavior
are reflected in the intent below.

> How database connections stay usable across Entra token expiry, idle drops and credential
> changes, and what open surfaces do when the user must act or explicitly ends the session.
Connections recover silently from Entra token expiry or an idle drop when the same account can
continue. An explicit Disconnect ends the session: retained tabs stay copyable but cannot run
database operations, even after reconnecting.

**Landed on the feature branch, not yet on `main` (2026-12-02).** The open
[umbrella PR #1136](https://github.com/microsoft/vscode-documentdb/pull/1136) includes the
[recovery and retained-tab changes (#1149)](https://github.com/microsoft/vscode-documentdb/pull/1149),
their [review fixes (#1154)](https://github.com/microsoft/vscode-documentdb/pull/1154), and the
[simpler stale-action and ended-session handling (#1169)](https://github.com/microsoft/vscode-documentdb/pull/1169).
See the [decision log](./decisions.md), particularly 0031–0036, for what was chosen and why.
The [user guide](../../../user-manual/connecting-to-databases.md#disconnect-and-reconnect) describes what users see.

**Verification still open.** [Automated checks passed for #1169](./iterations/04-pr1136-scope-and-test-review.md#case-2-follow-up-2026-12-02).
That does not establish real Entra expiry or sleep/wake recovery, dirty-tab copy after Disconnect,
or a Retry/sign-in overtaken by Disconnect in the workbench. Use the
[candidate verification runbook](./iterations/03-complexity-reduction-analysis.md#evidence-the-agent-collects-directly)
for the separate host, rendered, live-worker and telemetry checks.

## Problem

Expand All @@ -58,6 +48,14 @@ Code. The original defects were:

Evidence, telemetry and source pointers: [research-findings.md](./research-findings.md).

Tracking: [#1102](https://github.com/microsoft/vscode-documentdb/issues/1102),
[#1059](https://github.com/microsoft/vscode-documentdb/issues/1059),
[#566](https://github.com/microsoft/vscode-documentdb/issues/566) and
[#990](https://github.com/microsoft/vscode-documentdb/issues/990). Deferred: [Kubernetes tunnels
and network resilience](https://github.com/microsoft/vscode-documentdb/issues/1105),
[out-of-date results](https://github.com/microsoft/vscode-documentdb/issues/1106) and
[Microsoft account sign-out](https://github.com/microsoft/vscode-documentdb/issues/1119).

## Code map

| Area | Primary implementation |
Expand Down Expand Up @@ -154,20 +152,12 @@ entries are unpublished drafts and do not represent a shipped release.

## Documents

| Document | Kind |
| -------------------------------------------------------------------------------------------------- | --------- |
| [research-findings.md](./research-findings.md) | research |
| [decisions.md](./decisions.md) | decisions |
| [iterations/01-implementation-plan.md](./iterations/01-implementation-plan.md) | plan |
| [iterations/01-dev-plan.md](./iterations/01-dev-plan.md) | plan |
| [iterations/02-ux-implementation-plan.md](./iterations/02-ux-implementation-plan.md) | plan |
| [iterations/02-pr1146-copilot-review.md](./iterations/02-pr1146-copilot-review.md) | review |
| [iterations/02-pr1136-copilot-review.md](./iterations/02-pr1136-copilot-review.md) | review |
| [iterations/03-complexity-reduction-analysis.md](./iterations/03-complexity-reduction-analysis.md) | analysis |
| [iterations/03-pr1149-copilot-review.md](./iterations/03-pr1149-copilot-review.md) | review |
| [iterations/04-pr1136-scope-and-test-review.md](./iterations/04-pr1136-scope-and-test-review.md) | analysis |
| [iterations/01-pr1136-final-review.md](./iterations/01-pr1136-final-review.md) | review |
| [iterations/01-pr1136-ux-review.md](./iterations/01-pr1136-ux-review.md) | ux-review |
- **Why the design looks this way:** [operator decisions](./decisions.md), [original defect evidence](./research-findings.md), [telemetry definitions and queries](./telemetry.md).
- **Original delivery:** the [implementation plan](./iterations/01-implementation-plan.md) gives the proposal and dependencies; the [dev ledger](./iterations/01-dev-plan.md) records deviations, commits, operator checks and limits.
- **Stage reviews:** [Entra renewal](./iterations/01-pr1-entra-renewal-review.md), [Azure Discovery](./iterations/01-pr2-azureauth-review.md), [client identity](./iterations/01-pr3-client-identity-review.md), [recovery](./iterations/01-pr4-connection-recovery-review.md), [bound views](./iterations/01-pr5-bound-surfaces-review.md), [worker relays](./iterations/01-pr6a-worker-token-relays-review.md), [telemetry and docs](./iterations/01-pr7-telemetry-and-docs-review.md).
- **What users saw:** [hands-on UX review](./iterations/01-pr1136-ux-review.md), [resulting changes](./iterations/02-ux-implementation-plan.md), [#1146 review dispositions](./iterations/02-pr1146-copilot-review.md).
- **Umbrella review:** [initial combined review](./iterations/01-pr1136-final-review.md) and [#1136 inline findings and outcomes](./iterations/02-pr1136-copilot-review.md).
- **What was simplified or deliberately kept:** [design alternatives and live runbook](./iterations/03-complexity-reduction-analysis.md), [#1149 dispositions](./iterations/03-pr1149-copilot-review.md), [scope and test cuts delivered in #1169](./iterations/04-pr1136-scope-and-test-review.md).

## Decisions index

Expand Down Expand Up @@ -228,3 +218,4 @@ See [decisions.md](./decisions.md):
| 2026-11-29 | Complexity analysis (iteration 3); decisions 0026, 0027 and 0029; 0028 proposed |
| 2026-11-30 | A2 approved (0030); package P chosen (0031–0032); implementation partially committed |
| 2026-12-01 | PR #1149 review dispositions approved (0033); follow-up implementation pending |
| 2026-12-02 | #1136 includes the #1154 review fixes and #1169 scope reductions (0036) |
Loading
Loading