filename_audit::tests::run_audit_skips_disabled_and_offline_libraries fails on master (aeeb05b), so the full suite has not been green — it failed identically through #145, #146 and #148:
The test's seed helper inserts image_exif rows for library ids that don't exist in the in-memory database, and the insert trips the image_exif.library_id foreign key. It's a test-setup bug; the audit logic is untested rather than wrong. Likely (unverified): foreign keys became enforced after the test was written (it last changed in 89fc24c, 2026-09-25).
Also shows up as one clippy warning in the filename_audit bin ("this creates an owned instance just for comparison") — unrelated but in the same area.
Fix direction
Insert the libraries rows the test's libraries reference (ids + root paths from its library(...) helper) before seeding image_exif, per constitution III (in-memory DB via in_memory_db_connection()).
Acceptance
The test passes; cargo test fully green on master
It still exercises what its name says (disabled and offline libraries skipped)
## Problem
`filename_audit::tests::run_audit_skips_disabled_and_offline_libraries` fails on master (`aeeb05b`), so the full suite has not been green — it failed identically through #145, #146 and #148:
```
thread 'filename_audit::tests::run_audit_skips_disabled_and_offline_libraries'
panicked at src/filename_audit.rs:344:14:
seed row: DatabaseError(ForeignKeyViolation, "FOREIGN KEY constraint failed")
```
The test's `seed` helper inserts `image_exif` rows for library ids that don't exist in the in-memory database, and the insert trips the `image_exif.library_id` foreign key. It's a test-setup bug; the audit logic is untested rather than wrong. Likely (unverified): foreign keys became enforced after the test was written (it last changed in `89fc24c`, 2026-09-25).
Also shows up as one clippy warning in the `filename_audit` bin ("this creates an owned instance just for comparison") — unrelated but in the same area.
## Fix direction
Insert the `libraries` rows the test's libraries reference (ids + root paths from its `library(...)` helper) before seeding `image_exif`, per constitution III (in-memory DB via `in_memory_db_connection()`).
## Acceptance
- [ ] The test passes; `cargo test` fully green on master
- [ ] It still exercises what its name says (disabled and offline libraries skipped)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
filename_audit::tests::run_audit_skips_disabled_and_offline_librariesfails on master (aeeb05b), so the full suite has not been green — it failed identically through #145, #146 and #148:The test's
seedhelper insertsimage_exifrows for library ids that don't exist in the in-memory database, and the insert trips theimage_exif.library_idforeign key. It's a test-setup bug; the audit logic is untested rather than wrong. Likely (unverified): foreign keys became enforced after the test was written (it last changed in89fc24c, 2026-09-25).Also shows up as one clippy warning in the
filename_auditbin ("this creates an owned instance just for comparison") — unrelated but in the same area.Fix direction
Insert the
librariesrows the test's libraries reference (ids + root paths from itslibrary(...)helper) before seedingimage_exif, per constitution III (in-memory DB viain_memory_db_connection()).Acceptance
cargo testfully green on master🤖 Generated with Claude Code