Lukas
a273b96563
feat: Complete repository protocol coverage
- Add missing protocol methods to Fail2BanDbRepository:
- get_ban_event_counts: Aggregate ban events per IP (used in ban_service)
- Add missing protocol methods to GeoCacheRepository:
- delete_stale_entries: Remove old geo cache entries (used in geo_cache_cleanup)
- Add missing protocol methods to HistoryArchiveRepository:
- purge_archived_history: Remove archived entries older than age threshold
- Add comprehensive protocol compliance tests:
- Created test_protocol_compliance.py with 8 test classes
- Validates all 7 repository modules fully implement their protocols
- Prevents silent protocol drift when methods change signatures
- Tests verify no unexpected public methods in repository modules
- Update documentation:
- Add Repository Protocol Coverage Checklist to Backend-Development.md
- Document procedure for adding new repositories with protocol definitions
- List current protocol coverage (all 7 repositories, 40 total methods)
- All repositories now have 100% protocol coverage:
- SessionRepository: 4 methods
- SettingsRepository: 4 methods
- BlocklistRepository: 6 methods
- ImportLogRepository: 4 methods
- GeoCacheRepository: 13 methods
- HistoryArchiveRepository: 5 methods
- Fail2BanDbRepository: 8 methods
This ensures:
- Enhanced mockability for testing
- Static contract verification
- Prevention of protocol drift
- Better IDE support and type checking
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-28 07:58:57 +02:00
..
2026-03-07 20:28:51 +01:00
2026-04-28 07:46:02 +02:00
2026-04-28 07:58:57 +02:00
2026-04-27 18:26:08 +02:00
2026-04-28 07:53:30 +02:00
2026-04-26 19:24:34 +02:00
2026-04-26 15:17:30 +02:00
2026-02-28 21:15:01 +01:00
2026-04-06 20:20:14 +02:00
2026-04-26 14:14:35 +02:00
2026-04-26 14:40:27 +02:00
2026-04-17 20:54:08 +02:00
2026-04-27 18:52:12 +02:00
2026-04-26 15:09:51 +02:00
2026-04-26 15:38:20 +02:00
2026-04-26 14:04:21 +02:00
2026-04-17 15:13:07 +02:00
2026-04-26 11:39:51 +02:00
2026-03-24 19:46:12 +01:00