observability: rescue's open-log rides the service-unit scope it already mints; the ADR 0089 bundle stays download-only #859
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#859
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent / context
Found while implementing #811 (
observability:shell-logs-intent-mount). Ben's supplementary finding on that issue (and spec #791) flagged that the P10 logs-intent binding does not cover the backups and rescue log emitters that already exist in the tree. #811 scoped them out explicitly under ADR 0174 (see its ruling comment). This issue closes that gap.What to build
#811 made
DashboardCompositionbind@open-logs/@download-logson every mounted surface and converged the enumerated emitters (monitoring / provisioning / updates / mail) onto one intent-with-scope shape (a scope-reference string the shell resolves via the #807 catalogue + #810 stream). This slice extends that convergence to the two surfaces #811 left:BackupsSurfacecurrently translatesopen-run-loginto arouteintent (owner: 'backups', no scope id), and theBackupRestoreScreen/BackupRestoreReplacesScreenrestore-log emits (open-log/download-log) are not wired to a surface listener at all (they fall on the floor). Wire each backups log affordance to re-emitopen-logs/download-logscarrying its log-scope reference, so the shell mounts the sharedLogsScreenin place over the Backups tab.ServiceLadderScreen'sopen-logbutton is inert today (no@click, absent fromdefineEmits) and rescue has no mount among the six tabs (DDR 0101 §3). Convergence here likely rides rescue's own mount slice — either fold it in there or wire the emit once rescue is mounted.The open question this depends on
The log-scope reference for a backup run / restore log and a rescue log-bundle is not yet defined by the #807 catalogue (
getLogsTargets). ADR 0027 names backups and rescue in the Open/Download promise; the rescue log-bundle is arguably ADR 0089's artifact (a bounded download, not a live stream scope). So this needs a design decision first: does each map to a stream scope the catalogue resolves, a boundeddownload-only artifact, or both? Define the reference, then the wiring is additive against #811's existing per-surface binding.Acceptance (once the reference is defined)
BackupsSurfacere-emitsopen-logs/download-logscarrying the backup log's scope reference; the shell mountsLogsScreenin place over Backups (or downloads directly for a bounded artifact).BackupRestore*restore-log affordances reach the composition binding — no backups logs emit falls on the floor.open-logis wired (with its mount slice) onto the same intent, or an explicit ruling records why rescue stays download-only.Refs
ADR 0027 (Open/Download promise), ADR 0089 (rescue log-bundle artifact), DDR 0203 (logs surface), spec #791, #811.
Researched — and the answer splits, because the two halves are not the same kind of thing
Findings from reading the transport, the seams and the two ADRs. The short version: backups has no log to converge, and the rescue bundle is structurally not a log scope. Detail, with the evidence:
The transport already answers the question it was asked
One scope string carries two verbs —
/api/v1/logs/targets/{scope},/logs/stream/{scope},/logs/download/{scope}(internal/controlapi/logcatalogue.go:127,logstream.go:114,:121). AndLogsScreenalready has a bounded face that renders with zero stream chrome —BoundedLogFeed{face:'bounded'; lines()}vsLiveLogFeed(packages/ui-kit/src/logsFeed.ts:88-146). So "stream or download" was never an either/or at the contract: a scope can be followable, downloadable, or both. What is missing on the dashboard side is only thatlogsMount.open(scope)always builds a live feed (dashboard/src/lib/logsMount.ts:115-133) — a bounded dashboard mount is the one genuinely absent piece.backups — there is no log, so this is a BUILD, not a wiring job
The ticket assumes "the wiring is additive". It is not. A backup run persists
runRecord{id, at, due, cadence, ref, targets, outcome, evidence, outcomes}(internal/backup/run.go:125-138) — no log ref, no captured output.RunRow.Summary/Detailare generated sentences (projectRun,run.go:427-445), not process output. The engine really does shell out —Conn.Run(ctx, argv...) ([]byte, error)(internal/backupengine/backupengine.go:60-66) — but that stdout is consumed by the verb and never persisted or streamed. There is no borg/restic unit, no journald unit, no systemd service behind a run.The only durable trace a restore leaves is a single
AuditEntry(internal/backup/restore.go:242-256— "the audit entry is the only trace it leaves"), and the LogRef backups hands the activity feed is that audit row's id (internal/backup/recentevents.go:226).So making backups satisfy ADR 0027's "every deploy and rescue operation streams to a log" means creating the operation log: capture
Conn.Run's output per run into the hub as anoperation-logtarget keyed by the run's ref, live-tailing while the run is in flight and replayable-bounded after. That is exactly DDR 0203 ruling 5's "operation logs — bounded, replayable start-to-now, live-tailing while the operation runs" (0203:94-105). Real new capability; deserves its own slice.rescue — download-only, and the "Open log" button already has a different, valid scope
The rescue log-bundle is not a log scope and cannot be one. In code it is three different bounded structs, all produced at request time from state already in memory:
LogBundleGrant{Shared, At, Rungs []RungRecord, Note}(internal/rescue/remotesupport.go:57-63), the app'sLogBundle{filename, note, logs?}(app/src/lib/breakglass.ts:149-156), and A5'sbuildBundlefilter (app/src/lib/logs.ts:76-95). The control-plane one is rung records, not log lines.Decisively: ADR 0089's whole point is that the bundle works when the control plane is the patient — "the app produces the log bundle (the break-glass surface has Download log bundle — P8-S4)" (
0089:33-38). A catalogue-resolved live scope is served by the control plane, so it cannot serve the artifact whose reason for existing is that the control plane is down.Meanwhile
ServiceLadderScreen's inert "Open log" button is already holding a perfectly good scope:view.log.id, minted asmonitor.LogRef{ID: "service/" + service}(internal/monitor/detail.go:48-52). That is aservice-unitscope the catalogue is designed to resolve — nothing new needed.Recommended ruling
ServiceLadderScreen'sopen-logto the service-unit scope it already mints (service/<name>) via the #811 binding. Keep Download bundle as ADR 0089's separate app-side artifact — explicitly NOT a catalogue scope, recorded as a ruling so no one tries again.operation-logtarget; then the surface wiring genuinely is additive. Until that lands,BackupsSurface's scopelessopen-run-logand the floor-droppingBackupRestore*emits should be made honest (disabled with a reason) rather than routed somewhere that answers nothing.The blocker this sits behind — #868
While researching I found that the P10 logs transport is never mounted on the real control plane: neither
WithLogCataloguenorWithLogStreamis passed atcontrol-plane/cmd/control-plane/main.go:811, and no productionLogCatalogueimplementation exists (only the test fake). All three logs routes 404 on a shipped gateway. Filed as #868 and added as a blocker here — converging more emitters onto an intent whose transport answers nothing adds surface, not capability.Ruled by Ben — 2026-08-26: adopt as recommended, and split
Ben adopted the recommendation in the comment above. Recording the ruling and re-scoping this ticket to the half it can actually carry.
The ruling
/logs/targets/{scope},/logs/stream/{scope},/logs/download/{scope}), not two kinds of reference. No new reference type is minted.LogsScreenalready renders both faces (BoundedLogFeed/LiveLogFeed,packages/ui-kit/src/logsFeed.ts:88-146).ServiceLadderScreen's inertopen-logis wired to the service-unit scope it already mints —monitor.LogRef{ID: "service/" + service}(internal/monitor/detail.go:48-52) — through #811's per-surface binding. Download bundle stays ADR 0089's separate app-side artifact and is explicitly NOT a catalogue scope, because its whole reason for existing is that it works when the control plane (and therefore the catalogue and the SSE route) is down (0089:33-38). That exclusion is now a ruling, so no one re-derives it.Conn.Runstdout is never captured. Split out as its own build ticket (below).This ticket is now the rescue half
Re-scoped and retitled. Its acceptance:
ServiceLadderScreen'sopen-logis wired (@click+defineEmits) and re-emitsopen-logscarrying theservice/<name>scope, reaching the #811 composition binding.LogsScreenmount — and a comment at the emit site records why (control-plane-down is its operating condition).LogsScreenfor the service-unit scope, and that the bundle path does not go through the catalogue.Still blocked by #868 (the P10 logs transport is never mounted on a real control plane). Relabelled
ready-for-agent; the design question is answered.observability: converge backups + rescue log emitters onto the shell open-logs intentto observability: rescue's open-log rides the service-unit scope it already mints; the ADR 0089 bundle stays download-onlyswarm-claim host=elitebook-distributed-server-03 run=10600
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #859 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope