# worldtree-sdk cutover — SLICE-7 (teardown, the LAST slice) COMPLETE `[2026-07-19]` Commit `ec68b1f` `feat(#20): worldtree-sdk cutover teardown (slice-7) + v0.22.0`, tag **v0.22.0** (lightweight). Closes issue #20's implementation: all 7 slices done, suite **494 green**. This slice is **teardown only — zero runtime-logic change**; the green suite is the regression gate. ## What slice-7 did 1. **Dropped `httpx-sse`** from `pyproject.toml` + lockfile. Slice-6 deleted its last user (`sse_client.stream_admin_events`); a tree grep confirmed nothing imports `httpx_sse`. `uv sync` physically pruned it from the venv; suite green with the module absent (empirical safety proof — a heid bug-hunt would find nothing on a proven-unused dep removal, so it was skipped with that reasoning). 2. **Module-boundary decision — KEEP (operator decision A1, surfaced via /elitk + AskUserQuestion).** Post-cutover `sessions.py` (227 LOC) and `sse_client.py` (170 LOC) hold NO client — only ratatoskr's caller-semantic exception surface + a couple of dataclasses (`BifrostBinding`; `SseId`, `AdminEvent`) + the `endpoint_for_plane` provider helper. Three options weighed: - **A1 (chosen)** — keep as-is, fix the misleading docstrings. Zero import churn, zero risk. - A2 — rename to `session_errors.py`/`stream_errors.py`, re-point ~7 importers. Honest names but pure polish nobody asked for, right before a milestone. - A3 — consolidate into one `errors.py` / fold into `wt.py`. **Blocked** by the `AgentNotAvailable` name collision (two distinct classes: persona-404 in `sessions` vs eager-turn-409 in `sse_client`) which would force renaming a contract-level caller-semantic type + its §Error-map rows + all catch sites; folding into `wt.py` also mis-homes `endpoint_for_plane` (provider-side) and balloons the adapter. Naming-honesty (principle-2) addressed by a one-line docstring note instead. - **Resolves the slice-6 deferred item** (contract line ~326): the ratatoskr `AdminEvent`/`SseId` + exceptions stay in `sse_client.py`; the session/tier3 exceptions + `BifrostBinding` stay in `sessions.py`. - The class-identity foot-gun holds: exception homes must never be run as `__main__` (else a `-m` CLI's `except` binds a second copy). `sessions.py`/`sse_client.py`/`wt.py` are all safe; `tier3.py`/`cli.py` are not. 3. **Retired wire contracts #2 (sessions) + #15 (tier3)** — DEC-1 phase-2. Files DELETED (`docs/contracts/issues/{2,15}.contract.md`). Their normative authority transferred to the cutover contract at authoring; the code they specified is gone. **#1 (SSE event vocabulary) NOT retired** — stays current (amended `4bd9abd` 2026-07-18) as ratatoskr's SSE-rendering reference; **`first_message` NOT retired** (ratatoskr-owned usage contract). **Accepted side-effect:** `issues/5.contract.md`'s historical "amended #2/#3/#4 in-place" line now points at a deleted #2 — left as-is (frozen issue-record of a past action; NOT expanding DEC-1's #2/#15 retirement scope, which was heid-reviewed + operator-set). 4. **Final coverage-map re-anchor.** `GET /sessions/{id}/tools` → `wt.py get_session_tools` (SDK `sessions.tools`) → `web/server.py` (old `sessions.py`→`tui.py` row was stale; TUI already deleted). `list_sessions` re-homed to `wt.py`, still caller-less (picker was a TUI frontier, now moot). The `Last-Event-ID` SSE-resume sub-gap CLOSED — `reconnect_turn` deleted, resume folded into `wt.py stream_turn` auto-resume. Surface-2 SSE parsing re-anchored to the SDK (`_envelope_for_type` gone). 5. **Stale doc-rot fix** — the `cli.py` transport comment no longer calls `seed_preset_first_message` "not-yet-migrated hand-rolled" (it rides `wt.write_authored_history` since slice-3). 6. **v0.22.0** (minor, DEC-6, operator-approved 2026-07-19) — publishes the full 6-slice cutover milestone. ## Verification - Suite **494 green** (clean env: `env -u RATATOSKR_ADMIN_API_KEY -u RATATOSKR_API_KEY -u WORLDTREE_API_KEY` or venv-active with those keys unset). - `httpx_sse` gone from the venv (`import httpx_sse` → ModuleNotFoundError); 0 refs in `uv.lock`; 0 in `src/`. - Cutover contract still validates (only the expected no-FN-block warnings for a migration contract). - No residual hand-rolled consumer HTTP paths: every `httpx.AsyncClient` construction outside `wt.py` (cli/tier3/web/entrypoint) feeds `wt.build_client(transport=…)` per INV-CUT-1; zero raw `.get`/`.post` bypass calls. Bifrost PROVIDER planes stay hand-rolled (INV-CUT-3, untouched). ## Pending (non-blocking, operator's call) - `git push` origin — `ec68b1f` + the **v0.22.0 tag are LOCAL only**. - althing announce of v0.22.0 to worldtree-dev / wtsdk-dev per the SemVer push-notify (post-push; Rata is the SDK reference consumer, wt #371). ## Discovered during the slice (not bugs) - Phantom stale-LSP diagnostics flagged `test_sse_client.py` + `slice6_smoke.py` — neither exists on disk or in git (both deleted in slice-6). The in-venv 494-green suite is authoritative over Pyright, which resolves against system Python (all the `worldtree_sdk`/`starlette`/`respx` "unresolved import" noise). See per-slice arc files `[[2026-07-19-worldtree-sdk-cutover-slice-5-complete]]`, `[[2026-07-19-worldtree-sdk-cutover-slice-6-complete]]` for the earlier slices; design in auto-memory `project_worldtree_sdk_cutover`.