feat(ACTIVITY-WP-0029): inventory callers, retarget sweep, bound execution
Map every State Hub/core-hub caller to a post-retirement owner. Keep the 15-minute sweep schedule here and point the engine at repo-manager (State Hub dual-run by default, REPO_MANAGER_URL when present). Publish GET /execution/semantics and 410 workplan launch routes so State Hub /execution/* is not re-homed as a task database. T03 still waits on HUB-WP-0004.
This commit is contained in:
parent
df3330f165
commit
f6cfc28c33
12 changed files with 359 additions and 12 deletions
62
docs/execution-queue-boundary.md
Normal file
62
docs/execution-queue-boundary.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
id: ACTIVITY-WP-0029-T04
|
||||
type: contract
|
||||
title: Execution queue boundary
|
||||
updated: "2026-08-18"
|
||||
---
|
||||
|
||||
# Execution queue boundary
|
||||
|
||||
Replaces State Hub `/execution/*` as the place callers look for *when work
|
||||
should fire*. It does **not** move workplan files, task lifecycle, or ITC
|
||||
Task Model types into activity-core.
|
||||
|
||||
## What activity-core owns
|
||||
|
||||
| Surface | Meaning |
|
||||
| --- | --- |
|
||||
| Temporal Schedule + `POST /activity-definitions/{id}/trigger` | When an ActivityDefinition fires |
|
||||
| `POST /ops-runs/claim` and complete/fail/heartbeat | Claimable **ops run** for that fire (ACT-ADR-005) |
|
||||
| `GET /execution/semantics` | This contract |
|
||||
|
||||
`port.schedule` (hub-extension 0.1) is the hub-core **outbound** port that
|
||||
asks activity-core to wake a schedule or accept a launch of an
|
||||
ActivityDefinition. activity-core implements the receiving side.
|
||||
|
||||
## What activity-core does not own
|
||||
|
||||
| Concern | Owner |
|
||||
| --- | --- |
|
||||
| Workplan / task **files** and their status | The repo (ADR-001) |
|
||||
| Work-record **index** and C-rule consistency | repo-manager (`port.work`) |
|
||||
| Task / Commitment / TaskState vocabulary | info-tech-canon Task Model |
|
||||
| Assign / track / close a development task | issue-core / work records |
|
||||
| Policy publication | policy-nexus |
|
||||
| Workplan `execution_state` rows on State Hub | retiring; do not re-home as hub tables here |
|
||||
|
||||
A workplan being `active` is a **lifecycle** fact in the repo file. An
|
||||
ops_run being `open` is an **automation fire**. Those are different planes
|
||||
(ACT-ADR-005). Mapping State Hub `POST /execution/launch-requests` onto
|
||||
“create a workplan execution row here” would collapse them again.
|
||||
|
||||
## Replacement for State Hub routes
|
||||
|
||||
| State Hub route | Replacement |
|
||||
| --- | --- |
|
||||
| `GET /execution/semantics` | `GET /execution/semantics` on activity-core (this contract) |
|
||||
| `POST /execution/launch-requests` (workplan) | Do not send here. Queue the workplan in the **repo file**; use an ActivityDefinition + ops_run if the work is a recurring/ops fire |
|
||||
| `GET /execution/launch-requests` | `GET /ops-runs` |
|
||||
| `GET /execution/workplan-stack` | repo-manager work index / hub-core projection — not this API |
|
||||
| `PATCH /execution/workplans/{id}/intent` | Edit the workplan file; repo-manager indexes it |
|
||||
|
||||
Callers that still hit `/execution/*` on activity-core for workplan ids get
|
||||
**410** with `replacement_ref` pointing at the table above.
|
||||
|
||||
## Semantics payload
|
||||
|
||||
`GET /execution/semantics` returns:
|
||||
|
||||
- `activity_core_owns` — schedules, triggers, ops_run claim/complete
|
||||
- `activity_core_does_not_own` — workplan files, task lifecycle, C-rules
|
||||
- `replacements` — map from retired State Hub paths to current surfaces
|
||||
- `port` — `port.schedule` (consume; do not invent the hub-core side here)
|
||||
|
|
@ -778,6 +778,10 @@ retry transient 502/503/504 then **degrade** by default so required workflows do
|
|||
not thrash Temporal when the edge is briefly unavailable. Details:
|
||||
`docs/edge-relay-resilience.md` (ACTIVITY-WP-0027-T06).
|
||||
|
||||
The consistency sweep schedule stays in activity-core; the C-rule engine is
|
||||
repo-manager. Default POST still uses the State Hub dual-run adapter. Override
|
||||
with `CONSISTENCY_SWEEP_URL` or `REPO_MANAGER_URL` (`docs/state-hub-caller-map.md`).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Worker fails to start: "ACTCORE_DB_URL is required"
|
||||
|
|
|
|||
63
docs/state-hub-caller-map.md
Normal file
63
docs/state-hub-caller-map.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
id: ACTIVITY-WP-0029-T01
|
||||
type: inventory
|
||||
title: State Hub and hub-core callers
|
||||
updated: "2026-08-18"
|
||||
---
|
||||
|
||||
# State Hub / hub-core caller map
|
||||
|
||||
Inventory for ACTIVITY-WP-0029-T01. Current URLs still go to State Hub unless
|
||||
noted. **Target owner** is who should own the *capability* after retirement.
|
||||
activity-core stays the scheduler even when it is not the engine.
|
||||
|
||||
Hub-core port names are from `helixforge.hub-extension` 0.1
|
||||
(`prj-state-hub-retirement/architecture/hub-extension-contract_v0.1.yaml`).
|
||||
HUB-WP-0004 has not shipped those ports yet.
|
||||
|
||||
| Caller | Current URL | SHR-INV | Target owner | Port (when named) |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `StateHubContextResolver.domain_summary` | `GET /state/domain/{domain}` | progress / state-projections | hub-core | `port.projection.query` |
|
||||
| `state_summary` | `GET /state/summary` | state-projections | hub-core | `port.projection.query` |
|
||||
| `next_steps` | `GET /state/next_steps` | state-projections | hub-core | `port.projection.query` |
|
||||
| `workplan_index` | `GET /workplans/index` | work-records | repo-manager | `port.work` |
|
||||
| `hub_inbox` | `GET /messages/` | messaging | hub-core | `port.messaging` |
|
||||
| `pending_decisions` | `GET /decisions/` | work-records | repo-manager | `port.work` |
|
||||
| `coding_retro` | `GET /progress/?event_type=coding_retro` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `daily_triage_digest` | `GET /progress/` + workplan/task reads | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `recently_on_scope_hourly` | `POST /recently-on-scope/hourly` | state-projections | hub-core (generation stays on hub host) | `port.projection.query` |
|
||||
| `consistency_sweep_remote_all` | `POST /consistency/sweep/remote-all` | `job:consistency-sweep-remote-all` + `route:POST:/consistency/sweep/remote-all` | **repo-manager** engine; activity-core schedule | none (RM command, not a hub port) |
|
||||
| `phase5_stabilization_check` | `GET /state/health`, `/state/summary`, `/progress/` | state-projections | hub-core | `port.projection.query` |
|
||||
| `legacy_meter_weekly_review` | `GET /legacy-meter/weekly-review` | catalogs | the-custodian / hub-core catalog | `port.projection.query` |
|
||||
| `binky_rhythm_status` / `fi_brief_status` | `GET /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `repo_sbom_status` | `GET /sbom/{slug}` or `GET /repos/` | sbom-inventory | sbom-nexus (parked: ACTIVITY-WP-0030) | n/a |
|
||||
| `todo_md_staleness` | `GET /repos/todo-md-staleness` | repo-consistency | repo-manager | `port.repo` |
|
||||
| `kaizen` / `reuse_surface` repo list | `GET /repos/` | repo-registry | repo-manager | `port.repo` |
|
||||
| `StateHubProgressSink` | `POST /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `report_sinks` state-hub-progress | `POST /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `ops_evidence_sinks` | `POST /progress/` | progress-telemetry | hub-core | `port.events.interaction` |
|
||||
| `schedule_health` miss reports | `POST /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `ops_console` audit notes | `POST /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `automation_status` / `review_cli` | `GET /progress/` | progress-telemetry | hub-core | `port.events.progress` |
|
||||
| `CoreHubContextResolver.stabilization_check` | `https://hub.coulomb.social` `/healthz` `/readyz` `/api/v2/*` | CORE-WP-0010 | hub-core runtime (core-hub archived after cutover) | compatibility surface |
|
||||
| Manual trigger | `POST /activity-definitions/{id}/trigger` | — | **activity-core** | consumed via `port.schedule` |
|
||||
| Ops-run claim queue | `/ops-runs/*` | workplan-execution-queue (replace) | **activity-core** | consumed via `port.schedule` |
|
||||
|
||||
## Sweep split (T02)
|
||||
|
||||
- **Schedule:** activity-core cron `*/15 * * * *` UTC (`state-hub-consistency-sweep`).
|
||||
- **Engine:** repo-manager C-rules / `rmgr reconcile`.
|
||||
- **Adapter until RM HTTP exists:** State Hub `POST /consistency/sweep/remote-all`
|
||||
(dual-run when `RM_RECONCILE` is on). Override with `CONSISTENCY_SWEEP_URL`
|
||||
or `REPO_MANAGER_URL` + optional `CONSISTENCY_SWEEP_PATH`.
|
||||
|
||||
## Evidence sink (T03 — wait)
|
||||
|
||||
All `POST /progress/` callers stay on the State Hub beachhead until
|
||||
**HUB-WP-0004** publishes `port.events.progress` / `port.events.interaction`.
|
||||
Do not add a second permanent progress host.
|
||||
|
||||
## Execution (T04)
|
||||
|
||||
State Hub `/execution/*` is **not** a task database and must not move here as
|
||||
workplan rows. See `docs/execution-queue-boundary.md`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue