CI red on main — 2 stale test assertions blocking all PR merges #500
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#500
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Bug
Lineage
Standalone — discovered 2026-04-17 while validating PR #499 (monthly-fee Payment Links). Inspection of Woodpecker pipelines #500, #501, #502, #503 shows main has been CI-red across the last 3+ pushes with the same 2 failures.
Repo
forgejo_admin/basketball-apiWhat Broke
Two test assertions in the basketball-api test suite are stale / reference missing state. Both fail on every CI run on main and on every PR branch. CI has been red on main continuously:
Failure 1 — stale subject assertion:
The test asserts the email subject contains
"Great First Practice". The actual subject (from the currentservices/email.pymonthly-fee flow) is"Your First Monthly Payment | Westside Kings & Queens". Someone changed the subject copy and left the test assertion stale.Failure 2 — missing migration file:
The test hardcodes a migration filename path. Either the migration was renamed, renumbered (alembic collision), or never added to main.
Repro Steps
git checkout main && git pullpython -m venv /tmp/venv && /tmp/venv/bin/pip install .[dev]/tmp/venv/bin/python -m pytest tests/test_first_payment_email.py::test_send_first_payment_email tests/test_westside_streamlit_ro_role.py::test_migration_file_existsAlternatively, open Woodpecker pipeline #502 (latest push to main) and inspect the
teststep.Expected Behavior
Both tests pass. CI green on main. Every subsequent PR pipeline either passes cleanly or surfaces a real new failure instead of hiding behind inherited red.
Environment
forgejo_admin/basketball-api, branchmain(HEAD as of 2026-04-17)Blast Radius
Every PR merge currently either ignores CI red or merges while red. That hides real regressions. The 2 failures mask any new test failure a PR introduces — reviewers count "2 failed" and rubber-stamp as "pre-existing," but a 3rd failure slips in unnoticed until post-merge. Per
feedback_qa_ci_blockers, CI must actually gate merges; current state violates that contract.Scope / Fix Direction
test_send_first_payment_email: decide whether the test assertion needs to update to match the current subject, or the subject copy was changed accidentally and should revert. Update the test OR the copy to match intent.git log -p services/email.pyfor the subject line will show when it changed.test_migration_file_exists: locate the migration (git log onalembic/versions/around the041_*slot) or confirm it was never added. Fix the test to either reference the correct filename or test the role existence more durably (e.g., introspect the alembic chain for the revision that adds the role, not a hardcoded filename).Acceptance Criteria
Constraints
feedback_enterprise_no_workarounds)assert Trueequivalents — that defeats the testChecklist
Related
feedback_qa_ci_blockers.md,feedback_enterprise_no_workarounds.md