Files
roboco/tests/integration/test_migration_014_drop_pm_approvals.py
T
Renn F f826285651 [chore] remove all remaining type:ignore suppressions from tests/
Converts 115 `# type: ignore[...]` suppressions across 23 test files to
no-suppression patterns (helper-return widening to Any, local Any aliases,
cc:Any aliases, cast at narrow call sites, typed fixtures) so the hard
no-type:ignore convention holds across tests/. No test logic or assertions
changed — only mock-wiring mechanics and type annotations.

Gate: ruff check tests/ clean; mypy tests/ (538 files) clean; 176 changed-file
tests pass. Zero real suppressions remain (the 7 grep hits are 3 hygiene-
checker string-literal test inputs and 4 prose mentions in comments).
2026-06-28 17:00:20 +02:00

49 lines
1.6 KiB
Python

"""Wave B2 (2026-05-12, re-scoped): migration 014 drops pm_approvals.
Original spec proposed dropping three Task columns; investigation found
quick_context and proactive_context are actively used (original_developer
tracking, RAG context). Only pm_approvals is truly orphaned.
"""
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
from sqlalchemy import text
if TYPE_CHECKING:
from sqlalchemy.ext.asyncio import AsyncSession
@pytest.mark.asyncio
async def test_pm_approvals_dropped(db_session: AsyncSession) -> None:
"""pm_approvals column is gone from the tasks table."""
result = await db_session.execute(
text(
"SELECT column_name FROM information_schema.columns "
"WHERE table_name = 'tasks' AND column_name = 'pm_approvals'"
)
)
rows = list(result)
assert rows == [], "pm_approvals column should have been dropped"
@pytest.mark.asyncio
async def test_quick_context_and_proactive_context_remain(
db_session: AsyncSession,
) -> None:
"""quick_context and proactive_context MUST remain — they're actively used."""
result = await db_session.execute(
text(
"SELECT column_name FROM information_schema.columns "
"WHERE table_name = 'tasks' "
"AND column_name IN ('quick_context', 'proactive_context')"
)
)
rows = {r[0] for r in result}
assert "quick_context" in rows, (
"quick_context must remain (original_developer + audit)"
)
assert "proactive_context" in rows, "proactive_context must remain (RAG injection)"