Files
noteflow/.claude/hooks/hookify.block-duplicate-fixtures.local.md
Travis Vasceannie 1ce24cdf7b feat: reorganize Claude hooks and add RAG documentation structure with error handling policies
- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization
- Added four new blocking hooks to prevent common error handling anti-patterns:
  - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging
  - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption
  - `block-default
2026-01-15 15:58:06 +00:00

2.4 KiB

name, enabled, event, action, conditions
name enabled event action conditions
block-duplicate-fixtures true file block
field operator pattern
file_path regex_match tests?/(?!conftest.py$).+.py$
field operator pattern
new_text regex_match @pytest.fixture[^@]*\ndef\s+(mock_uow|crypto|meetings_dir|webhook_config|webhook_config_all_events|sample_datetime|calendar_settings|meeting_id|sample_meeting|recording_meeting|mock_grpc_context|mock_asr_engine|mock_optional_extras)\s*(

🚫 Test Quality Violation: Duplicate Fixture Definition

Your edit redefines a fixture that already exists in tests/conftest.py.

Detected fixture duplication attempt: The following fixtures are globally available from root tests/conftest.py:

  • mock_uow - Mock UnitOfWork with all repositories
  • crypto - AesGcmCryptoBox with in-memory keystore
  • meetings_dir - Temporary meetings directory
  • webhook_config - WebhookConfig for MEETING_COMPLETED
  • webhook_config_all_events - WebhookConfig for all events
  • sample_datetime - UTC datetime fixture
  • calendar_settings - CalendarSettings for OAuth testing
  • meeting_id - Test MeetingId
  • sample_meeting - Sample Meeting entity
  • recording_meeting - Meeting in RECORDING state
  • mock_grpc_context - Mock gRPC ServicerContext
  • mock_asr_engine - Mock ASR engine

Why this is blocked:

  • Fixture duplication creates maintenance burden
  • Inconsistent test behavior when fixtures diverge
  • Violates DRY principle
  • Cross-file fixture duplicates are flagged by tests/quality/

What to do instead:

  1. Use the existing fixture from tests/conftest.py
  2. If you need variations, create a new fixture with a different name
  3. If the global fixture is insufficient, update root tests/conftest.py

Allowed locations for new fixtures:

  • tests/conftest.py - Add global fixtures here (unrestricted)
  • tests/<subdir>/conftest.py - Add scoped fixtures with unique names
  • Any test file - Add test-specific fixtures with unique names

Project reference: See tests/conftest.py for all available fixtures.