control panel: the Overview ACTIVITY box reads "no such endpoint" on every live gateway — the #830 activity route (internal/controlapi/activity.go, WithActivity) is never composed in main.go (the #815/#1343 class) #1360

Closed
opened 2026-09-10 00:45:57 +00:00 by ben · 2 comments
Owner

Symptom

Every control-panel frame of the drive-8 closing run (20260909T205006Z, 39/39 green, #1277) shows the Overview's ACTIVITY box as a warning card: no such endpoint / TRY AGAIN. Not one leg touches it, so the drive stays green — but a real operator sees a broken box on the first screen of every live gateway.

Cause

The dashboard's activity client (dashboard/src/lib/api/activityClient.ts) calls the generated getActivity(window) → GET /api/v1/activity/{window}. The handler exists: internal/controlapi/activity.go (#830, WithActivity(svc, cfg) → registerActivity mounting GET /api/v1/activity/{window}). But control-plane/cmd/control-plane/main.go never composes controlapi.WithActivity(...) — grep -n activity main.go is empty — so the route 404s on every gateway and the API's fallback text is what the box paints.

Same class as #815 → #1343 (Network read landed at the seam, never composed) and #1243 (archive health check never registered): a seam that ships without its production caller.

Fix shape

Compose controlapi.WithActivity(<ActivityService adapter over the owners' queries>, ActivityConfig{...}) in main.go beside WithNetwork, unconditional (whole or resting), behind the existing front-door auth gate (ADR 0074/0076). The owners' recent-events queries already exist (internal/monitor/recentevents.go, internal/provision/recentevents.go, internal/rescue/recentevents.go, internal/opsevent). Pin it the way network_wiring_test.go pins #1343: a wiring test that composes main.go's options and asserts GET /api/v1/activity/1h is not 404 on a resting gateway.

Evidence

test-results/private-path/20260909T205006Z/artifacts/legs/*-w2.png on elitebook-03 (any of them — they are byte-identical, GOTCHAS #218) shows the box.

Two-way door (ADR 0174): filed ready-for-agent; Ben can veto in a comment anytime.

## Symptom Every control-panel frame of the drive-8 closing run (`20260909T205006Z`, 39/39 green, #1277) shows the Overview's **ACTIVITY** box as a warning card: `no such endpoint` / **TRY AGAIN**. Not one leg touches it, so the drive stays green — but a real operator sees a broken box on the first screen of every live gateway. ## Cause The dashboard's activity client (`dashboard/src/lib/api/activityClient.ts`) calls the generated `getActivity(window)` → `GET /api/v1/activity/{window}`. The handler exists: `internal/controlapi/activity.go` (#830, `WithActivity(svc, cfg)` → `registerActivity` mounting `GET /api/v1/activity/{window}`). But `control-plane/cmd/control-plane/main.go` never composes `controlapi.WithActivity(...)` — `grep -n activity main.go` is empty — so the route 404s on every gateway and the API's fallback text is what the box paints. Same class as #815 → #1343 (Network read landed at the seam, never composed) and #1243 (archive health check never registered): a seam that ships without its production caller. ## Fix shape Compose `controlapi.WithActivity(<ActivityService adapter over the owners' queries>, ActivityConfig{...})` in `main.go` beside `WithNetwork`, unconditional (whole or resting), behind the existing front-door auth gate (ADR 0074/0076). The owners' recent-events queries already exist (`internal/monitor/recentevents.go`, `internal/provision/recentevents.go`, `internal/rescue/recentevents.go`, `internal/opsevent`). Pin it the way `network_wiring_test.go` pins #1343: a wiring test that composes main.go's options and asserts `GET /api/v1/activity/1h` is not 404 on a resting gateway. ## Evidence `test-results/private-path/20260909T205006Z/artifacts/legs/*-w2.png` on elitebook-03 (any of them — they are byte-identical, GOTCHAS #218) shows the box. Two-way door (ADR 0174): filed ready-for-agent; Ben can veto in a comment anytime.
Author
Owner

Landed on main as 9a7bd645 (actioned under the babysit mandate — the swarm had not claimed this in 2 h: both elitebook-03 capacity slots were held by a matou-app PR e2e run since 00:29Z and the workstation workers made no claims).

What landed: control-plane/cmd/control-plane/activity_wiring.go — activityReadAdapter (the production controlapi.ActivityService) fanning out over the owners' own RecentEvents: monitoring; enroll ledger + provisioning as the devices source; updates; backups; rescue's service ladders, device ladders and engagements. StandingAlerts reuses restingOverview.RaisedAlerts so the pinned band and Overview's queue cannot disagree. Both compositions build it (composed.activity); main.go mounts controlapi.WithActivity(c.activity, controlapi.ActivityConfig{}) unconditionally beside the Network read.

Pin: activity_wiring_test.go — the whole handler over the production adapter answers GET /api/v1/activity/{today,7d,30d} 200 on a resting gateway, never 404. go test ./control-plane/cmd/control-plane/ ok.

Live proof lands on the next drive that founds a gateway at or after 9a7bd645 (every control-panel frame will show the ACTIVITY box populated instead of the warning card). Ben can veto in a comment anytime (ADR 0174).

Landed on main as `9a7bd645` (actioned under the babysit mandate — the swarm had not claimed this in 2 h: both elitebook-03 capacity slots were held by a matou-app PR e2e run since 00:29Z and the workstation workers made no claims). **What landed:** `control-plane/cmd/control-plane/activity_wiring.go` — `activityReadAdapter` (the production `controlapi.ActivityService`) fanning out over the owners' own `RecentEvents`: monitoring; enroll ledger + provisioning as the devices source; updates; backups; rescue's service ladders, device ladders and engagements. `StandingAlerts` reuses `restingOverview.RaisedAlerts` so the pinned band and Overview's queue cannot disagree. Both compositions build it (`composed.activity`); `main.go` mounts `controlapi.WithActivity(c.activity, controlapi.ActivityConfig{})` unconditionally beside the Network read. **Pin:** `activity_wiring_test.go` — the whole handler over the production adapter answers `GET /api/v1/activity/{today,7d,30d}` 200 on a resting gateway, never 404. `go test ./control-plane/cmd/control-plane/` ok. Live proof lands on the next drive that founds a gateway at or after `9a7bd645` (every control-panel frame will show the ACTIVITY box populated instead of the warning card). Ben can veto in a comment anytime (ADR 0174).
ben closed this issue 2026-09-10 02:43:58 +00:00
Author
Owner

Proven live — hand fire 20260910T125710Z on elitebook-03, pinned to 9a7bd645 (archive cycle only, ADR 0221 debug), 9/9 green in 23 min, founded in full.

Every <leg>-dash.png frame shows the Overview ACTIVITY box populated — operator-session-dash.png: "gateway deployed — the control plane is live · 4 min ago" with "view all" — where every frame of the closing run 20260909T205006Z read "no such endpoint / TRY AGAIN". The route answers on a founded private-path gateway at 9a7bd645. Frames in test-results/private-path/20260910T125710Z/artifacts/legs/ on the executor host.

**Proven live** — hand fire `20260910T125710Z` on elitebook-03, pinned to `9a7bd645` (archive cycle only, ADR 0221 debug), 9/9 green in 23 min, founded in full. Every `<leg>-dash.png` frame shows the Overview ACTIVITY box populated — `operator-session-dash.png`: "gateway deployed — the control plane is live · 4 min ago" with "view all" — where every frame of the closing run `20260909T205006Z` read "no such endpoint / TRY AGAIN". The route answers on a founded private-path gateway at 9a7bd645. Frames in `test-results/private-path/20260910T125710Z/artifacts/legs/` on the executor host.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1360
No description provided.