114 lines
3 KiB
Markdown
114 lines
3 KiB
Markdown
---
|
|
id: STATE-WP-0078
|
|
type: workplan
|
|
title: "Ops run read projection for fleet visibility"
|
|
domain: infotech
|
|
repo: state-hub
|
|
status: finished
|
|
owner: codex
|
|
topic_slug: state-hub
|
|
priority: low
|
|
created: "2026-08-03"
|
|
updated: "2026-08-08"
|
|
depends_on:
|
|
- ACTIVITY-WP-0026
|
|
related:
|
|
- ACT-ADR-005
|
|
- STATE-WP-0074
|
|
state_hub_workstream_id: "57b75246-ef6d-4d6e-93dc-7f47e7200d1d"
|
|
---
|
|
|
|
# STATE-WP-0078 — Ops run read projection
|
|
|
|
## Origin
|
|
|
|
ACT-ADR-005: State Hub remains the **work-record** read model on coulombcore.
|
|
It may **project** activity-core `ops_run` state for fleet ops UI without becoming
|
|
the claim authority.
|
|
|
|
## Goal
|
|
|
|
Expose open/failed/recent ops runs to operators and agents via State Hub
|
|
summary/API **read paths**, fed from activity-core (edge/NATS/pull) — so
|
|
coulombcore-oriented agents see automation health without claiming work.
|
|
|
|
## Tasks
|
|
|
|
### T01 — Contract with activity-core
|
|
|
|
```task
|
|
id: STATE-WP-0078-T01
|
|
status: done
|
|
priority: medium
|
|
state_hub_task_id: "399b4985-3578-4fff-97dd-0f68e1e266b3"
|
|
```
|
|
|
|
Agree payload shape with ACTIVITY-WP-0026 (id, definition, target_repo, state,
|
|
lease, updated_at, last_error). Document whether pull (hub polls actcore) or
|
|
push (actcore posts progress summary) is v1.
|
|
|
|
**Done when:** short contract note in `docs/` or linked from ACT-ADR-005.
|
|
|
|
Implemented in `docs/ops-run-read-projection.md`: v1 is an authenticated,
|
|
cached pull from activity-core `GET /ops-runs`; activity-core remains the only
|
|
claim/lease/completion authority.
|
|
|
|
---
|
|
|
|
### T02 — Read API + summary field
|
|
|
|
```task
|
|
id: STATE-WP-0078-T02
|
|
status: done
|
|
priority: medium
|
|
state_hub_task_id: "192be2e0-0335-46da-ba22-17e3e8f0d28c"
|
|
```
|
|
|
|
Minimal:
|
|
|
|
- `GET /ops-runs/summary` or extend `/state/summary` with `ops_runs: { open, claimed, failed_24h }`
|
|
- No claim/complete endpoints on State Hub
|
|
|
|
**Done when:** MCP/summary consumers can show stuck automation.
|
|
|
|
Implemented `GET /ops-runs/summary` and the `/state/summary.ops_runs` projection,
|
|
including open/claimed/failed-24h counts, SLA-stuck count, bounded run details,
|
|
and stale/unavailable behavior. No write endpoints exist under State Hub's
|
|
`/ops-runs` route.
|
|
|
|
---
|
|
|
|
### T03 — Edge/federation notes
|
|
|
|
```task
|
|
id: STATE-WP-0078-T03
|
|
status: done
|
|
priority: low
|
|
state_hub_task_id: "09afc52e-e1c6-454f-ac1d-33d6e773f47f"
|
|
```
|
|
|
|
Document coulombcore vs railiance: claim on railiance actcore-api; visibility
|
|
may lag if edge relay down — alert preference.
|
|
|
|
**Done when:** cluster-operating-model or ops doc updated.
|
|
|
|
Documented in `docs/cluster-operating-model.md` and
|
|
`docs/ops-run-read-projection.md`.
|
|
|
|
## Acceptance
|
|
|
|
- [x] Hub does not claim ops_runs
|
|
- [x] Operators see automation backlog on primary hub views
|
|
- [x] No Forgejo/Gitea dependency
|
|
|
|
## Residual handoff
|
|
|
|
Production deployment wiring is tracked as State Hub intake
|
|
`019fe359-debb-71a6-958c-b8f4ac3574a0` (`origin: residual`,
|
|
`origin_ref: STATE-WP-0078`). It covers the private activity-core URL,
|
|
OpenBao/ESO token injection, rollout, and live fleet verification.
|
|
|
|
## Out of scope
|
|
|
|
- Moving claim API to State Hub
|
|
- Workplan file generation for daily ops
|