kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-17 16:02:54 +02:00
parent 12d95b2e13
commit 1083968d45

View file

@ -265,11 +265,8 @@ class TestMissingDeptRoutes:
)
assert "dept_infra" in infra_only_routes
def test_research_head_has_no_dedicated_dept_route(self):
"""Confirms research_head is NOT reachable via any standalone dept_research route.
This test documents the gap. It will FAIL once a dept_research route is added.
"""
def test_research_head_has_dedicated_dept_route(self):
"""dept_research route exists in specialists.yaml with steps: [research_head]."""
import yaml
with open("agents/specialists.yaml") as f:
data = yaml.safe_load(f)
@ -281,17 +278,14 @@ class TestMissingDeptRoutes:
name for name, route in dept_routes.items()
if route["steps"] == ["research_head"]
]
assert len(research_only_routes) == 0, (
f"Found unexpected dept_research route(s): {research_only_routes}. "
"Update this test if route was intentionally added."
assert len(research_only_routes) == 1, (
f"Expected exactly one dept_research route with steps=[research_head], "
f"found: {research_only_routes}"
)
assert "dept_research" in research_only_routes
def test_infra_and_research_heads_missing_from_all_routes(self):
"""Both infra_head and research_head appear in NO route in specialists.yaml.
This is the core gap: the PM cannot use these department heads.
When fixed (routes added), this test will fail and should be updated/removed.
"""
def test_infra_and_research_heads_present_in_routes(self):
"""Both infra_head and research_head are reachable via routes in specialists.yaml."""
import yaml
with open("agents/specialists.yaml") as f:
data = yaml.safe_load(f)
@ -301,23 +295,15 @@ class TestMissingDeptRoutes:
for route in routes.values():
all_route_roles.update(route.get("steps", []))
# Verify the gap exists
assert "infra_head" not in all_route_roles, (
"infra_head now appears in a route. Issue 2 partially fixed. "
"Update this test."
assert "infra_head" in all_route_roles, (
"infra_head is missing from all routes — regression of KIN-ARCH-021"
)
assert "research_head" not in all_route_roles, (
"research_head now appears in a route. Issue 2 partially fixed. "
"Update this test."
assert "research_head" in all_route_roles, (
"research_head is missing from all routes — regression of KIN-ARCH-021"
)
def test_6_dept_routes_currently_exist(self):
"""Documents that exactly 6 dept_* routes exist (not 7 or 8).
The existing test test_department_routes_exist uses >= 6, which passes.
This test pins the CURRENT state. When dept_infra and dept_research are added,
this count will become 8 and this test should be updated.
"""
def test_8_dept_routes_exist(self):
"""Exactly 8 dept_* routes exist after adding dept_infra and dept_research."""
import yaml
with open("agents/specialists.yaml") as f:
data = yaml.safe_load(f)
@ -325,10 +311,9 @@ class TestMissingDeptRoutes:
routes = data["routes"]
dept_routes = {k: v for k, v in routes.items() if k.startswith("dept_")}
assert len(dept_routes) == 6, (
f"Expected 6 dept_* routes (documenting current state), "
f"found {len(dept_routes)}: {list(dept_routes.keys())}. "
"If this changed, update the count and remove gap tests above."
assert len(dept_routes) == 8, (
f"Expected 8 dept_* routes, found {len(dept_routes)}: "
f"{list(dept_routes.keys())}"
)