Skip to content

Zed Session grouping preparation and rollout — 2026-11-01

TL;DR

The owner confirmed native routing/payloads and approved the merged Sessions rollout. The proxy-only rebuild passed the native 17-span guard, preserved all Python package versions and capture/key/env/DB state, and is deployed. Synthetic Phoenix ingestion grouped/separated Sessions correctly; fresh native two-thread UI acceptance remains pending, with no historical regrouping.

Contract

flowchart TD
    A[Existing authenticated Zed capture gate] --> B[Compare cache-key copies]
    B --> C[Valid agreeing UUID]
    B --> D[Missing, invalid or conflicting]
    C --> E[Namespaced session.id on independent root traces]
    D --> F[Capture content without session attribution]
    E --> G[Canonical-content filter for completed observations]
    F --> G
  • Native Zed 1.26.2 Agent/title/summary builders can share their owning thread's prompt_cache_key. Explicit cache overrides can change grouping; this is not authenticated thread identity. Commit generation may omit it and child threads use separate IDs, without a wire parent relationship.
  • Installed Phoenix 20.26.1 source confirmed automatic Session creation from session.id, with globally unique IDs. Namespace includes installation and project: homelab:zed:thread:<UUID>. No static session/traceparent fallback.
  • All present non-None SDK copies must validate/agree; raw explicit null is invalid. Rejected values are not promoted. Content continues through its existing privacy/identity gates; request/cache-key objects are not mutated.
  • zed.observation.kind=content identifies the dedicated observer. Completed metrics also select existing zed.event_kind=success, excluding the unchanged shared metadata observer. Failed/success slots are not a complete provider- attempt or billing ledger, and no saved Phoenix dashboard is provisioned.

Verification

The runtime unit suite passed 33 tests on ARM64 and AMD64, independently re-reviewed on both architectures. The real installed SDK/wire guard passed 17 synthetic spans, including Sol's same-thread function round trip, Luna on the same UUID, another UUID and no key. It checks original forwarded keys, final Logging carriers, independent root traces, absent fallbacks and the canonical label. No auth adapter/SDK/exporter was replaced in that guard; only provider transport is synthetic. A full local candidate image build passed its network-disabled 17-span guard, and the actual baked callback passed all 33 tests. Existing host LiteLLM regressions passed (145 run, six opt-in runtime skips), along with four Zed source contracts, four dependency-update contracts and 23 documentation tests. Markdown/source/built-site checks and strict MkDocs passed.

Validation corrected an indentation issue, a stale 14-span test expectation and an import-shadowing hazard in test invocation; final source-mount tests run from /tmp with explicit PYTHONPATH. Neither assertion removal nor relaxed deadlines was used. No packages, version pins, credentials or real chats were changed.

Approved native rollout and ingestion

After PR #574 merged, approved revision ee2385ca6034c63f7444e1f72a61b48524873ea9 was applied under the relay lock after idle/no-pending-intent checks. The host was fast-forwarded without resets/archives; observed dirty-status bytes stayed the same, not proof that live log files were frozen. A fresh validated logical backup was retained at /var/backups/postgres-logical/litellm/20261102T050817.894191Z-3689a2389c049b348f1a827cd170a117. Private matched rollback inputs/build/status/smoke reports remain at /var/lib/homelab/rollouts/litellm/zed-sessions-ee2385ca; no artifacts were deleted or relocated.

Native build passed its network-disabled 17-span guard. Package inventories were compared before/after and all versions preserved; candidate/runtime callback and config hashes matched reviewed source. Only the proxy was recreated at 2026-11-02T05:12:33.397669539Z, with image sha256:a288ab76601ec3531fa5f06f60b67c22bfdf9455f51996f219affa4a3deb27d5. Readiness passed. DB container, complete runtime env, capture gates and all stable key policies stayed unchanged; no metadata or secret update was performed.

The live callback-to-Phoenix smoke emitted six synthetic root spans, not real inference: A had two Sol calls plus a Luna helper, B a separate Sol call, and missing/invalid keys stayed ungrouped. Session GET records confirmed 3 vs 1 traces, distinct backend Session records and expected fixture-token aggregation. Canonical labels, separate trace IDs, duplicate suppression, non-Zed gate and unchanged inputs passed. No paid test request or Zed execution occurred; Python socket guard reported zero denied external attempts, not a complete egress audit. Two synthetic Sessions remain visible; old telemetry was not replayed/deleted.

An initial read-only API-schema probe exceeded 10 seconds; a bounded 25-second read succeeded. No execute/restart was retried, guard bypassed or policy changed.

A metadata-only sample of 20 recent non-synthetic content spans subsequently found 20 Sol observations with valid thread_cache_key attribution, across four Session IDs. No payload content was inspected and no raw identifier printed. This confirms real request attribution is occurring, but does not independently map those IDs to known UI threads or prove associated Luna/title grouping.

Remaining gates

Use two brand-new fixture native Zed threads, sending two turns in A and one in B. Confirm A's Sol/associated Luna calls share a Session and B differs. Existing key/URL/settings remain valid; no credential re-entry or further deployment is required. Subagent separation, resume/compaction continuity and UI presentation must be qualified without inventing parent relationships. See the Session guide for filtering/rollback. This updates existing evidence PR #573, not a new runtime change; the documentation merge is not a test/deployment gate.