Presenter contract semantics amendment: stateful event coalescing + telemetry demotion #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
A 2026-05-23 mimir smoke against personal Worldtree (post-issues #5 + #6 commit
804c2df/ v0.1.0) exposed multiple presenter UX issues that materially degrade the observability surface ratatoskr is supposed to provide.Headline problem: thinking tokens render one-per-line. Worldtree streams thinking as token-deltas (just like text), but the current renderers (
cli._render_eventandtui._render_event_to_log) write[thinking] '<token>'\nper delta. A 50-token thinking phase = 50 lines of[thinking]spam.Broader scope: every demoted-telemetry event renders with the same visual weight as actual model output, drowning the load-bearing signal. Specific issues:
duration_ms=5467,usage={'prompt_tokens': ..., ...})Mission constraint
Per persistent-memory: "the product IS the observability surface; chat is the input mechanism." Suppressing events is the wrong direction. The right direction is rendering them cleanly, with editorial judgment about what's load-bearing transcript (Text / Done / Error / Cancelled) vs demoted telemetry (WorkerPhase / Thinking / TextBoundary / ToolStart / ToolResult).
A refined mission lens emerged from this smoke: "the observability surface presented at the right zoom level for the operator's task." Per-event raw streaming is the wrong zoom for normal debugging; coalesced thinking + demoted telemetry is the right zoom.
Scope
--send+ Textual TUI).Static(id="thinking-current")widget for live thinking state (chronological-in-RichLog + always-visible-in-widget = two views same data).Out of scope
--quiet,--verbose,--debug). Decision: ship flag-less; revisit if a real pipe-to-jq use case appears.Design pass
Sent the design questions to eitri-smithy-dev for a cross-frontier-model technical pass before contract authoring. Thread
01KSBE52YZR5E3SPTKA672JE43. Tactical calls (closure trigger, formatting, edge cases) will be applied directly to the contract; architectural-shape calls (mission refinement, widget yes/no, flag policy, editorial promotion line) will route through the operator.Acceptance
·prefix in cli, dim style in tui).5.5s/347ms/1.2m.Static(id="thinking-current")widget shows current thinking state, mirrors content into RichLog as chronological dimmed entries.uv run pytest tests/.uv run ruff check src/ tests/clean.Version posture
v0.1.0 → v0.2.0 (minor). Output shape changes; scripts grepping
[thinking] '<token>'would break. Pre-v1.x means breaking changes are minor.Presenter rendering polish: thinking-coalesce + telemetry demotion + formattingto Presenter contract semantics amendment: stateful event coalescing + telemetry demotionClosed — shipped. Presenter contract semantics amendment (stateful coalescing + telemetry demotion) implemented via TDD (commit
3b9c610, v0.2.0). CliPresenterState + TuiPresenterState; thinking deltas coalesce to one growing line.