From 2bbd1c2e701be064ea02c88e48bf589fb515f27e Mon Sep 17 00:00:00 2001 From: Renn F Date: Mon, 22 Jun 2026 15:19:50 +0200 Subject: [PATCH] test(conventions): baseline asserts the universal hygiene block rule, not a placement rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The baseline-constraint and conventions-map integration tests asserted 'no models in routers' — the old UNIVERSAL block default. Now that placement rules are scan-derived (only seeded where the target module exists), an empty-scan test project carries no_models_in_routers no longer; the universal block rule is no_lint_suppressions. Updated the five assertions accordingly; behaviour (baseline attaches, isn't suppressed, is idempotent) is unchanged. --- tests/integration/test_conventions_service.py | 2 +- tests/integration/test_project_conventions_routes.py | 2 +- tests/integration/test_task_baseline_constraints.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_conventions_service.py b/tests/integration/test_conventions_service.py index 32d59e76..21160c06 100644 --- a/tests/integration/test_conventions_service.py +++ b/tests/integration/test_conventions_service.py @@ -133,7 +133,7 @@ async def test_baseline_constraints_include_block_rules( constraints = await get_conventions_service(db_session).baseline_constraints( project ) - assert any("no models in routers" in c for c in constraints) + assert any("no lint suppressions" in c for c in constraints) async def test_render_ambient_block_is_bounded( diff --git a/tests/integration/test_project_conventions_routes.py b/tests/integration/test_project_conventions_routes.py index 8826a6cd..758c2fdd 100644 --- a/tests/integration/test_project_conventions_routes.py +++ b/tests/integration/test_project_conventions_routes.py @@ -81,7 +81,7 @@ async def test_get_conventions_returns_map_and_health(client: AsyncClient) -> No resp = await client.get(f"/api/projects/{project_id}/conventions", headers=_HDR) assert resp.status_code == HTTPStatus.OK body = resp.json() - assert body["standard"]["rules"]["no_models_in_routers"]["level"] == "block" + assert body["standard"]["rules"]["no_lint_suppressions"]["level"] == "block" assert body["health"]["status"] in {"missing", "unknown", "ok", "degraded"} diff --git a/tests/integration/test_task_baseline_constraints.py b/tests/integration/test_task_baseline_constraints.py index 8749449f..87075df1 100644 --- a/tests/integration/test_task_baseline_constraints.py +++ b/tests/integration/test_task_baseline_constraints.py @@ -70,7 +70,7 @@ async def test_baseline_attached_when_flag_on( task = await TaskService(db_session).create(_req(agent, project, "Do the work")) assert task.description is not None assert "## Constraints" in task.description - assert "no models in routers" in task.description + assert "no lint suppressions" in task.description async def test_flag_off_attaches_nothing( @@ -93,7 +93,7 @@ async def test_baseline_not_suppressed_by_agent_constraints_section( task = await TaskService(db_session).create(_req(agent, project, seeded)) assert task.description is not None assert "a task-specific note" in task.description - assert "no models in routers" in task.description + assert "no lint suppressions" in task.description async def test_baseline_attach_is_idempotent( @@ -107,4 +107,4 @@ async def test_baseline_attach_is_idempotent( await svc._attach_baseline_constraints(task) assert task.description == before assert task.description is not None - assert task.description.count("no models in routers") == 1 + assert task.description.count("no lint suppressions") == 1