Implement ACTIVITY-WP-0026 ops_run claim queue (T01–T06).
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Build and Publish Container Image / build-and-push (push) Successful in 52s

Add durable claimable ops_runs table, emit dual-write on TaskSpec, REST
claim/lease/complete/fail API, ops status visibility, and consumer docs
aligned with ACT-ADR-005. T07 railiance rollout remains deploy-side.
This commit is contained in:
tegwick 2026-08-03 19:22:50 +02:00
parent a145cc4027
commit 15eb3a2066
15 changed files with 1294 additions and 27 deletions

View file

@ -3,6 +3,20 @@
activity-core owns the decision to spawn a task and the audit trail that says
why it spawned. It does not own downstream task lifecycle state after emission.
## Ops claim vs issue-core (ACT-ADR-005 / ACTIVITY-WP-0026)
| Concern | Home |
| ------- | ---- |
| **Claimable automation run** | `ops_runs` table + `POST /ops-runs/claim` in activity-core |
| **Fleet visibility / progress** | IssueSink (`state-hub` default) |
| **External tracker ticket** | issue-core → **Forgejo** (opt-in `ISSUE_SINK_TYPE=rest` only) |
**`ops_run` is not issue-core.** Harnesses must claim ops runs; they must not
poll issue-core or Forgejo for scheduled FI/Binky-style work. Full contract:
`docs/ops-run-queue.md` and `docs/task-emission-consumer-contract.md`.
Self-hosted forge product name: **Forgejo** only (no Gitea support path).
## Sink matrix (ACTIVITY-WP-0022)
| `ISSUE_SINK_TYPE` | Destination | Default? |
@ -72,6 +86,9 @@ activity-core.
Failed to connect to backend 'forgejo-inbox': Failed to connect to Gitea API
```
(Historical error string from the Forgejo-compatible client library — the
deployed forge is **Forgejo**, not Gitea.)
**Disposition (ACTIVITY-WP-0023-T06):** activity-core keeps global default
`state-hub` and does **not** flip production to `rest`. Path A is owned by
**issue-core**: rotate/fix `GITEA_BACKEND_TOKEN` (Forgejo backend PAT for the
@ -79,6 +96,9 @@ forgejo-inbox connector — not the activity-core `ISSUE_CORE_API_KEY`
ingestion key). After issue-core proves `POST /issues/`**201**, operators may
opt in per definition / overlay only (WP-0022).
Internal scheduled automation should use **ops_run claim** (WP-0026), not wait
on this rest path.
Smoke from worker (does not change sink env):
```bash