control-panel observability child spec: logs (P10) — one shared logs screen, streamed in place #791

Closed
opened 2026-08-25 05:37:29 +00:00 by matou-build-agent · 2 comments

Parent

Program map: #7 — Wayfinder map: OurCloud v1 program scope (Phase 0).
Design ticket: #760 — control-panel observability: logs surface in the dashboard (wire the dropped open-logs intents) (filed from the 2026-08-24 matou-distributed-servers comparison rather than charted on the map; the map's v1 scope is what it lands inside).

Design tier this spec is written against (all present, all accepted):

  • DDR docs/adr/0203-design-the-dashboard-logs-surface-streams-in-place.md — the ruling DDR: one shared kit screen with two mounts, SSE ruled in for live logs, the --oc-term-* token port, the in-place mount, and the followable/operator-only posture.
  • Flow docs/ux/flows/p10-logs.mermaid (+ the one new p5-monitoring.mermaid edge S3 → P10-S1; the other emitters already carry ADR 0027's standing affordance and are not re-drawn).
  • Wireframes docs/ux/wireframes/p10-logs/ — p10-e1-entry-points, p10-s1-logs-streaming, p10-s1x-stream-lost, p10-s2-paused-still-watching, p10-s0x-nothing-followable. Their data-field / data-action / data-status attributes are the stable element-ID contract every acceptance criterion below is written against. (E1 depicts two existing screens to show the edge — design-verify matches those elements against their own wireframes, not against E1.)
  • Vocabulary CONTEXT.md — Log target, Log scope, Follow (Language) and Logs surface (P10) object-states (Design nouns), merged with the arc.
  • Consumed from the sibling — OcStatusDot and the shared grading constants are minted by DDR 0202 / spec #769 (stories 35–36 there) and referenced here, never re-minted.

Siblings in the same observability arc (each specs separately, then all fan in at one /slice-map, #770): #759 device telemetry (specced, #769), #761 network, #762 replication matrix, #763 activity feed, #764 topology map (deferred).

Problem Statement

The dashboard already offers the operator controls that do nothing. ADR 0027 promises a logs escalation path on every deploy, monitoring and rescue surface, and the surfaces keep that promise on their own side: ServiceDetailScreen, FixDidntHoldScreen, UpdatesScreen and the P4 setup surfaces all render Open logs / Download logs and emit open-logs / download-logs. DashboardComposition binds only @route. The emits are silently dropped — ServicesSurface re-emits them into nothing, and FleetSurface / SettingsSurface translate them into PendingRoutes that park.

So the operator clicks Open logs on a service that has been down for four minutes and the panel does not react at all. That is worse than having no control: a dead control teaches the operator that the panel is unreliable, exactly at the moment they were escalating. And it is invisible to the panel's own tests, because a dropped emit is not a failure anywhere.

Underneath the dead control is a real absence. The A5 logs viewer exists only in the operator app (app/src/components/shell/LogsViewer.vue, wireframe shell/shell-a5-logs-viewer.html); the served dashboard has no logs surface at all. So the panel's most-used seat cannot answer what is this service actually saying right now — the operator's honest options are to walk to the app, or to SSH in, which is precisely what a low-skill, low-time operator will not do.

There is also nothing in the dashboard that can be followed. Every dashboard read today is a re-read on a cadence, which is right for projections and wrong for logs: the whole value of a log during a deploy or an outage is that the next line arrives while you are looking at it. Polling a log either misses lines or hammers the gateway, and neither failure is visible to the operator.

Finally, the panel has no honest way to say the log stream broke. A live tail that quietly stops is the worst failure mode there is — a stale scroll under a live indicator, which DDR 0096 exists to forbid, and which nothing today prevents because there is no stream.

Solution

One logs surface, shared by both seats, mounted where the operator already is — and streaming, honestly.

Four things land:

  1. One kit LogsScreen, two mounts (the CodesLedgerScreen A4/DF2 precedent). The screen owns the controls — scope, search, level chips, pause/resume, download — and the terminal panel; the feed is a seam-injected source with two faces. The app mounts it over its existing bounded operation-log read (A5's contract unchanged); the dashboard mounts it over the live stream source, which alone renders the stream-lifecycle chrome. A static feed is always complete, so streaming / stream lost / paused never appear on A5. Rejected: a second bespoke dashboard viewer — two idioms for one cross-cutting promise is the exact drift ADR 0027 exists to prevent.

  2. SSE is ruled in, scoped to logs. The control plane gains a log-stream hub (the prototype's internal/logstream mechanics ported: ref-counted follows, tail 200 on subscribe, a 200 lines/s per-target cap, a 2000-line ring for instant backlog, drop-oldest for slow subscribers) behind one SSE endpoint — EventSource, one-directional, plain HTTP through the front door's gate, auto-reconnecting, no WebSocket upgrade machinery. Client guards ride with it: a 2000-line client ring, a 120 ms batched flush, a 400-line render cap, a 5-minute idle auto-pause with the "Still watching?" resume, and a document.hidden pause that auto-resumes on visible. The provisionClient.ts "no SSE/WebSocket" line stays true of provisioning's projection reads; it was never a global rule, and logs are its inverse.

  3. The intent lands in place, and the tab set stays closed. DashboardComposition binds open-logs / download-logs and mounts the logs screen over whichever tab's screen emitted it, scoped to the emitter's log targets, with Back returning to the emitting screen and its place held. No seventh tab (ADR 0094), no route of its own, no standing entry anywhere — an operator is led to logs by an emitting surface, never left to find them (the DDR 0101 §3 rescue posture). download-logs mounts nothing: it fetches the bounded artifact for the same scope as a direct browser download.

  4. The --oc-term-* vocabulary ports into the kit — six presentation tokens (bg, ink, dim, ok, warn, err) declared once at the base layer, product language and never community brand (the ADR 0122 split; the palette seam is untouched). The terminal panel is deliberately dark in both themes, so only --oc-term-bg ever varies per theme.

What is followable is the control plane's answer, not the surface's guess. A log scope names what the surface follows — an operation log, a service, a node, or a subject reference — and the control plane resolves it server-side to log targets and answers "what is followable right now" as one catalogue read. That single contract is what makes the four object-states honest:

  • streaming — live, with the bounds stated in the meta line (follows held, tail kept, lines shown) rather than implied (P10-S1).
  • stream lost — the follow dropped mid-stream: the tail freezes, is dimmed and end-marked, and a banner names the loss moment and the automatic reconnect. Never a stale scroll under a live dot (DDR 0096), never a toast (P10-S1x).
  • paused — the idle "Still watching?", the hidden tab, or the operator's own Pause. Deliberate; nothing failed; never dressed as lost and never as live (P10-S2). The hidden-tab pause has no resting frame — it resumes by itself.
  • nothing followable — the empty scope names why it resolved to no target and offers the real catalogue, one pick away from streaming. Never a blank terminal (P10-S0x).

Level filtering is honest. Operation logs carry structured levels (A5's LogEntry.level) and the chips filter authoritatively; raw service lines carry none, so there the chips are a named text-match heuristic — never presented as monitoring's classification. Severity stays monitoring's word.

The whole surface — stream endpoint included — sits behind the community door, operators only (DDR 0172). No public tier exists, so no redaction tier is needed; the secrets-never-enter-logs-by-construction rule stands unchanged.

User Stories

A — The dropped intents get an answer (edges ENTRY → P10-S1 / P10-S0x)

  1. As an operator, I want Open logs to actually open logs wherever it is offered, so that a control the panel renders is never dead.

    • Given any emitting screen that renders data-action="open-logs" — monitoring's P5-S3 / S4x, provisioning's P4-S4 / S5 / S5x, updates' P4b-U1 / U3 / U4 / U4x, the mail readiness pair MAIL-S1 / S1x — When the operator activates it, Then the shell mounts the logs screen scoped to that emitter's log scope (edge ENTRY → P10-S1).
    • Given the dashboard composition, Then it binds @open-logs and @download-logs alongside @route on every mounted surface — no surface's logs emit reaches a component that does not listen for it.
    • Given a regression test over the composition, Then activating open-logs on each emitting surface is asserted to mount the logs screen — the dropped-emit failure is caught by a test, not by an operator.
  2. As an operator, I want every surface's logs control to behave identically, so that I learn one thing once.

    • Given the three shapes in the tree today — a raw open-logs emit (ServicesSurface), a route intent open-logs-<id> (SettingsSurface) and a route intent open-log-<id> (FleetSurface) — Then all three converge on one intent-with-scope shape, and FleetSurface's PendingRoute translation for logs is removed rather than left parking.
    • Given the convergence, Then an emitter passes the log-scope reference it already carries (service/chat, device/rimu, log-mm94, log-deploy-kauri-…) unchanged — no emitting screen learns a new payload shape, and no emitter resolves targets itself.
  3. As an operator, I want opening logs for something with nothing to follow to land on a named state, so that an empty scope is designed rather than defaulted.

    • Given an emitter whose scope resolves to no log target (a service with no running unit yet, an operation log that has aged out), When the operator activates open-logs, Then P10-S0x renders (edge ENTRY → P10-S0x) — never an empty terminal and never a silent no-op.
  4. As an operator, I want Download logs to hand me a file without navigating me anywhere, so that gathering evidence never costs me my place.

    • Given any surface offering data-action="download-logs", When the operator activates it, Then the bounded log artifact for that same scope downloads directly and no screen is mounted (the S1 self-edge annotation) — the current screen, streaming or otherwise, is untouched.
    • Given download-logs activated from the logs screen itself while streaming, Then the stream keeps running through the download.

B — Streaming (P10-S1)

  1. As an operator, I want to see the log lines arriving live, so that I can watch what the fleet is doing right now.

    • Given a scope resolving to at least one live log target, When the logs screen mounts, Then data-field="log-stream" carries data-status="streaming" and renders the lines the hub sends, newest last, each line carrying its timestamp, its source (target) and its message.
    • Given the mount, Then the hub's tail (the last 200 lines) is rendered immediately as backlog — the operator never opens onto an empty panel waiting for the next line.
  2. As an operator, I want the standing line above the terminal to always tell me the truth about the stream, so that I never have to infer liveness from motion.

    • Given streaming, Then data-field="stream-standing" carries data-status="streaming", an indicator dot in the healthy tone (DDR 0202's OcStatusDot, referenced not re-minted), and the scope's name.
    • Given any of the four object-states, Then the standing line is present and its data-status is the state — streaming / stream-lost / paused-idle; the surface never renders a terminal panel with no standing line above it.
  3. As an operator, I want the surface to state its own bounds, so that I know what I am and am not being shown.

    • Given streaming, Then data-field="stream-meta" states the honest bounds in plain words — that it is live, how many follows are held, how many lines are kept, and how many are shown (the wireframe's "live · 2 follows · last 200 lines kept · newest 400 shown").
    • Given the bounds, Then they are read from the running configuration, not hard-coded copy: changing the render cap changes the meta line.
  4. As an operator, I want the terminal to stay readable under a fast stream, so that a busy service does not make the panel useless.

    • Given lines arriving faster than the eye, Then the client batches renders on a 120 ms flush, holds at most 2000 lines in its ring (drop-oldest), and renders at most the newest 400 — and the surface stays responsive to scroll, search and every control throughout.
    • Given the render cap, Then it is stated in the meta line (story 7) rather than silently truncating.
  5. As an operator, I want log lines to look like log lines and still belong to this product, so that the panel reads as one system.

    • Given the terminal panel, Then every colour it renders is an --oc-term-* token (story 38) — no raw hex is emitted by the component — and log lines render at the mono secondary size (≈0.85rem, line-height ≈1.65) per the ADR 0122 type-scale amendment, never the prototype's 11.5px nor the artboard's .72rem.
    • Given timestamps and sources, Then they render in --oc-term-dim; success lines in --oc-term-ok, warnings in --oc-term-warn, errors in --oc-term-err.

C — Scope, search and level filtering (P10-S1 self-edges)

  1. As an operator, I want to see what I am following and change it without leaving, so that I can chase a problem across targets.

    • Given streaming, Then data-field="log-scope" names the current scope and how many targets it resolved to ("Following: Chat — 2 units").
    • Given the scope control, When the operator picks another followable target — a service unit, a node, an operation log — Then the surface re-scopes in place and keeps streaming (the S1 → S1 re-scope self-edge): the old follows are released, the new ones subscribe with their tail, and no screen change occurs.
    • Given the scope control's list, Then it is the control plane's catalogue read verbatim — the same answer S0x offers (story 30) — and the surface computes no candidate list of its own.
  2. As an operator, I want to search the lines I am looking at, so that I can find the one that matters in a fast stream.

    • Given data-field="log-search" with text entered, Then only matching lines render, the stream keeps arriving behind the filter, and clearing the search restores the full retained ring — the filter never discards lines from the ring.
  3. As an operator, I want level filtering that is honest about what it can know, so that I never mistake a text match for a classification.

    • Given an operation log (lines carrying a structured level), When the operator toggles data-action="filter-info" | "filter-warn" | "filter-error", Then the filter applies to the line's own level authoritatively.
    • Given a service-unit target (raw lines with no structured level), Then the same chips apply a named text-match heuristic and the surface says so where the chips live — it is never presented as monitoring's severity, and no line is assigned a level it does not carry.
    • Given a mixed scope (an operation log and a service unit followed together), Then each line is filtered by its own kind's rule; the surface does not fabricate levels for the unlevelled half.
  4. As an operator, I want to stop the stream myself when I want to read, so that I am not fighting the scroll.

    • Given streaming, When the operator activates data-action="pause-stream", Then the surface enters paused on the P10-S2 frame with its copy reading as the operator's own act ("paused — you paused the stream"), and the follows are released.
    • Given the operator's own pause, Then it is the same state and the same frame as the idle pause (story 22), differing only in the copy — no second paused implementation exists.

D — Stream lost (P10-S1x; edges P10-S1 → P10-S1x → P10-S1 / ENTRY)

  1. As an operator, I want a broken stream to be a rendered, named state, so that I am never reassured by lines that stopped arriving.

    • Given the follow drops mid-stream (the gateway or the hub stops answering), Then data-field="stream-standing" carries data-status="stream-lost" with the indicator in the warning tone, data-field="stream-meta" reads that nothing shown below is current, and data-field="stream-lost-banner" (data-status="reconnecting") names the wall-clock moment of the loss and states that reconnection is automatic.
    • Given stream lost, Then the loss is never a toast, never a spinner, and never a silently retried green dot.
  2. As an operator, I want the lines that did arrive to stay readable, so that I keep the evidence I was reading.

    • Given stream lost, Then data-field="log-stream" carries data-status="stale", the retained tail stays rendered and scrollable, is visibly dimmed, and ends with an explicit end-mark ("— stream lost here —") — the tail is frozen at the last received line, not cleared and not appended to.
  3. As an operator, I want the stream to come back by itself, so that recovery costs me nothing.

    • Given stream lost, When the control plane answers again, Then the client reconnects on its own (the EventSource retry), backfills from the hub's ring so the lines missed during the gap appear in order, the stale mark and the banner clear, and the surface returns to streaming (edge P10-S1x → P10-S1) — with no operator act required.
    • Given the backfill, Then lines already rendered are not duplicated.
  4. As an operator, I want a lost stream told apart from a lost community, so that one failure is not dressed as another.

    • Given the whole panel loses the community (the reachability probe fails), Then the dashboard's existing unreachable state (DX) takes over the frame and the stream-lost banner is not the surface that speaks — the two failures keep their own vocabularies (DDR 0096).
  5. As an operator, I want to be able to walk away from a lost stream, so that a broken surface is never a trap.

    • Given stream lost, When the operator activates data-action="back-to-emitter", Then the emitting screen returns with its place held (edge P10-S1x → ENTRY) and any residual follow is released.

E — Paused (P10-S2; edges P10-S1 → P10-S2 → P10-S1 / ENTRY)

  1. As an operator, I want a forgotten tab to stop making the fleet work, so that leaving a log open overnight costs nothing.

    • Given streaming with 5 minutes and no operator act, Then the surface pauses: the follows are released, data-field="stream-standing" carries data-status="paused-idle" with the indicator in the warning tone, and data-field="idle-prompt" (data-status="paused-idle") asks "Still watching?" and states plainly why it paused.
    • Given the idle budget, Then it is a system-defined 5 minutes, not an operator setting anywhere in the panel.
  2. As an operator, I want paused to look nothing like broken, so that I do not go looking for a fault that does not exist.

    • Given paused, Then data-field="log-stream" carries data-status="paused", the tail is end-marked "— paused here — resume to keep following —", and nothing on the frame names a failure — paused is deliberate, and the copy says so.
    • Given paused and stream lost, Then the two are never conflated: paused releases follows on purpose; lost is a follow that dropped.
  3. As an operator, I want one act to resume, so that coming back is trivial.

    • Given paused, When the operator activates data-action="resume-stream", Then the follows re-subscribe, the hub's ring backfills the gap, the idle prompt clears, and the surface returns to streaming (edge P10-S2 → P10-S1).
    • Given the resume, Then the idle timer restarts from that act.
  4. As an operator, I want a hidden tab to pause and come back on its own, so that switching tabs is not a decision.

    • Given streaming, When document.hidden becomes true, Then the follows are released; When the tab becomes visible again, Then they resume and backfill by themselves — the operator never sees a resting frame for the hidden-tab pause (it has no screen in the flow).
    • Given a tab hidden for longer than the idle budget, Then becoming visible again rests on the idle prompt rather than resuming silently — the operator is asked, because they were away.
  5. As an operator, I want leaving a paused surface to be clean, so that nothing is left holding resources.

    • Given paused, When the operator activates data-action="back-to-emitter", Then the emitting screen returns with its place held (edge P10-S2 → ENTRY), the idle timer is cleared and no follow remains open.

F — Nothing followable (P10-S0x; edges ENTRY → P10-S0x, P10-S0x → P10-S1 / ENTRY)

  1. As an operator, I want an empty scope to tell me why it is empty, so that "nothing here" is an answer rather than a blank.

    • Given a scope that resolves to no log target, Then data-field="no-targets-reason" names the reason in plain words tied to the subject ("Files has no running unit on any node yet — there is no live log to stream. A deploy that has run keeps its operation log; this service hasn't deployed."), and no terminal panel is rendered.
    • Given the reason, Then it is the control plane's answer for that scope, not a generic string the surface picks — a not-yet-deployed service, a node with no units, and an aged-out operation log each read differently.
  2. As an operator, I want to be shown what I can follow, so that an empty scope is never a dead end.

    • Given P10-S0x, Then data-field="followable-targets" lists the catalogue's real answer, each row naming the target, its kind (service unit — live / operation log — finished, replayable) and its node, with data-action="follow-target".
    • Given any offered row, When the operator activates it, Then the logs screen re-scopes to that target and streams (edge P10-S0x → P10-S1) — or, for a finished operation log, replays it bounded start-to-now.
    • Given a fleet where nothing at all is followable, Then the list says so in the same honest voice rather than rendering an empty list (the never-empty spirit, DDR 0095).
  3. As an operator, I want to leave an empty scope the same way I leave every other logs frame, so that Back means one thing.

    • Given P10-S0x, When the operator activates data-action="back-to-emitter", Then the emitting screen returns with its place held (edge P10-S0x → ENTRY).

G — Where the surface lives (the in-place mount, all frames)

  1. As an operator, I want looking at logs to keep me where I was, so that escalating never loses my place.

    • Given the logs screen mounted from any emitter, Then it renders in place over the emitting tab's screen (the SetupSurface-on-Fleet drill-in pattern, DDR 0101 §1 / DDR 0109), the selected tab does not change, the browser URL does not change, no seventh tab appears (ADR 0094), and no modal is used.
    • Given Back from any logs frame, Then the emitting screen resumes with its own state intact — its scroll, its open drill-in, its selection — because no tab change ever happened.
  2. As an operator, I want logs to have no standing home, so that I am always led there by something that had a reason.

    • Given the whole dashboard chrome, Then there is no standing menu entry, tab, or link to the logs surface anywhere (the DDR 0101 §3 rescue posture) — it is reachable only by an emitter's intent.
  3. As a maintainer, I want shell to own the one binding, so that no feature grows a private logs panel.

    • Given the composition, Then the logs mount is shell's — one binding answering every emitter (the same owner as the app's A5 shell screen, ADR 0097's table) — and no feature surface hosts a logs panel of its own.
    • Given ADR 0097, Then hosting a cross-cutting surface at the current mount is not shell running a feature journey: shell mounts and routes, and computes nothing about the logs themselves.
  4. As a maintainer, I want a single catalogue read behind both the scope control and the empty state, so that two frames can never disagree about what is followable.

    • Given S1's scope control (story 10) and S0x's offer list (story 25), Then both render the same control-plane catalogue read verbatim — one contract, two renderings, no client-side resolution in either.

H — The shared kit screen and its two mounts

  1. As a maintainer, I want one logs screen in the kit, so that the app and the dashboard cannot drift apart.

    • Given the kit, Then it exports a LogsScreen owning the controls (scope, search, level chips, pause/resume, download) and the terminal panel, with the feed injected as a source — exactly the CodesLedgerScreen shared-screen shape (A4 / DF2, issue #36).
    • Given the screen, Then it holds no store, opens no transport of its own, and reads only its injected source (ADR 0097).
  2. As an operator of the app, I want A5 to keep working exactly as it does, so that folding it into the kit costs me nothing.

    • Given the app's A5 mount over its bounded operation-log read, Then its existing behaviour is preserved — the operation filter, the search, the level chips and Download bundle — and its existing tests keep passing against the folded screen.
    • Given a static (complete) feed, Then the stream-lifecycle chrome never renders: no standing dot, no meta line bounds, no pause, no idle prompt, no stream-lost banner. A bounded log is always complete, and A5 never learns a stream vocabulary.
  3. As a maintainer, I want the two faces to be one seam, so that a third mount is cheap and a second implementation is impossible.

    • Given the injected feed source, Then it has exactly two faces — a bounded face (an operation log's lines, complete) and a live-stream face (subscribe / lines / lifecycle / release) — and the screen renders the lifecycle chrome only when the source presents the live face.
    • Given a test, Then every P10 state is drivable through a hand-written fake source with no browser, no server and no timer of the component's own invention.
  4. As the activity feed (#763, DDR 0206), I want to embed the tail without the surface chrome, so that my chronology stays visible beside it.

    • Given P12-S5, Then it embeds the scoped-tail face of this same LogsScreen — the terminal panel with its streaming / paused / stream-lost states, without the full surface's controls chrome — re-scoped by the feed's selected event through the same log-scope contract (a subject-kind scope resolved server-side).
    • Given the embed, Then it is the same kit component, not a variant reader: no second log reader exists in the product by either door.
    • Note: the face is provided and tested here; building P12-S5 is #763's, gated on this slice landing.

I — The control plane: the log-stream hub, the catalogue, the routes

  1. As a maintainer, I want one hub multiplexing every follow, so that ten watchers of one service cost one follow.

    • Given N subscribers on the same log target, Then the hub holds one underlying follow, ref-counted, and releases it when the last subscriber leaves — a subscriber leaving never interrupts the others.
    • Given a new subscriber, Then it receives the target's tail of 200 lines immediately from the ring, then live lines.
    • Given a target producing faster than 200 lines/s, Then the hub caps at that rate per target rather than flooding every subscriber.
    • Given the hub's per-target 2000-line ring, Then it is drop-oldest, and it is what a reconnecting or resuming client backfills from (stories 16, 21, 22).
    • Given a slow subscriber, Then the hub drops lines for that subscriber rather than blocking the target or any other subscriber.
  2. As a maintainer, I want the followable catalogue answered server-side, so that no surface guesses at the fleet's shape.

    • Given a log scope (an operation log, a service, a node, or a subject reference), Then the control plane resolves it to zero or more log targets, each carrying its name, kind (operation log / service unit), node and whether it is live or finished-and-replayable.
    • Given a scope resolving to zero targets, Then the response carries the reason (story 24) — the empty answer is a stated one, not an empty array the client must interpret.
    • Given the catalogue read, Then it is the one answer both S1's scope control and S0x's offer list render (story 30).
  3. As an operator, I want logs to be as locked as the rest of the panel, so that the escalation path is not the weak door.

    • Given the SSE stream route, the catalogue read and the bounded download, Then all three sit behind the community door, operators only (DDR 0172): EventSource rides the same community session cookie and the gateway's forward_auth covers the SSE route like any admin route.
    • Given an unauthenticated or non-operator caller, Then the stream route refuses exactly as every other admin route does, and no line is emitted.
    • Given the operator-only posture, Then no redaction tier is built — there is no public tier to redact for — and the secrets-never-enter-logs-by-construction rule is unchanged.
  4. As a maintainer, I want the terminal vocabulary owned by the kit, so that the panel's dark surface is a token decision and not a component's opinion.

    • Given the kit's base layer :root, Then it declares --oc-term-bg (#253D39), --oc-term-ink (#E9F0EE), --oc-term-dim (#9AC7BF), --oc-term-ok (#9fd6ae), --oc-term-warn (#ffd9a0) and --oc-term-err (#f0a49c).
    • Given the ADR 0122 token split, Then these are product-language presentation tokens, never community-brand tokens: the palette seam is untouched and a community's brand kit cannot re-point them.
    • Given both themes, Then the panel is deliberately dark in each, so only --oc-term-bg carries a theme variant (re-pointed to #1c2f2b when the dark-mode slice lands); the inner five need none.
  5. As a maintainer, I want the transport contract stated where every other one is, so that logs are not a side door.

    • Given the OpenAPI spec, Then it grows the followable-targets catalogue read, the SSE stream route and the bounded log download, with wire fields snake_case camelised at the client boundary (standards wire-snake-case, #126); the catalogue read and the download go through the generated client (ADR 0037) — no hand-rolled fetch.
    • Given the stream, Then the one deliberate exception is stated: a browser EventSource is not a generated-client call, so it lives behind the live-stream feed source seam and nowhere else — exactly one place in the tree constructs an EventSource, and the tests drive a fake of it.
    • Given LogRef, Then it is unchanged — today's emitters keep the handle they already carry (story 2).
  6. As a maintainer, I want SSE scoped to logs alone, so that one live surface does not become a new global cadence.

    • Given every other dashboard read, Then it keeps its existing re-read cadence — no projection is converted to push by this spec.
    • Given the hub, Then it is a component of the control plane's own process with no new port and no new ingress surface: one route through the existing front door.

Implementation Decisions

Seams — two grown, one minted, and the minted one is the highest available

  • The kit LogsScreen's injected feed source is the primary seam, and it is the only new one. One interface with two faces (bounded / live-stream), consumed by both mounts. Rejected: a dashboard-only viewer with its own store (two idioms), and a per-face pair of screens (the lifecycle chrome would be duplicated at exactly the point it must not drift).
  • The Go logstream hub is seamed at its follow function — the prototype's FollowFunc shape: the hub is constructed over "give me a follow on this target", so its multiplexing, ref-counting, tail, rate cap, ring and drop-oldest are all provable against a fake follow with no containers, no units and no fleet. This is the port's load-bearing seam and its tests come across as prior art.
  • The catalogue read is a thin projection over the owners (fleet store × the service catalogue × the operation-log store), re-deriving nothing and mapping faults to the shared Problem body, exactly as the existing Fleet route does. Scope → targets resolution lives here and nowhere else.
  • The dashboard's live-stream source is the only EventSource construction site. It owns reconnect, backfill, the client ring, the batched flush, the render cap, the idle timer and the visibility listener; the screen sees only the face. This is what makes stories 8, 16, 19, 21 and 22 testable without a browser.
  • DashboardComposition binds the intents and hosts the mount. The overlay is composed at the current mount, so no router change and no tab-table change is needed; FleetSurface's and SettingsSurface's logs-shaped route translations are removed in favour of the direct emits.

Surface

  • Client pattern is the house one: an injected source, the shared async guard (useAsyncGuard) for the catalogue read and the download, and no component-invented setInterval. The stream's own timers (flush, idle) belong to the source, are cleared on release, and are injectable in tests.
  • Every P10 frame's data-field / data-action / data-status attributes are the built contract, carried verbatim from the wireframes so design-verify can check the shipped UI against them.
  • The indicator dot is OcStatusDot (DDR 0202 / #769 story 35) in healthy / warning / muted tones — referenced, never re-minted, and never a third colour for lost: lost is warning plus a named banner, not a new hue (the arc's no-red rule).
  • Shell composes and computes nothing (ADR 0097): it renders the source's state verbatim. The one thing it owns is where the surface mounts.

The stream

  • SSE, not WebSocket: one-directional, plain HTTP, auto-reconnecting, passes the front door's gate as an ordinary route. The client never sends up the socket — re-scoping opens a new subscription rather than negotiating on an open one.
  • Bounds are configuration, not constants scattered through components: tail 200, 200 lines/s per target, 2000-line hub ring, 2000-line client ring, 120 ms flush, 400-line render cap, 5-minute idle. The meta line reads them (story 7).
  • Backfill is the ring's job, not the client's: a reconnecting or resuming subscriber is served from the hub's ring, which is why stories 16/21/22 can promise "the gap fills in order" without the client remembering anything but its last line.
  • Not adopted from the prototype: its Pinia store, its short-name keyspace, its container-as-service model, its micro type sizes, and its IP-visibility gating. What transfers is the hub's mechanics and the client's guard set.

The kit

  • LogsScreen + six --oc-term-* tokens. All visuals express as --oc-* tokens (ADR 0122); zero raw hex in components stands.
  • The app's A5 becomes a mount of the kit screen — its contract preserved, its implementation moved. buildBundle / filterLogs and the LogEntry / LogScope / LogBundle types stay the app's bounded-face detail; the screen learns nothing app-specific.

Testing Decisions

A good test states externally-observable behaviour at a seam and never reaches into implementation detail. Five seams, one new (the kit screen's feed source) — the rest are pre-existing:

  1. The kit component seam (the primary one). LogsScreen driven against a hand-written fake feed source, asserting on the wireframes' data-field / data-action / data-status contract. This is where every object-state is proven: streaming, stream lost (frozen + dimmed + end-marked + banner naming the moment), paused (idle, operator's own, and the copy difference), nothing followable (reason + catalogue + pick-to-stream), the standing line's always-present truth, the meta line's bounds, the honest level filtering on both kinds of target, the bounded face rendering no lifecycle chrome, and the scoped-tail face. Prior art: the CodesLedgerScreen shared-screen tests, monitoringDrillIn.test.ts, surfaceFaultFrame.test.ts.
  2. The dashboard stream-source seam. The live-stream source driven against a fake EventSource: first lines render, a drop enters stream lost, reconnect backfills without duplicates, the client ring caps at 2000 drop-oldest, the flush batches at 120 ms, the render cap holds at 400, the idle timer pauses at 5 minutes and releases follows, resume re-subscribes and backfills, document.hidden pauses and visible resumes, and a hidden span longer than the idle budget rests on the prompt. All timers injected — no real waiting.
  3. The composition seam (the regression this ticket exists for). The dashboard composition asserted to mount the logs screen when each emitting surface emits open-logs, and to download without mounting on download-logs; Back returns to the emitting screen with its state intact; no tab change and no URL change occurs; no logs-shaped PendingRoute is left parked. Prior art: the existing composition/mount-registry tests and fleet.test.ts.
  4. The Go hub seam. The hub at its follow function: N subscribers share one follow, ref-count releases on the last leave, tail-on-subscribe delivers 200, the rate cap holds at 200 lines/s, the ring is 2000 drop-oldest, a slow subscriber drops lines without blocking others, and a follow that errors surfaces as a stream end rather than a hang. Prior art: the prototype's hub_test / demux_test / follow_test port, plus monitor_test.go's shape.
  5. The transport seam. Integration tests for the catalogue read (a scope resolving to N targets; a scope resolving to zero with its reason; an owner fault mapping to the shared Problem body), the SSE route (an authenticated operator receives events; an unauthenticated caller is refused and no line is emitted; the response is a well-formed event stream), and the bounded download. Prior art: fleet_integration_test.go, authgate_test.go, fleetLive.test.ts.

Two cross-cutting checks ride existing harnesses rather than new ones: the theming contract tests (the six --oc-term-* tokens exist at the base layer, are product-language not brand, and no component emits raw hex — ADR 0122), and the app A5 regression suite kept green against the folded screen (story 32).

Out of Scope

  • Log retention and history search beyond the hub's ring and the bounded operation logs. There is no log store, no index and no time-range query in v1.
  • Log-based alerting. Whether a log line raises anything is monitoring's, against monitoring's own rules.
  • Custom multi-target sets beyond scope resolution and the catalogue's offered targets — no operator-composed target baskets.
  • Dropped-line detection for slow clients. The bounds are stated honestly in the meta line instead; counting what was dropped is a later refinement.
  • The kit's dark-mode terminal re-point (--oc-term-bg → #1c2f2b) — it rides the dark-mode slice, ADR 0122.
  • A member-facing logs tier and any redaction. The panel is operators-only behind the community door (DDR 0172); P10 inherits that whole.
  • The activity feed's P12-S5 pairing. The scoped-tail face is built and tested here; using it beside the feed's chronology is #763's.
  • Converting any other dashboard read to push. SSE is scoped to logs (story 40).
  • A new agent, port or ingress surface. The hub is a component of the control plane behind the existing front door.
  • The other observability siblings' surfaces — telemetry (#759, specced as #769), network (#761), replication matrix (#762), activity feed (#763), topology map (#764, deferred).

Further Notes

Vertical slices (named for the fan-in /slice-map, #770)

  1. ui-kit:term-tokens — the six --oc-term-* presentation tokens at the base layer, plus the theming-contract assertion. No dependencies; a leaf root.
  2. logstream:hub — the Go log-stream hub behind its follow-function seam: ref-counted multiplexed follows, tail 200, the 200 lines/s cap, the 2000-line drop-oldest ring, slow-subscriber drop. No dependencies.
  3. transport:log-catalogue — scope → log-target resolution and the followable-targets read, with the stated reason for an empty answer (OpenAPI + handler + generated client). Depends on 2.
  4. transport:log-stream-sse — the SSE route and the bounded log download, both behind the community door's forward_auth. Depends on 2.
  5. ui-kit:logs-screen — the shared LogsScreen over its injected feed source (controls, terminal panel, the four states, the scoped-tail face), and the app's A5 folded onto it. Depends on 1 and on #769's ui-kit:telemetry-primitives (for OcStatusDot).
  6. dashboard:log-stream-source — the live-stream feed source: EventSource, reconnect + backfill, client ring, batched flush, render cap, idle pause, visibility pause. Depends on 4 and 5.
  7. shell:logs-intent-mount — DashboardComposition binds open-logs / download-logs, hosts the in-place mount, and the three emit shapes converge; FleetSurface's logs PendingRoute is removed. Depends on 3, 5 and 6.

Cross-arc notes for the fan-in: slice 5 blocks #763's P12-S5 (DDR 0206 gates that frame on this DDR); slice 1's tokens are consumed by nothing else in the arc; OcStatusDot from #769's slice 1 is a shared root for this feature too. Slice 7 is the one that actually closes this ticket's named gap — the dropped intents — and it is the last one, by construction.

The DDR's three open gates (veto-open, not blocking)

DDR 0203 is accepted with three decisions held open for Ben under the ADR 0174 posture — each has a proposed default that this spec is written against, and the veto is asynchronous:

  • G1 — the kit share rewires A5 (default: share; one idiom for one promise, the ticket's preferred position). A veto retires stories 31–34 and slice 5 in favour of a dashboard-only screen; the states, the seam shape and every control-plane story are unchanged, and P12-S5 would then need its own answer.
  • G2 — SSE adds a standing control-plane component (default: SSE in, scoped to logs). This is the nearest thing here to a one-way door, though the endpoint is replaceable behind the feed-source seam. A veto retires stories 5–8, 14–23, 35 and 40 and slices 2, 4 and 6, leaving a bounded-replay-only surface — the surface would still exist and the dropped intents would still be wired.
  • G3 — the idle-pause budget is 5 minutes (the prototype's). Taste; a veto changes one configured number and the copy that reads it, nothing else.

This spec is ruled clear of the D1 placement cluster. D1 governs the new tabless drill-in grammar and Overview's RECENT ACTIVITY row (DDRs 0204 / 0206). P10 introduces neither: it mounts on the already-ruled in-place pattern (DDR 0101 §1 / DDR 0109, the SetupSurface-on-Fleet drill-in) and takes its no-standing-entry posture from the already-ruled DDR 0101 §3. Nothing in this spec turns on D1, so it can be sliced now — the same reasoning that cleared #769.

Implementation-time notes

  • The prototype (matou-distributed-servers, roles/admin_dashboard/ + Go internal/logstream/) is a reference for mechanics only. Its styling is a drifted fork of the same Mātou visual language; nothing visual transfers, and every colour re-encodes as an --oc-* token (ADR 0122).
  • docs/ux/flows/p5-monitoring.mermaid already carries the one new S3 → P10-S1 edge (landed with the design tier); the other emitters' flows carry ADR 0027's standing affordance and are not re-drawn — slice 7's tests are what prove those edges, not new diagram nodes.
  • CONTEXT.md rules the copy: say log target, log scope, follow, logs surface, streaming, stream lost, paused, nothing followable. Never container, log source, tail, watch, console, live view, disconnected, or offline for a stream.

Produced by /to-spec in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #760.

## Parent Program map: [#7 — Wayfinder map: OurCloud v1 program scope (Phase 0)](https://git.matou.nz/Matou/idss/issues/7). Design ticket: [#760 — control-panel observability: logs surface in the dashboard (wire the dropped open-logs intents)](https://git.matou.nz/Matou/idss/issues/760) (filed from the 2026-08-24 `matou-distributed-servers` comparison rather than charted on the map; the map's v1 scope is what it lands inside). Design tier this spec is written against (all present, all `accepted`): - **DDR** [`docs/adr/0203-design-the-dashboard-logs-surface-streams-in-place.md`](https://git.matou.nz/Matou/idss/src/branch/main/docs/adr/0203-design-the-dashboard-logs-surface-streams-in-place.md) — the ruling DDR: one shared kit screen with two mounts, SSE ruled in for live logs, the `--oc-term-*` token port, the in-place mount, and the followable/operator-only posture. - **Flow** `docs/ux/flows/p10-logs.mermaid` (+ the one new `p5-monitoring.mermaid` edge S3 → P10-S1; the other emitters already carry ADR 0027's standing affordance and are not re-drawn). - **Wireframes** `docs/ux/wireframes/p10-logs/` — `p10-e1-entry-points`, `p10-s1-logs-streaming`, `p10-s1x-stream-lost`, `p10-s2-paused-still-watching`, `p10-s0x-nothing-followable`. Their `data-field` / `data-action` / `data-status` attributes are the stable element-ID contract every acceptance criterion below is written against. (E1 **depicts** two existing screens to show the edge — `design-verify` matches those elements against their own wireframes, not against E1.) - **Vocabulary** `CONTEXT.md` — *Log target*, *Log scope*, *Follow* (Language) and *Logs surface (P10) object-states* (Design nouns), merged with the arc. - **Consumed from the sibling** — `OcStatusDot` and the shared grading constants are minted by DDR 0202 / spec [#769](https://git.matou.nz/Matou/idss/issues/769) (stories 35–36 there) and referenced here, never re-minted. Siblings in the same observability arc (each specs separately, then all fan in at one `/slice-map`, #770): #759 device telemetry (specced, #769), #761 network, #762 replication matrix, #763 activity feed, #764 topology map (deferred). ## Problem Statement **The dashboard already offers the operator controls that do nothing.** ADR 0027 promises a logs escalation path on every deploy, monitoring and rescue surface, and the surfaces keep that promise on their own side: `ServiceDetailScreen`, `FixDidntHoldScreen`, `UpdatesScreen` and the P4 setup surfaces all render *Open logs* / *Download logs* and emit `open-logs` / `download-logs`. `DashboardComposition` binds only `@route`. **The emits are silently dropped** — `ServicesSurface` re-emits them into nothing, and `FleetSurface` / `SettingsSurface` translate them into `PendingRoute`s that park. So the operator clicks *Open logs* on a service that has been down for four minutes and the panel does not react at all. That is worse than having no control: a dead control teaches the operator that the panel is unreliable, exactly at the moment they were escalating. And it is invisible to the panel's own tests, because a dropped emit is not a failure anywhere. Underneath the dead control is a real absence. The A5 logs viewer exists **only in the operator app** (`app/src/components/shell/LogsViewer.vue`, wireframe `shell/shell-a5-logs-viewer.html`); the served dashboard has no logs surface at all. So the panel's most-used seat cannot answer *what is this service actually saying right now* — the operator's honest options are to walk to the app, or to SSH in, which is precisely what a low-skill, low-time operator will not do. There is also nothing in the dashboard that can be **followed**. Every dashboard read today is a re-read on a cadence, which is right for projections and wrong for logs: the whole value of a log during a deploy or an outage is that the next line arrives while you are looking at it. Polling a log either misses lines or hammers the gateway, and neither failure is visible to the operator. Finally, the panel has no honest way to say *the log stream broke*. A live tail that quietly stops is the worst failure mode there is — a stale scroll under a live indicator, which DDR 0096 exists to forbid, and which nothing today prevents because there is no stream. ## Solution **One logs surface, shared by both seats, mounted where the operator already is — and streaming, honestly.** Four things land: 1. **One kit `LogsScreen`, two mounts** (the `CodesLedgerScreen` A4/DF2 precedent). The screen owns the controls — scope, search, level chips, pause/resume, download — and the terminal panel; the **feed is a seam-injected source with two faces**. The app mounts it over its existing bounded operation-log read (A5's contract unchanged); the dashboard mounts it over the live stream source, which alone renders the stream-lifecycle chrome. A static feed is always complete, so *streaming / stream lost / paused* never appear on A5. Rejected: a second bespoke dashboard viewer — two idioms for one cross-cutting promise is the exact drift ADR 0027 exists to prevent. 2. **SSE is ruled in, scoped to logs.** The control plane gains a **log-stream hub** (the prototype's `internal/logstream` mechanics ported: ref-counted follows, tail 200 on subscribe, a 200 lines/s per-target cap, a 2000-line ring for instant backlog, drop-oldest for slow subscribers) behind **one SSE endpoint** — `EventSource`, one-directional, plain HTTP through the front door's gate, auto-reconnecting, no WebSocket upgrade machinery. Client guards ride with it: a 2000-line client ring, a 120 ms batched flush, a 400-line render cap, a 5-minute idle auto-pause with the "Still watching?" resume, and a `document.hidden` pause that auto-resumes on visible. The `provisionClient.ts` "no SSE/WebSocket" line stays true of provisioning's *projection* reads; it was never a global rule, and logs are its inverse. 3. **The intent lands in place, and the tab set stays closed.** `DashboardComposition` binds `open-logs` / `download-logs` and mounts the logs screen **over whichever tab's screen emitted it**, scoped to the emitter's log targets, with Back returning to the emitting screen and its place held. No seventh tab (ADR 0094), no route of its own, no standing entry anywhere — an operator is *led* to logs by an emitting surface, never left to find them (the DDR 0101 §3 rescue posture). `download-logs` mounts nothing: it fetches the bounded artifact for the same scope as a direct browser download. 4. **The `--oc-term-*` vocabulary ports into the kit** — six presentation tokens (`bg`, `ink`, `dim`, `ok`, `warn`, `err`) declared once at the base layer, product language and never community brand (the ADR 0122 split; the palette seam is untouched). The terminal panel is deliberately dark in both themes, so only `--oc-term-bg` ever varies per theme. **What is followable is the control plane's answer, not the surface's guess.** A **log scope** names what the surface follows — an operation log, a service, a node, or a subject reference — and the control plane resolves it server-side to **log targets** and answers "what is followable right now" as one catalogue read. That single contract is what makes the four object-states honest: - **streaming** — live, with the bounds stated in the meta line (follows held, tail kept, lines shown) rather than implied (P10-S1). - **stream lost** — the follow dropped mid-stream: the tail **freezes**, is dimmed and end-marked, and a banner names the loss moment and the automatic reconnect. Never a stale scroll under a live dot (DDR 0096), never a toast (P10-S1x). - **paused** — the idle "Still watching?", the hidden tab, or the operator's own Pause. Deliberate; nothing failed; never dressed as lost and never as live (P10-S2). The hidden-tab pause has no resting frame — it resumes by itself. - **nothing followable** — the empty scope names *why* it resolved to no target and offers the real catalogue, one pick away from streaming. Never a blank terminal (P10-S0x). **Level filtering is honest.** Operation logs carry structured levels (A5's `LogEntry.level`) and the chips filter authoritatively; raw service lines carry none, so there the chips are a named text-match heuristic — never presented as monitoring's classification. Severity stays monitoring's word. The whole surface — stream endpoint included — sits behind the community door, operators only (DDR 0172). No public tier exists, so no redaction tier is needed; the secrets-never-enter-logs-by-construction rule stands unchanged. ## User Stories ### A — The dropped intents get an answer (edges ENTRY → P10-S1 / P10-S0x) 1. As an operator, I want *Open logs* to actually open logs wherever it is offered, so that a control the panel renders is never dead. - **Given** any emitting screen that renders `data-action="open-logs"` — monitoring's P5-S3 / S4x, provisioning's P4-S4 / S5 / S5x, updates' P4b-U1 / U3 / U4 / U4x, the mail readiness pair MAIL-S1 / S1x — **When** the operator activates it, **Then** the shell mounts the logs screen scoped to that emitter's log scope (edge ENTRY → P10-S1). - **Given** the dashboard composition, **Then** it binds `@open-logs` and `@download-logs` alongside `@route` on every mounted surface — **no surface's logs emit reaches a component that does not listen for it**. - **Given** a regression test over the composition, **Then** activating `open-logs` on each emitting surface is asserted to mount the logs screen — the dropped-emit failure is caught by a test, not by an operator. 2. As an operator, I want every surface's logs control to behave identically, so that I learn one thing once. - **Given** the three shapes in the tree today — a raw `open-logs` emit (`ServicesSurface`), a `route` intent `open-logs-<id>` (`SettingsSurface`) and a `route` intent `open-log-<id>` (`FleetSurface`) — **Then** all three converge on **one intent-with-scope shape**, and `FleetSurface`'s `PendingRoute` translation for logs is removed rather than left parking. - **Given** the convergence, **Then** an emitter passes the log-scope reference it already carries (`service/chat`, `device/rimu`, `log-mm94`, `log-deploy-kauri-…`) unchanged — no emitting screen learns a new payload shape, and no emitter resolves targets itself. 3. As an operator, I want opening logs for something with nothing to follow to land on a named state, so that an empty scope is designed rather than defaulted. - **Given** an emitter whose scope resolves to **no** log target (a service with no running unit yet, an operation log that has aged out), **When** the operator activates `open-logs`, **Then** P10-S0x renders (edge ENTRY → P10-S0x) — never an empty terminal and never a silent no-op. 4. As an operator, I want *Download logs* to hand me a file without navigating me anywhere, so that gathering evidence never costs me my place. - **Given** any surface offering `data-action="download-logs"`, **When** the operator activates it, **Then** the bounded log artifact for that same scope downloads directly and **no screen is mounted** (the S1 self-edge annotation) — the current screen, streaming or otherwise, is untouched. - **Given** `download-logs` activated from the logs screen itself while streaming, **Then** the stream keeps running through the download. ### B — Streaming (P10-S1) 5. As an operator, I want to see the log lines arriving live, so that I can watch what the fleet is doing right now. - **Given** a scope resolving to at least one live log target, **When** the logs screen mounts, **Then** `data-field="log-stream"` carries `data-status="streaming"` and renders the lines the hub sends, newest last, each line carrying its timestamp, its source (target) and its message. - **Given** the mount, **Then** the hub's tail (the last 200 lines) is rendered immediately as backlog — the operator never opens onto an empty panel waiting for the next line. 6. As an operator, I want the standing line above the terminal to always tell me the truth about the stream, so that I never have to infer liveness from motion. - **Given** *streaming*, **Then** `data-field="stream-standing"` carries `data-status="streaming"`, an indicator dot in the healthy tone (DDR 0202's `OcStatusDot`, referenced not re-minted), and the scope's name. - **Given** any of the four object-states, **Then** the standing line is present and its `data-status` is the state — `streaming` / `stream-lost` / `paused-idle`; the surface never renders a terminal panel with no standing line above it. 7. As an operator, I want the surface to state its own bounds, so that I know what I am and am not being shown. - **Given** *streaming*, **Then** `data-field="stream-meta"` states the honest bounds in plain words — that it is live, how many follows are held, how many lines are kept, and how many are shown (the wireframe's "live · 2 follows · last 200 lines kept · newest 400 shown"). - **Given** the bounds, **Then** they are **read from the running configuration**, not hard-coded copy: changing the render cap changes the meta line. 8. As an operator, I want the terminal to stay readable under a fast stream, so that a busy service does not make the panel useless. - **Given** lines arriving faster than the eye, **Then** the client batches renders on a **120 ms** flush, holds at most **2000** lines in its ring (drop-oldest), and renders at most the newest **400** — and the surface stays responsive to scroll, search and every control throughout. - **Given** the render cap, **Then** it is stated in the meta line (story 7) rather than silently truncating. 9. As an operator, I want log lines to look like log lines and still belong to this product, so that the panel reads as one system. - **Given** the terminal panel, **Then** every colour it renders is an `--oc-term-*` token (story 38) — **no raw hex is emitted by the component** — and log lines render at the **mono secondary size** (≈0.85rem, line-height ≈1.65) per the ADR 0122 type-scale amendment, never the prototype's 11.5px nor the artboard's `.72rem`. - **Given** timestamps and sources, **Then** they render in `--oc-term-dim`; success lines in `--oc-term-ok`, warnings in `--oc-term-warn`, errors in `--oc-term-err`. ### C — Scope, search and level filtering (P10-S1 self-edges) 10. As an operator, I want to see what I am following and change it without leaving, so that I can chase a problem across targets. - **Given** *streaming*, **Then** `data-field="log-scope"` names the current scope and how many targets it resolved to ("Following: Chat — 2 units"). - **Given** the scope control, **When** the operator picks another followable target — a service unit, a node, an operation log — **Then** the surface re-scopes in place and keeps streaming (the S1 → S1 re-scope self-edge): the old follows are released, the new ones subscribe with their tail, and no screen change occurs. - **Given** the scope control's list, **Then** it is the **control plane's catalogue read verbatim** — the same answer S0x offers (story 30) — and the surface computes no candidate list of its own. 11. As an operator, I want to search the lines I am looking at, so that I can find the one that matters in a fast stream. - **Given** `data-field="log-search"` with text entered, **Then** only matching lines render, the stream keeps arriving behind the filter, and clearing the search restores the full retained ring — **the filter never discards lines from the ring**. 12. As an operator, I want level filtering that is honest about what it can know, so that I never mistake a text match for a classification. - **Given** an **operation log** (lines carrying a structured level), **When** the operator toggles `data-action="filter-info" | "filter-warn" | "filter-error"`, **Then** the filter applies to the line's own level authoritatively. - **Given** a **service-unit** target (raw lines with no structured level), **Then** the same chips apply a **named text-match heuristic** and the surface says so where the chips live — it is never presented as monitoring's severity, and no line is assigned a level it does not carry. - **Given** a mixed scope (an operation log and a service unit followed together), **Then** each line is filtered by its own kind's rule; the surface does not fabricate levels for the unlevelled half. 13. As an operator, I want to stop the stream myself when I want to read, so that I am not fighting the scroll. - **Given** *streaming*, **When** the operator activates `data-action="pause-stream"`, **Then** the surface enters *paused* on the P10-S2 frame with its copy reading as the operator's own act ("paused — you paused the stream"), and the follows are released. - **Given** the operator's own pause, **Then** it is the **same state and the same frame** as the idle pause (story 22), differing only in the copy — no second paused implementation exists. ### D — Stream lost (P10-S1x; edges P10-S1 → P10-S1x → P10-S1 / ENTRY) 14. As an operator, I want a broken stream to be a rendered, named state, so that I am never reassured by lines that stopped arriving. - **Given** the follow drops mid-stream (the gateway or the hub stops answering), **Then** `data-field="stream-standing"` carries `data-status="stream-lost"` with the indicator in the warning tone, `data-field="stream-meta"` reads that nothing shown below is current, and `data-field="stream-lost-banner"` (`data-status="reconnecting"`) names **the wall-clock moment of the loss** and states that reconnection is automatic. - **Given** *stream lost*, **Then** the loss is **never** a toast, never a spinner, and never a silently retried green dot. 15. As an operator, I want the lines that did arrive to stay readable, so that I keep the evidence I was reading. - **Given** *stream lost*, **Then** `data-field="log-stream"` carries `data-status="stale"`, the retained tail stays rendered and scrollable, is visibly dimmed, and ends with an explicit end-mark ("— stream lost here —") — the tail is frozen at the last received line, not cleared and not appended to. 16. As an operator, I want the stream to come back by itself, so that recovery costs me nothing. - **Given** *stream lost*, **When** the control plane answers again, **Then** the client reconnects on its own (the `EventSource` retry), **backfills from the hub's ring** so the lines missed during the gap appear in order, the stale mark and the banner clear, and the surface returns to *streaming* (edge P10-S1x → P10-S1) — with no operator act required. - **Given** the backfill, **Then** lines already rendered are not duplicated. 17. As an operator, I want a lost stream told apart from a lost community, so that one failure is not dressed as another. - **Given** the whole panel loses the community (the reachability probe fails), **Then** the dashboard's existing unreachable state (DX) takes over the frame and the stream-lost banner is not the surface that speaks — the two failures keep their own vocabularies (DDR 0096). 18. As an operator, I want to be able to walk away from a lost stream, so that a broken surface is never a trap. - **Given** *stream lost*, **When** the operator activates `data-action="back-to-emitter"`, **Then** the emitting screen returns with its place held (edge P10-S1x → ENTRY) and any residual follow is released. ### E — Paused (P10-S2; edges P10-S1 → P10-S2 → P10-S1 / ENTRY) 19. As an operator, I want a forgotten tab to stop making the fleet work, so that leaving a log open overnight costs nothing. - **Given** *streaming* with **5 minutes** and no operator act, **Then** the surface pauses: the follows are released, `data-field="stream-standing"` carries `data-status="paused-idle"` with the indicator in the warning tone, and `data-field="idle-prompt"` (`data-status="paused-idle"`) asks "Still watching?" and states plainly why it paused. - **Given** the idle budget, **Then** it is a **system-defined 5 minutes**, not an operator setting anywhere in the panel. 20. As an operator, I want paused to look nothing like broken, so that I do not go looking for a fault that does not exist. - **Given** *paused*, **Then** `data-field="log-stream"` carries `data-status="paused"`, the tail is end-marked "— paused here — resume to keep following —", and nothing on the frame names a failure — paused is deliberate, and the copy says so. - **Given** *paused* and *stream lost*, **Then** the two are never conflated: paused releases follows on purpose; lost is a follow that dropped. 21. As an operator, I want one act to resume, so that coming back is trivial. - **Given** *paused*, **When** the operator activates `data-action="resume-stream"`, **Then** the follows re-subscribe, the hub's ring backfills the gap, the idle prompt clears, and the surface returns to *streaming* (edge P10-S2 → P10-S1). - **Given** the resume, **Then** the idle timer restarts from that act. 22. As an operator, I want a hidden tab to pause and come back on its own, so that switching tabs is not a decision. - **Given** *streaming*, **When** `document.hidden` becomes true, **Then** the follows are released; **When** the tab becomes visible again, **Then** they resume and backfill **by themselves** — the operator never sees a resting frame for the hidden-tab pause (it has no screen in the flow). - **Given** a tab hidden for longer than the idle budget, **Then** becoming visible again rests on the idle prompt rather than resuming silently — the operator is asked, because they were away. 23. As an operator, I want leaving a paused surface to be clean, so that nothing is left holding resources. - **Given** *paused*, **When** the operator activates `data-action="back-to-emitter"`, **Then** the emitting screen returns with its place held (edge P10-S2 → ENTRY), the idle timer is cleared and no follow remains open. ### F — Nothing followable (P10-S0x; edges ENTRY → P10-S0x, P10-S0x → P10-S1 / ENTRY) 24. As an operator, I want an empty scope to tell me why it is empty, so that "nothing here" is an answer rather than a blank. - **Given** a scope that resolves to no log target, **Then** `data-field="no-targets-reason"` names the reason in plain words tied to the subject ("Files has no running unit on any node yet — there is no live log to stream. A deploy that has run keeps its operation log; this service hasn't deployed."), and no terminal panel is rendered. - **Given** the reason, **Then** it is the **control plane's** answer for that scope, not a generic string the surface picks — a not-yet-deployed service, a node with no units, and an aged-out operation log each read differently. 25. As an operator, I want to be shown what I *can* follow, so that an empty scope is never a dead end. - **Given** P10-S0x, **Then** `data-field="followable-targets"` lists the catalogue's real answer, each row naming the target, its kind (service unit — live / operation log — finished, replayable) and its node, with `data-action="follow-target"`. - **Given** any offered row, **When** the operator activates it, **Then** the logs screen re-scopes to that target and streams (edge P10-S0x → P10-S1) — or, for a finished operation log, replays it bounded start-to-now. - **Given** a fleet where **nothing at all** is followable, **Then** the list says so in the same honest voice rather than rendering an empty list (the never-empty spirit, DDR 0095). 26. As an operator, I want to leave an empty scope the same way I leave every other logs frame, so that Back means one thing. - **Given** P10-S0x, **When** the operator activates `data-action="back-to-emitter"`, **Then** the emitting screen returns with its place held (edge P10-S0x → ENTRY). ### G — Where the surface lives (the in-place mount, all frames) 27. As an operator, I want looking at logs to keep me where I was, so that escalating never loses my place. - **Given** the logs screen mounted from any emitter, **Then** it renders **in place over the emitting tab's screen** (the SetupSurface-on-Fleet drill-in pattern, DDR 0101 §1 / DDR 0109), the selected tab does not change, the browser URL does not change, **no seventh tab appears** (ADR 0094), and no modal is used. - **Given** Back from any logs frame, **Then** the emitting screen resumes with its own state intact — its scroll, its open drill-in, its selection — because no tab change ever happened. 28. As an operator, I want logs to have no standing home, so that I am always led there by something that had a reason. - **Given** the whole dashboard chrome, **Then** there is **no standing menu entry, tab, or link to the logs surface anywhere** (the DDR 0101 §3 rescue posture) — it is reachable only by an emitter's intent. 29. As a maintainer, I want shell to own the one binding, so that no feature grows a private logs panel. - **Given** the composition, **Then** the logs mount is **shell's** — one binding answering every emitter (the same owner as the app's A5 shell screen, ADR 0097's table) — and no feature surface hosts a logs panel of its own. - **Given** ADR 0097, **Then** hosting a cross-cutting surface at the current mount is **not** shell running a feature journey: shell mounts and routes, and computes nothing about the logs themselves. 30. As a maintainer, I want a single catalogue read behind both the scope control and the empty state, so that two frames can never disagree about what is followable. - **Given** S1's scope control (story 10) and S0x's offer list (story 25), **Then** both render the **same** control-plane catalogue read verbatim — one contract, two renderings, no client-side resolution in either. ### H — The shared kit screen and its two mounts 31. As a maintainer, I want one logs screen in the kit, so that the app and the dashboard cannot drift apart. - **Given** the kit, **Then** it exports a `LogsScreen` owning the controls (scope, search, level chips, pause/resume, download) and the terminal panel, with the **feed injected as a source** — exactly the `CodesLedgerScreen` shared-screen shape (A4 / DF2, issue #36). - **Given** the screen, **Then** it holds no store, opens no transport of its own, and reads only its injected source (ADR 0097). 32. As an operator of the app, I want A5 to keep working exactly as it does, so that folding it into the kit costs me nothing. - **Given** the app's A5 mount over its **bounded operation-log read**, **Then** its existing behaviour is preserved — the operation filter, the search, the level chips and *Download bundle* — and its existing tests keep passing against the folded screen. - **Given** a **static (complete) feed**, **Then** the stream-lifecycle chrome never renders: no standing dot, no meta line bounds, no pause, no idle prompt, no stream-lost banner. A bounded log is always complete, and A5 never learns a stream vocabulary. 33. As a maintainer, I want the two faces to be one seam, so that a third mount is cheap and a second implementation is impossible. - **Given** the injected feed source, **Then** it has exactly two faces — a **bounded** face (an operation log's lines, complete) and a **live-stream** face (subscribe / lines / lifecycle / release) — and the screen renders the lifecycle chrome **only** when the source presents the live face. - **Given** a test, **Then** every P10 state is drivable through a hand-written fake source with no browser, no server and no timer of the component's own invention. 34. As the activity feed (#763, DDR 0206), I want to embed the tail without the surface chrome, so that my chronology stays visible beside it. - **Given** P12-S5, **Then** it embeds the **scoped-tail face** of this same `LogsScreen` — the terminal panel with its streaming / paused / stream-lost states, without the full surface's controls chrome — re-scoped by the feed's selected event through the **same** log-scope contract (a subject-kind scope resolved server-side). - **Given** the embed, **Then** it is the same kit component, not a variant reader: **no second log reader exists in the product** by either door. - **Note:** the face is provided and tested here; **building P12-S5 is #763's**, gated on this slice landing. ### I — The control plane: the log-stream hub, the catalogue, the routes 35. As a maintainer, I want one hub multiplexing every follow, so that ten watchers of one service cost one follow. - **Given** N subscribers on the same log target, **Then** the hub holds **one** underlying follow, ref-counted, and releases it when the last subscriber leaves — a subscriber leaving never interrupts the others. - **Given** a new subscriber, **Then** it receives the target's **tail of 200 lines** immediately from the ring, then live lines. - **Given** a target producing faster than **200 lines/s**, **Then** the hub caps at that rate per target rather than flooding every subscriber. - **Given** the hub's per-target **2000-line ring**, **Then** it is drop-oldest, and it is what a reconnecting or resuming client backfills from (stories 16, 21, 22). - **Given** a **slow subscriber**, **Then** the hub drops lines for that subscriber rather than blocking the target or any other subscriber. 36. As a maintainer, I want the followable catalogue answered server-side, so that no surface guesses at the fleet's shape. - **Given** a **log scope** (an operation log, a service, a node, or a subject reference), **Then** the control plane resolves it to zero or more **log targets**, each carrying its name, kind (operation log / service unit), node and whether it is live or finished-and-replayable. - **Given** a scope resolving to zero targets, **Then** the response carries the **reason** (story 24) — the empty answer is a stated one, not an empty array the client must interpret. - **Given** the catalogue read, **Then** it is the one answer both S1's scope control and S0x's offer list render (story 30). 37. As an operator, I want logs to be as locked as the rest of the panel, so that the escalation path is not the weak door. - **Given** the SSE stream route, the catalogue read and the bounded download, **Then** all three sit **behind the community door, operators only** (DDR 0172): `EventSource` rides the same community session cookie and the gateway's `forward_auth` covers the SSE route like any admin route. - **Given** an unauthenticated or non-operator caller, **Then** the stream route refuses exactly as every other admin route does, and no line is emitted. - **Given** the operator-only posture, **Then** **no redaction tier is built** — there is no public tier to redact for — and the secrets-never-enter-logs-by-construction rule is unchanged. 38. As a maintainer, I want the terminal vocabulary owned by the kit, so that the panel's dark surface is a token decision and not a component's opinion. - **Given** the kit's base layer `:root`, **Then** it declares `--oc-term-bg` (`#253D39`), `--oc-term-ink` (`#E9F0EE`), `--oc-term-dim` (`#9AC7BF`), `--oc-term-ok` (`#9fd6ae`), `--oc-term-warn` (`#ffd9a0`) and `--oc-term-err` (`#f0a49c`). - **Given** the ADR 0122 token split, **Then** these are **product-language presentation tokens**, never community-brand tokens: the palette seam is untouched and a community's brand kit cannot re-point them. - **Given** both themes, **Then** the panel is deliberately dark in each, so only `--oc-term-bg` carries a theme variant (re-pointed to `#1c2f2b` when the dark-mode slice lands); the inner five need none. 39. As a maintainer, I want the transport contract stated where every other one is, so that logs are not a side door. - **Given** the OpenAPI spec, **Then** it grows the **followable-targets catalogue read**, the **SSE stream route** and the **bounded log download**, with wire fields snake_case camelised at the client boundary (standards `wire-snake-case`, #126); the catalogue read and the download go through the **generated client** (ADR 0037) — no hand-rolled fetch. - **Given** the stream, **Then** the one deliberate exception is stated: a browser `EventSource` is not a generated-client call, so it lives **behind the live-stream feed source seam** and nowhere else — exactly one place in the tree constructs an `EventSource`, and the tests drive a fake of it. - **Given** `LogRef`, **Then** it is **unchanged** — today's emitters keep the handle they already carry (story 2). 40. As a maintainer, I want SSE scoped to logs alone, so that one live surface does not become a new global cadence. - **Given** every other dashboard read, **Then** it keeps its existing re-read cadence — no projection is converted to push by this spec. - **Given** the hub, **Then** it is a component of the control plane's own process with no new port and no new ingress surface: one route through the existing front door. ## Implementation Decisions ### Seams — two grown, one minted, and the minted one is the highest available - **The kit `LogsScreen`'s injected feed source is the primary seam, and it is the only new one.** One interface with two faces (bounded / live-stream), consumed by both mounts. Rejected: a dashboard-only viewer with its own store (two idioms), and a per-face pair of screens (the lifecycle chrome would be duplicated at exactly the point it must not drift). - **The Go `logstream` hub is seamed at its follow function** — the prototype's `FollowFunc` shape: the hub is constructed over "give me a follow on this target", so its multiplexing, ref-counting, tail, rate cap, ring and drop-oldest are all provable against a fake follow with no containers, no units and no fleet. This is the port's load-bearing seam and its tests come across as prior art. - **The catalogue read is a thin projection over the owners** (fleet store × the service catalogue × the operation-log store), re-deriving nothing and mapping faults to the shared Problem body, exactly as the existing Fleet route does. Scope → targets resolution lives here and nowhere else. - **The dashboard's live-stream source is the only `EventSource` construction site.** It owns reconnect, backfill, the client ring, the batched flush, the render cap, the idle timer and the visibility listener; the screen sees only the face. This is what makes stories 8, 16, 19, 21 and 22 testable without a browser. - **`DashboardComposition` binds the intents and hosts the mount.** The overlay is composed at the current mount, so no router change and no tab-table change is needed; `FleetSurface`'s and `SettingsSurface`'s logs-shaped `route` translations are removed in favour of the direct emits. ### Surface - **Client pattern is the house one:** an injected source, the shared async guard (`useAsyncGuard`) for the catalogue read and the download, and no component-invented `setInterval`. The stream's own timers (flush, idle) belong to the source, are cleared on release, and are injectable in tests. - **Every P10 frame's `data-field` / `data-action` / `data-status` attributes are the built contract**, carried verbatim from the wireframes so `design-verify` can check the shipped UI against them. - **The indicator dot is `OcStatusDot`** (DDR 0202 / #769 story 35) in healthy / warning / muted tones — referenced, never re-minted, and never a third colour for *lost*: lost is warning plus a named banner, not a new hue (the arc's no-red rule). - **Shell composes and computes nothing** (ADR 0097): it renders the source's state verbatim. The one thing it owns is where the surface mounts. ### The stream - **SSE, not WebSocket**: one-directional, plain HTTP, auto-reconnecting, passes the front door's gate as an ordinary route. The client never sends up the socket — re-scoping opens a new subscription rather than negotiating on an open one. - **Bounds are configuration, not constants scattered through components**: tail 200, 200 lines/s per target, 2000-line hub ring, 2000-line client ring, 120 ms flush, 400-line render cap, 5-minute idle. The meta line reads them (story 7). - **Backfill is the ring's job, not the client's**: a reconnecting or resuming subscriber is served from the hub's ring, which is why stories 16/21/22 can promise "the gap fills in order" without the client remembering anything but its last line. - **Not adopted from the prototype:** its Pinia store, its `short`-name keyspace, its container-as-service model, its micro type sizes, and its IP-visibility gating. What transfers is the hub's mechanics and the client's guard set. ### The kit - **`LogsScreen` + six `--oc-term-*` tokens.** All visuals express as `--oc-*` tokens (ADR 0122); zero raw hex in components stands. - **The app's A5 becomes a mount of the kit screen** — its contract preserved, its implementation moved. `buildBundle` / `filterLogs` and the `LogEntry` / `LogScope` / `LogBundle` types stay the app's bounded-face detail; the screen learns nothing app-specific. ## Testing Decisions A good test states externally-observable behaviour at a seam and never reaches into implementation detail. Five seams, **one new** (the kit screen's feed source) — the rest are pre-existing: 1. **The kit component seam (the primary one).** `LogsScreen` driven against a hand-written fake feed source, asserting on the wireframes' `data-field` / `data-action` / `data-status` contract. This is where every object-state is proven: streaming, stream lost (frozen + dimmed + end-marked + banner naming the moment), paused (idle, operator's own, and the copy difference), nothing followable (reason + catalogue + pick-to-stream), the standing line's always-present truth, the meta line's bounds, the honest level filtering on both kinds of target, the bounded face rendering **no** lifecycle chrome, and the scoped-tail face. Prior art: the `CodesLedgerScreen` shared-screen tests, `monitoringDrillIn.test.ts`, `surfaceFaultFrame.test.ts`. 2. **The dashboard stream-source seam.** The live-stream source driven against a **fake `EventSource`**: first lines render, a drop enters *stream lost*, reconnect backfills without duplicates, the client ring caps at 2000 drop-oldest, the flush batches at 120 ms, the render cap holds at 400, the idle timer pauses at 5 minutes and releases follows, resume re-subscribes and backfills, `document.hidden` pauses and visible resumes, and a hidden span longer than the idle budget rests on the prompt. All timers injected — no real waiting. 3. **The composition seam (the regression this ticket exists for).** The dashboard composition asserted to mount the logs screen when **each** emitting surface emits `open-logs`, and to download without mounting on `download-logs`; Back returns to the emitting screen with its state intact; no tab change and no URL change occurs; no logs-shaped `PendingRoute` is left parked. Prior art: the existing composition/mount-registry tests and `fleet.test.ts`. 4. **The Go hub seam.** The hub at its follow function: N subscribers share one follow, ref-count releases on the last leave, tail-on-subscribe delivers 200, the rate cap holds at 200 lines/s, the ring is 2000 drop-oldest, a slow subscriber drops lines without blocking others, and a follow that errors surfaces as a stream end rather than a hang. Prior art: the prototype's `hub_test` / `demux_test` / `follow_test` port, plus `monitor_test.go`'s shape. 5. **The transport seam.** Integration tests for the catalogue read (a scope resolving to N targets; a scope resolving to zero **with its reason**; an owner fault mapping to the shared Problem body), the SSE route (an authenticated operator receives events; an unauthenticated caller is refused and **no line is emitted**; the response is a well-formed event stream), and the bounded download. Prior art: `fleet_integration_test.go`, `authgate_test.go`, `fleetLive.test.ts`. Two cross-cutting checks ride existing harnesses rather than new ones: the **theming contract tests** (the six `--oc-term-*` tokens exist at the base layer, are product-language not brand, and no component emits raw hex — ADR 0122), and the **app A5 regression suite** kept green against the folded screen (story 32). ## Out of Scope - **Log retention and history search** beyond the hub's ring and the bounded operation logs. There is no log store, no index and no time-range query in v1. - **Log-based alerting.** Whether a log line raises anything is monitoring's, against monitoring's own rules. - **Custom multi-target sets** beyond scope resolution and the catalogue's offered targets — no operator-composed target baskets. - **Dropped-line detection for slow clients.** The bounds are stated honestly in the meta line instead; counting what was dropped is a later refinement. - **The kit's dark-mode terminal re-point** (`--oc-term-bg` → `#1c2f2b`) — it rides the dark-mode slice, ADR 0122. - **A member-facing logs tier and any redaction.** The panel is operators-only behind the community door (DDR 0172); P10 inherits that whole. - **The activity feed's P12-S5 pairing.** The scoped-tail face is built and tested here; **using** it beside the feed's chronology is #763's. - **Converting any other dashboard read to push.** SSE is scoped to logs (story 40). - **A new agent, port or ingress surface.** The hub is a component of the control plane behind the existing front door. - **The other observability siblings' surfaces** — telemetry (#759, specced as #769), network (#761), replication matrix (#762), activity feed (#763), topology map (#764, deferred). ## Further Notes ### Vertical slices (named for the fan-in `/slice-map`, #770) 1. **`ui-kit:term-tokens`** — the six `--oc-term-*` presentation tokens at the base layer, plus the theming-contract assertion. No dependencies; a leaf root. 2. **`logstream:hub`** — the Go log-stream hub behind its follow-function seam: ref-counted multiplexed follows, tail 200, the 200 lines/s cap, the 2000-line drop-oldest ring, slow-subscriber drop. No dependencies. 3. **`transport:log-catalogue`** — scope → log-target resolution and the followable-targets read, with the stated reason for an empty answer (OpenAPI + handler + generated client). Depends on 2. 4. **`transport:log-stream-sse`** — the SSE route and the bounded log download, both behind the community door's `forward_auth`. Depends on 2. 5. **`ui-kit:logs-screen`** — the shared `LogsScreen` over its injected feed source (controls, terminal panel, the four states, the scoped-tail face), and the app's A5 folded onto it. Depends on 1 and on #769's `ui-kit:telemetry-primitives` (for `OcStatusDot`). 6. **`dashboard:log-stream-source`** — the live-stream feed source: `EventSource`, reconnect + backfill, client ring, batched flush, render cap, idle pause, visibility pause. Depends on 4 and 5. 7. **`shell:logs-intent-mount`** — `DashboardComposition` binds `open-logs` / `download-logs`, hosts the in-place mount, and the three emit shapes converge; `FleetSurface`'s logs `PendingRoute` is removed. Depends on 3, 5 and 6. Cross-arc notes for the fan-in: slice 5 **blocks #763's P12-S5** (DDR 0206 gates that frame on this DDR); slice 1's tokens are consumed by nothing else in the arc; `OcStatusDot` from #769's slice 1 is a **shared root** for this feature too. Slice 7 is the one that actually closes this ticket's named gap — the dropped intents — and it is the last one, by construction. ### The DDR's three open gates (veto-open, not blocking) DDR 0203 is `accepted` with three decisions held open for Ben under the ADR 0174 posture — each has a **proposed default that this spec is written against**, and the veto is asynchronous: - **G1 — the kit share rewires A5** (default: share; one idiom for one promise, the ticket's preferred position). A veto retires stories 31–34 and slice 5 in favour of a dashboard-only screen; the states, the seam shape and every control-plane story are unchanged, and P12-S5 would then need its own answer. - **G2 — SSE adds a standing control-plane component** (default: SSE in, scoped to logs). This is the nearest thing here to a one-way door, though the endpoint is replaceable behind the feed-source seam. A veto retires stories 5–8, 14–23, 35 and 40 and slices 2, 4 and 6, leaving a bounded-replay-only surface — the surface would still exist and the dropped intents would still be wired. - **G3 — the idle-pause budget is 5 minutes** (the prototype's). Taste; a veto changes one configured number and the copy that reads it, nothing else. **This spec is ruled clear of the D1 placement cluster.** D1 governs the **new tabless drill-in grammar** and Overview's RECENT ACTIVITY row (DDRs 0204 / 0206). P10 introduces neither: it mounts on the already-ruled in-place pattern (DDR 0101 §1 / DDR 0109, the SetupSurface-on-Fleet drill-in) and takes its no-standing-entry posture from the already-ruled DDR 0101 §3. Nothing in this spec turns on D1, so it can be sliced now — the same reasoning that cleared #769. ### Implementation-time notes - The prototype (`matou-distributed-servers`, `roles/admin_dashboard/` + Go `internal/logstream/`) is a **reference for mechanics only**. Its styling is a drifted fork of the same Mātou visual language; nothing visual transfers, and every colour re-encodes as an `--oc-*` token (ADR 0122). - `docs/ux/flows/p5-monitoring.mermaid` already carries the one new S3 → P10-S1 edge (landed with the design tier); the other emitters' flows carry ADR 0027's standing affordance and are not re-drawn — slice 7's tests are what prove those edges, not new diagram nodes. - `CONTEXT.md` rules the copy: say **log target**, **log scope**, **follow**, **logs surface**, **streaming**, **stream lost**, **paused**, **nothing followable**. Never *container*, *log source*, *tail*, *watch*, *console*, *live view*, *disconnected*, or *offline* for a stream. --- *Produced by `/to-spec` in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #760.*
Owner

Supplementary findings — transferred from the withdrawn parallel spec draft (#836–#839 race, see #760–#763), verified absent from this spec before posting. Findings, not edits — the spec's rulings stand unless amended.

1. [MAJOR — changes what gets built] The emitter enumeration omits rescue and backups, which ADR 0027 names and the tree already carries. ADR 0027 promises Open/Download log "across founding, provisioning, monitoring, backups, and rescue", but story 1's enumeration and story 2's three-shape convergence name only monitoring/provisioning/updates/mail. Already in the tree: dashboard/src/components/rescue/ServiceLadderScreen.vue emits open-log; the P8 frames carry open-log/open-restart-log/open-reapply-log/open-move-log/open-full-log/download-log-bundle (p8-s1, p8-s4, p8-s4x); dashboard/src/components/backups/BackupRestoreReplacesScreen.vue emits open-log/download-log. That is a fourth intent family (singular, per-action-suffixed) the composition binding and slice 7's "no surface's logs emit reaches a component that does not listen" regression won't cover. A ruling is owed: converge them onto the one intent-with-scope shape, or scope them out explicitly (the rescue log-bundle is arguably ADR 0089's own artifact). Cross-posted on #811, the slice this lands in.

2. [MODERATE] Story 7 quotes the P10-S1 meta copy "last 200 lines kept" as the contract, but 200 is the subscribe tail — what is kept is the 2000-line ring (DDR 0203; this spec's own stories 8 and 35). Story 7's "bounds read from the running configuration" makes the quoted copy self-contradicting: read honestly it must say 2000 kept (or name 200 as the tail). A ✎ copy amendment is owed with the slice that builds the meta line, else the shipped line states a false bound or design-verify trips.

3. [MODERATE — DAG under a veto] G1's recorded veto blast radius over-retires. DDR 0203 gate 1 covers only folding the app's LogsViewer into the shared screen; the dashboard mount and #796's slice 10 (depends on ui-kit:logs-screen) need the kit screen regardless of who A5 belongs to. As recorded ("retires stories 31–34 and slice 5 … P12-S5 would then need its own answer"), a G1 veto would falsely break the cross-arc edge #796 rides — it need only retire story 32 and the A5-fold half of slice 5. Same class, smaller: G2's mapping omits the bounded-tail-polling fallback on the same catalogue/scope contract, which would preserve stories 12–17/25–32.

4. [MINOR] No P10 frame depicts a warn-class line though --oc-term-warn is minted, story 9 requires it, and p10-s1 offers data-action="filter-warn" — neither the ink nor the chip's filtered result has a depicted contract. Worth a ✎ line in a frame or an explicit test note.

**Supplementary findings** — transferred from the withdrawn parallel spec draft (#836–#839 race, see #760–#763), verified absent from this spec before posting. Findings, not edits — the spec's rulings stand unless amended. **1. [MAJOR — changes what gets built] The emitter enumeration omits rescue and backups, which ADR 0027 names and the tree already carries.** ADR 0027 promises Open/Download log "across founding, provisioning, monitoring, backups, and rescue", but story 1's enumeration and story 2's three-shape convergence name only monitoring/provisioning/updates/mail. Already in the tree: `dashboard/src/components/rescue/ServiceLadderScreen.vue` emits `open-log`; the P8 frames carry `open-log`/`open-restart-log`/`open-reapply-log`/`open-move-log`/`open-full-log`/`download-log-bundle` (p8-s1, p8-s4, p8-s4x); `dashboard/src/components/backups/BackupRestoreReplacesScreen.vue` emits `open-log`/`download-log`. That is a fourth intent family (singular, per-action-suffixed) the composition binding and slice 7's "no surface's logs emit reaches a component that does not listen" regression won't cover. A ruling is owed: converge them onto the one intent-with-scope shape, or scope them out explicitly (the rescue log-bundle is arguably ADR 0089's own artifact). Cross-posted on #811, the slice this lands in. **2. [MODERATE] Story 7 quotes the P10-S1 meta copy "last 200 lines kept" as the contract, but 200 is the subscribe tail — what is kept is the 2000-line ring** (DDR 0203; this spec's own stories 8 and 35). Story 7's "bounds read from the running configuration" makes the quoted copy self-contradicting: read honestly it must say 2000 kept (or name 200 as the tail). A ✎ copy amendment is owed with the slice that builds the meta line, else the shipped line states a false bound or design-verify trips. **3. [MODERATE — DAG under a veto] G1's recorded veto blast radius over-retires.** DDR 0203 gate 1 covers only folding the app's LogsViewer into the shared screen; the dashboard mount and #796's slice 10 (depends on ui-kit:logs-screen) need the kit screen regardless of who A5 belongs to. As recorded ("retires stories 31–34 and slice 5 … P12-S5 would then need its own answer"), a G1 veto would falsely break the cross-arc edge #796 rides — it need only retire story 32 and the A5-fold half of slice 5. Same class, smaller: G2's mapping omits the bounded-tail-polling fallback on the same catalogue/scope contract, which would preserve stories 12–17/25–32. **4. [MINOR] No P10 frame depicts a warn-class line** though `--oc-term-warn` is minted, story 9 requires it, and p10-s1 offers `data-action="filter-warn"` — neither the ink nor the chip's filtered result has a depicted contract. Worth a ✎ line in a frame or an explicit test note.
Owner

Closed in the 2026-08-27 sweep — child spec complete: 15 derived tickets closed, and the 16th (#877) was landed by #870 and closed today. The one named residue (rescue/update draining into oplog.Store) is filed as #889.

Closed in the 2026-08-27 sweep — child spec complete: 15 derived tickets closed, and the 16th (#877) was landed by #870 and closed today. The one named residue (rescue/update draining into `oplog.Store`) is filed as #889.
ben closed this issue 2026-08-27 04:56:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#791
No description provided.