chore: update standalone state hub wiring

This commit is contained in:
2026-05-17 20:01:21 +02:00
parent d444462de0
commit fdc395a600
23 changed files with 40 additions and 42 deletions

View File

@@ -24,7 +24,7 @@ events** on NATS JetStream so activity-core can react.
POST /domain-goals/*/activate │ │ │
scripts/cleanup_stale_tasks.py │ │ ▼
└──────────────────────┘ RunActivityWorkflow
the-custodian/state-hub (creates tasks in
state-hub (creates tasks in
issue-core, etc.)
```
@@ -147,5 +147,5 @@ curl -X POST http://127.0.0.1:8000/repos/<slug>/sync
# Observe the envelope on the subscriber. Sample shape:
# {"id":"...","type":"org.statehub.workstream.completed","version":"1.0",
# "timestamp":"...","publisher":"the-custodian/state-hub","attributes":{...}}
# "timestamp":"...","publisher":"state-hub","attributes":{...}}
```

View File

@@ -39,7 +39,7 @@ run them on a schedule.
### A. `state-hub-consistency-sweep`
```yaml
# activity-definitions/the-custodian/state-hub-consistency-sweep.yaml
# activity-definitions/state-hub-consistency-sweep.yaml
id: the-custodian.state-hub-consistency-sweep
description: |
Sweep all registered repos: pull, reconcile workplan files ↔ DB,
@@ -60,7 +60,7 @@ rule:
instruction:
kind: shell
cmd: >-
cd /home/worsch/the-custodian/state-hub &&
cd /home/worsch/state-hub &&
.venv/bin/python scripts/consistency_check.py --remote --all --max-seconds 300
on_failure: log_and_continue # warn-only sweeps must not page on transient failures
```
@@ -75,7 +75,7 @@ Notes:
### B. `state-hub-stale-task-cleanup`
```yaml
# activity-definitions/the-custodian/state-hub-stale-task-cleanup.yaml
# activity-definitions/state-hub-stale-task-cleanup.yaml
id: the-custodian.state-hub-stale-task-cleanup
description: |
Daily sweep that cancels tasks still 'todo|in_progress|blocked' inside
@@ -88,7 +88,7 @@ trigger:
instruction:
kind: shell
cmd: >-
cd /home/worsch/the-custodian/state-hub &&
cd /home/worsch/state-hub &&
.venv/bin/python scripts/cleanup_stale_tasks.py
```

View File

@@ -59,13 +59,13 @@ Each message body conforms to the `EventEnvelope` schema in
"type": "org.statehub.repo.registered",
"version": "1.0",
"timestamp": "2026-05-17T14:00:00Z",
"publisher": "the-custodian/state-hub",
"publisher": "state-hub",
"attributes": { "...": "event-specific" }
}
```
`type` matches the subject. `publisher` is always
`the-custodian/state-hub` for events emitted from this repo.
`state-hub` for events emitted from this repo.
---