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

@ -18,6 +18,7 @@ def main(argv: list[str] | None = None) -> int:
run.add_argument("--description", required=True)
run.add_argument("--actor", default="agt")
run.add_argument("--project", default="glas-harness")
run.add_argument("--no-hub", action="store_true", help="Skip the gateway's own hub reporting")
args = parser.parse_args(argv)
@ -31,6 +32,7 @@ def main(argv: list[str] | None = None) -> int:
description=args.description,
actor=args.actor,
project=args.project,
report_to_hub=not args.no_hub,
)
print(json.dumps(result, indent=2))
return 0 if result["tool_ok"] else 1