Wire the gateway's own State Hub reporting (GLAS-WP-0002-T03)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

hub.py mirrors the two reins' hub.py under author: agt-glas-harness.
run_task_through_rein gains report_to_hub (default True), posting one
gateway_run progress event from a finally block -- fires on both
success and failure, giving the gateway an audit trail independent of
whatever the rein itself reports. cli.py gained a matching --no-hub
flag.

Live-verified: ran a real task through ReinOpenWeights with hub
reporting enabled, confirmed the gateway_run event landed with correct
detail and a real commit sha. 4 new tests, 23/23 passing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
tegwick 2026-07-26 20:20:17 +02:00
parent 4d21b40cef
commit 2925538b93
6 changed files with 206 additions and 3 deletions

View file

@ -2,6 +2,7 @@
id: GLAS-WP-0002
title: "Observability and composability follow-ups"
status: proposed
state_hub_workstream_id: "ec0777ff-18ce-4666-abaf-5bd2ff0fd4b9"
---
Four items surfaced as open-but-not-urgent while closing out
@ -33,6 +34,7 @@ this same task — not before.
id: GLAS-WP-0002-T01
status: todo
priority: medium
state_hub_task_id: "2de6074e-b72b-4eb7-b454-6b849011348c"
```
## Task: Live-verify rein-openweights's OpenBao credential path
@ -53,6 +55,7 @@ both repos.
id: GLAS-WP-0002-T02
status: todo
priority: medium
state_hub_task_id: "74b4f35b-9cdd-4228-aeed-e0eec458c0bf"
```
## Task: Wire glas-harness's own State Hub reporting from the gateway
@ -67,10 +70,26 @@ what makes the *gateway's* audit trail exist independent of which rein
ran, matching the "observable by default" design principle in
`INTENT.md`.
**Done (2026-07-26).** `src/glas_harness/hub.py` (mirrors the two
reins' hub.py under `author: agt-glas-harness`); `gateway.py`'s
`run_task_through_rein` gains `report_to_hub: bool = True`, posting one
`gateway_run` progress event from a `finally` block — fires on both
success and failure (a raised exception still leaves an audit trail),
with `ok`/`rein`/`sandbox_id`/`sandbox_profile`/`project`/`result`/
`error` in the detail. `cli.py` gained a matching `--no-hub` flag. Live
verified: ran a real task through `ReinOpenWeights` with hub reporting
enabled, confirmed the `gateway_run` event landed in State Hub with the
correct detail (`author: agt-glas-harness`, real commit sha in
`result`). Token events skipped for now — `ToolResult` doesn't carry a
uniform token count across reins, and it wasn't worth forcing one just
for this task. 4 new tests (success/failure/disabled paths), 23/23
passing.
```task
id: GLAS-WP-0002-T03
status: todo
status: done
priority: high
state_hub_task_id: "76462175-4a85-4552-a6c1-af871cc1b8d3"
```
## Task: First slice of glas-harness's remaining charter pillars
@ -92,4 +111,5 @@ indefinitely.
id: GLAS-WP-0002-T04
status: todo
priority: low
state_hub_task_id: "98d4be61-5923-4445-b1f8-5135ada13ad9"
```