feat(legacy-meter): schedule 8h capture activity on railiance01
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 49s
Build and Publish Container Image / build-and-push (push) Successful in 2m50s

Add legacy-meter-8h-capture cron (0 */8 * * * UTC), pass hours through the
state-hub resolver, and label progress summaries by window size.
This commit is contained in:
tegwick 2026-07-09 09:29:41 +02:00
parent b59bf92341
commit f41cf14977
5 changed files with 104 additions and 2 deletions

View file

@ -768,6 +768,32 @@ def test_legacy_meter_weekly_review_summarises_candidates(monkeypatch) -> None:
assert result["retirement_candidates"][0]["interface_key"] == "mcp:create_workstream"
def test_legacy_meter_weekly_review_passes_hours_param(monkeypatch) -> None:
seen: dict[str, Any] = {}
def fake_get(url: str, **kwargs: Any) -> DummyResponse:
seen["params"] = kwargs.get("params")
return DummyResponse(
{
"generated_at": "2026-07-09T08:00:00+00:00",
"window_start": "2026-07-09T00:00:00+00:00",
"window_end": "2026-07-09T08:00:00+00:00",
"interfaces": [],
"retirement_candidates": [],
}
)
monkeypatch.setenv("STATE_HUB_URL", "http://state-hub.test")
monkeypatch.setattr(httpx, "get", fake_get)
result = StateHubContextResolver().resolve(
"legacy_meter_weekly_review", None, {"hours": 8}
)
assert seen["params"] == {"hours": 8}
assert result["window_label"] == "8h"
def test_phase5_stabilization_check_passes(monkeypatch) -> None:
payloads = {
"/state/health": {"status": "ok", "db": "connected"},