feat: Phase 5 stabilization schedules and custodian path URIs
Add phase5_stabilization_check State Hub resolver with progress evidence sinks, schedule projections for daily and closeout checks, custodian:// and activity-core:// runtime path resolution, and Railiance mounts under /var/custodian.
This commit is contained in:
parent
5c3a89c495
commit
70e3154b05
10 changed files with 672 additions and 18 deletions
|
|
@ -607,3 +607,50 @@ def test_daily_triage_digest_is_curated_scalar_json(monkeypatch) -> None:
|
|||
"code_score_high_gain_high_effort_candidates"
|
||||
)
|
||||
assert digest["ranked_suggestions"][0]["origin_ref"] == "issue-core-ingestion-api-key"
|
||||
|
||||
|
||||
def test_phase5_stabilization_check_passes(monkeypatch) -> None:
|
||||
payloads = {
|
||||
"/state/health": {"status": "ok", "db": "connected"},
|
||||
"/state/summary": {
|
||||
"totals": {
|
||||
"workstreams": {"total": 640},
|
||||
"tasks": {"total": 4002},
|
||||
"topics": {"total": 14},
|
||||
}
|
||||
},
|
||||
"/progress/": [],
|
||||
}
|
||||
|
||||
def fake_get(url: str, **kwargs: Any) -> DummyResponse:
|
||||
path = url.replace("http://state-hub.test", "")
|
||||
params = kwargs.get("params") or {}
|
||||
if path == "/progress/":
|
||||
if params.get("event_type") == "consistency_sweep_remote_all":
|
||||
return DummyResponse([
|
||||
{
|
||||
"created_at": "2026-07-06T20:00:00+00:00",
|
||||
"detail": {"exit_code": 0, "skipped_missing": []},
|
||||
}
|
||||
])
|
||||
if params.get("event_type") == "daily_triage":
|
||||
return DummyResponse([
|
||||
{"created_at": "2026-07-06T19:00:00+00:00", "summary": "ok"}
|
||||
])
|
||||
return DummyResponse(payloads.get(path, {}))
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
fixed_now = datetime(2026, 7, 7, 10, 0, tzinfo=timezone.utc)
|
||||
monkeypatch.setenv("STATE_HUB_URL", "http://state-hub.test")
|
||||
monkeypatch.setattr(httpx, "get", fake_get)
|
||||
monkeypatch.setattr(
|
||||
"activity_core.context_resolvers.state_hub._utc_now",
|
||||
lambda: fixed_now,
|
||||
)
|
||||
|
||||
result = StateHubContextResolver().resolve("phase5_stabilization_check", None, {})
|
||||
|
||||
assert result["overall_pass"] is True
|
||||
assert result["skipped"] is False
|
||||
assert result["checks"]["totals"]["pass"] is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue