---
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: "81ed67ec-e3f8-52cd-bce9-4432ff9095cb"
---

# 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: "ff4f5ae8-67fb-5fe2-a5cf-75c551cfdeef"
```

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: "07deec86-26aa-5dc4-8605-f9b704d33151"
```

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: "63e14866-4804-5c45-8bab-46d949adfd00"
```

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  
