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