Slice-7 teardown landed (ec68b1f); the whole #20 cutover is done. Collapsed
the now-complete cutover in-flight block to a COMPLETE summary + foot-gun
carry-forward, added the slice-7 Recent-decisions entry + detail file, and
flagged the two operator-gated post-ship actions (push + althing announce).
Archival drain deferred (file ~33 over soft cap; standing-posture entries
interleave the settled ones — a dedicated pass, not a milestone-checkpoint cut).
5.3 KiB
5.3 KiB
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
- Dropped
httpx-ssefrompyproject.toml+ lockfile. Slice-6 deleted its last user (sse_client.stream_admin_events); a tree grep confirmed nothing importshttpx_sse.uv syncphysically 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). - Module-boundary decision — KEEP (operator decision A1, surfaced via /elitk + AskUserQuestion).
Post-cutover
sessions.py(227 LOC) andsse_client.py(170 LOC) hold NO client — only ratatoskr's caller-semantic exception surface + a couple of dataclasses (BifrostBinding;SseId,AdminEvent) + theendpoint_for_planeprovider 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 intowt.py. Blocked by theAgentNotAvailablename collision (two distinct classes: persona-404 insessionsvs eager-turn-409 insse_client) which would force renaming a contract-level caller-semantic type + its §Error-map rows + all catch sites; folding intowt.pyalso mis-homesendpoint_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 insse_client.py; the session/tier3 exceptions +BifrostBindingstay insessions.py. - The class-identity foot-gun holds: exception homes must never be run as
__main__(else a-mCLI'sexceptbinds a second copy).sessions.py/sse_client.py/wt.pyare all safe;tier3.py/cli.pyare not.
- 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 (amended4bd9abd2026-07-18) as ratatoskr's SSE-rendering reference;first_messageNOT 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). - Final coverage-map re-anchor.
GET /sessions/{id}/tools→wt.py get_session_tools(SDKsessions.tools) →web/server.py(oldsessions.py→tui.pyrow was stale; TUI already deleted).list_sessionsre-homed towt.py, still caller-less (picker was a TUI frontier, now moot). TheLast-Event-IDSSE-resume sub-gap CLOSED —reconnect_turndeleted, resume folded intowt.py stream_turnauto-resume. Surface-2 SSE parsing re-anchored to the SDK (_envelope_for_typegone). - Stale doc-rot fix — the
cli.pytransport comment no longer callsseed_preset_first_message"not-yet-migrated hand-rolled" (it rideswt.write_authored_historysince slice-3). - 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_KEYor venv-active with those keys unset). httpx_ssegone from the venv (import httpx_sse→ ModuleNotFoundError); 0 refs inuv.lock; 0 insrc/.- Cutover contract still validates (only the expected no-FN-block warnings for a migration contract).
- No residual hand-rolled consumer HTTP paths: every
httpx.AsyncClientconstruction outsidewt.py(cli/tier3/web/entrypoint) feedswt.build_client(transport=…)per INV-CUT-1; zero raw.get/.postbypass calls. Bifrost PROVIDER planes stay hand-rolled (INV-CUT-3, untouched).
Pending (non-blocking, operator's call)
git pushorigin —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 theworldtree_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.