test: whole-table tag counts become non-system counts
CI / lint (push) Successful in 2s
CI / frontend-build (push) Successful in 18s
CI / backend-lint-and-test (push) Successful in 33s
CI / integration (push) Successful in 3m32s

The four remaining run-1895 failures were stale expectations, not
predicate bugs — prune/reset returned the right counts, but these tests
verified no-deletion by counting the ENTIRE tag table (or asserting the
full kind set), which now includes the three seeded hygiene tags that
survive prunes and resets by design. Filter is_system=false with a
pointer to #128 so future system tags cannot re-break them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CDgx8bQS5YrGRK76v8HUnM
This commit is contained in:
2026-07-03 08:40:11 -04:00
parent f77e75147d
commit 65bd1c22c3
2 changed files with 18 additions and 7 deletions
+3 -1
View File
@@ -660,8 +660,10 @@ async def test_reset_content_tagging_apply_requires_confirm_token(client, db):
for bad in ({"dry_run": False}, {"dry_run": False, "confirm": "deadbeef"}):
resp = await client.post("/api/admin/tags/reset-content", json=bad)
assert resp.status_code == 400
# Non-system only: the seeded hygiene tags (#128) survive a reset by
# design, so they'd inflate a whole-table count.
remaining = (await db.execute(
select(func.count()).select_from(Tag)
select(func.count()).select_from(Tag).where(Tag.is_system.is_(False))
)).scalar_one()
assert remaining == 1