feat(ACTIVITY-WP-0029): inventory callers, retarget sweep, bound execution
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 32s

Map every State Hub/core-hub caller to a post-retirement owner. Keep the
15-minute sweep schedule here and point the engine at repo-manager
(State Hub dual-run by default, REPO_MANAGER_URL when present). Publish
GET /execution/semantics and 410 workplan launch routes so State Hub
/execution/* is not re-homed as a task database. T03 still waits on
HUB-WP-0004.
This commit is contained in:
tegwick 2026-08-18 10:52:56 +02:00
parent df3330f165
commit f6cfc28c33
12 changed files with 359 additions and 12 deletions

View file

@ -553,6 +553,9 @@ def test_consistency_sweep_remote_all_posts_batch(monkeypatch) -> None:
)
monkeypatch.setenv("STATE_HUB_URL", "http://state-hub.test/")
monkeypatch.delenv("REPO_MANAGER_URL", raising=False)
monkeypatch.delenv("CONSISTENCY_SWEEP_URL", raising=False)
monkeypatch.delenv("CONSISTENCY_SWEEP_PATH", raising=False)
monkeypatch.setattr(httpx, "post", fake_post)
result = StateHubContextResolver().resolve(
@ -563,6 +566,9 @@ def test_consistency_sweep_remote_all_posts_batch(monkeypatch) -> None:
assert result["exit_code"] == 0
assert result["repos_processed"][0]["repo_slug"] == "state-hub"
assert result["engine_owner"] == "repo-manager"
assert result["adapter"] == "state-hub-dual-run"
assert result["sweep_url"] == "http://state-hub.test/consistency/sweep/remote-all"
assert calls == [
{
"url": "http://state-hub.test/consistency/sweep/remote-all",
@ -572,6 +578,37 @@ def test_consistency_sweep_remote_all_posts_batch(monkeypatch) -> None:
]
def test_consistency_sweep_uses_repo_manager_url(monkeypatch) -> None:
calls: list[dict[str, Any]] = []
def fake_post(url: str, **kwargs: Any) -> DummyResponse:
calls.append({"url": url, **kwargs})
return DummyResponse(
{
"exit_code": 0,
"lock_skipped": False,
"repos_processed": [],
}
)
monkeypatch.setenv("STATE_HUB_URL", "http://state-hub.test/")
monkeypatch.setenv("REPO_MANAGER_URL", "http://repo-manager.test")
monkeypatch.setenv("CONSISTENCY_SWEEP_PATH", "/v1/consistency/sweep/remote-all")
monkeypatch.setattr(httpx, "post", fake_post)
result = StateHubContextResolver().resolve(
"consistency_sweep_remote_all",
None,
{"max_seconds": 300},
)
assert result["adapter"] == "repo-manager"
assert result["engine_owner"] == "repo-manager"
assert calls[0]["url"] == (
"http://repo-manager.test/v1/consistency/sweep/remote-all"
)
def test_consistency_sweep_remote_all_failure_bubbles(monkeypatch) -> None:
def fake_post(url: str, **kwargs: Any) -> DummyResponse:
raise httpx.ConnectError("offline")