[Arch] Stale architecture-enforcement tests are silent no-ops #64

Closed
opened 2026-07-01 07:27:11 +02:00 by bullitt · 1 comment
Owner

Severity: High | Category: Testing

tests/test_arch.py:55-84 (test_scrapers_obey_dependency_rules, test_all_scrapers_documented) globs scrapers/*.py, but real carrier code moved to packs/*/scraper*.py. The glob matches zero files, so both checks trivially pass without checking anything — CI has been green on a disarmed guard.

Recommendation: Update both tests to glob packs/*/scraper*.py (excluding _template/).

Refactoring safety: Deliberately add a forbidden import to a scratch pack file locally, confirm the test fails, then revert.

Full detail: docs/architecture-review.md § C + § H.1

**Severity:** High | **Category:** Testing `tests/test_arch.py:55-84` (`test_scrapers_obey_dependency_rules`, `test_all_scrapers_documented`) globs `scrapers/*.py`, but real carrier code moved to `packs/*/scraper*.py`. The glob matches zero files, so both checks trivially pass without checking anything — CI has been green on a disarmed guard. **Recommendation:** Update both tests to glob `packs/*/scraper*.py` (excluding `_template/`). **Refactoring safety:** Deliberately add a forbidden import to a scratch pack file locally, confirm the test fails, then revert. Full detail: `docs/architecture-review.md` § C + § H.1
Author
Owner

Fixed on branch architecture-rework, commit 933e290: test_scrapers_obey_dependency_rules/test_all_scrapers_documented now glob packs/*/scraper*.py instead of the now-empty scrapers/*.py. Verified live by temporarily injecting a forbidden import db into a pack scraper and confirming the test fails, then reverting.

Fixed on branch `architecture-rework`, commit 933e290: `test_scrapers_obey_dependency_rules`/`test_all_scrapers_documented` now glob `packs/*/scraper*.py` instead of the now-empty `scrapers/*.py`. Verified live by temporarily injecting a forbidden `import db` into a pack scraper and confirming the test fails, then reverting.
Sign in to join this conversation.
No labels
arch
harness
security
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bullitt/trackbox#64
No description provided.