observability: the P10 logs transport is never mounted — catalogue/stream/download routes 404 on a real gateway #868
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.
Blocks
Reference
Matou/idss#868
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?
The gap
The P10 logs tier landed at its seams and is never mounted on the real control plane. All three logs routes are registered only by
Options that no production composition root passes, so on a shipped gateway every logs affordance answers 404:GET /api/v1/logs/targets/{scope}—WithLogCatalogue(#807)GET /api/v1/logs/stream/{scope}—WithLogStream(#808)GET /api/v1/logs/download/{scope}— same optionEvidence.
control-plane/cmd/control-plane/main.go:811composescontrolapi.NewHandler(c.mon, log, opts...)with 20+ options (WithBackups,WithFleet,WithRescue,WithOverview, …). NeitherWithLogStreamnorWithLogCatalogueis among them. Repo-wide, the only non-test callers ofWithLogCatalogueare its own definition andlogcatalogue_integration_test.go;WithLogStreamhas no caller outside its definition at all.And there is no production
LogCatalogue.internal/controlapi/logcatalogue.go:102defines the interface; the only implementation in the tree is the test fake inlogcatalogue_integration_test.go:39. #807's slice note promised "a thin projection over the owners (fleet store × service catalogue × operation-log store)" — the interface, the route and the honest-emptyReasoncodes landed, the projection did not. Likewiselogstream.HubFollowerneeds aFollowFuncbound to something real; no journald/container/file adapter exists (grep journalctlhits onlyinternal/vm/manager.go).So the shell mounts (#809
LogsScreen, #811 the@open-logs/@download-logsbinding), the SSE hub (#806) and the browser stream source (#810) are all correct and unit-proven against fakes, sitting on top of a transport that answers nothing in production.Why this is filed separately
It is not one slice's miss — the slice map has no mount/composition slice for this tier at all (
docs/slices/observability.yaml,logstream-hub→transport-log-catalogue→transport-log-stream-sse→ the dashboard/shell slices). Nothing downstream noticed because every seam test injects its own fake.What to build
LogCatalogueimplementation: resolve a scope toLogTarget{Name,Kind,Node,Live}over the real owners (fleet store × service catalogue × operation-log store), with the three honest-emptyReasoncodes (service_not_deployed,node_has_no_units,operation_log_aged_out) served from real state.FollowFuncfor the hub — what aservice-unittarget actually follows on a node (the deploy/agent door is the existing pattern), and what anoperation-logtarget replays.control-plane/cmd/control-plane/main.go's option list alongside the other reads.docs/slices/observability.yamlgains the mount slice so the map records it.Blocks
#859 (converge backups + rescue log emitters onto the shell open-logs intent) — converging more emitters onto an intent whose transport is unmounted adds surface, not capability. This should land first.
Refs
DDR 0203 (the logs surface), ADR 0027 (the Open/Download promise), spec #791, #806/#807/#808/#809/#810/#811.
seamgate is toothless —set -eis suspended inside seam(), so every stage but the last is unable to fail a run #871swarm-claim host=elitebook-distributed-server-03 run=10600
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under ADR 0174 — veto anytime.
The decision. This ticket asked for both the MOUNT (a production
LogCatalogue+ wiring the transport into the composition root + a regression) and the live-follow SOURCE ("what a service-unit target actually follows on a node"). On implementation the source turned out to need two owners that do not exist in the tree and cannot be honestly invented in a mount slice:files) is not its unit (phpfpm-nextcloud.service). Nothing maps one to the other; deciding where that lives is a design call.needs-design.ssh <target> journalctl -u <unit> -f) — no live-follow-a-unit transport exists (only the one-shotclan.Adapter.UnitActivesystemctl is-active;journalctlis invoked nowhere remotely). It also carries the one runtime/operator-log posture question in this arc.What I shipped (the two-way door): the mount + the real catalogue. The routes now ANSWER real state instead of 404, gated as every other admin route, with a composition-root regression that fails when a logs route is unmounted (the class of miss the ticket names). Honest limit (ADR 0100): the live follow fails loud and the download is the honest empty artifact until the source lands — never a fake tail.
Why this is a two-way door: the mount + catalogue is fully revertible (delete
logs_wiring.go, drop oneappend) and proven bylogs_wiring_test.go+logcatalogue_integration_test.go. The source adapters are the genuinely-separate slices, filed as #876 (node-journal streaming source + the service→unit mapping,needs-design) and #877 (the durable operation-log line store,needs-design). Neither the mount nor the split touches a one-way door.What proves it:
go test ./control-plane/... ./internal/controlapi/ ./internal/logstream/green; the composition-root regression asserts all three routes are mounted (401, never 404) over a real composed control plane.Unblocks #859 (converge emitters onto the open-logs intent — now a mounted transport to converge onto).
close-report for #868 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope