Context
The validation/ domain currently owns hook execution types and services (HookRunner, HookResult, HookStatus, HookInputs, HookRecord, BatchRecordOutcome, ValidationService). Both the deposition and ingest pathways depend on these types.
The name "validation" implies deposition-specific, but the domain is really about enrichment — running hooks against records, producing features, handling retry logic. Both pathways use it.
What
Rename domain/validation/ to domain/enrichment/. Update all imports, events, DI providers, and tests.
Key renames:
ValidationService → EnrichmentService (or keep as-is internally)
ValidationRun → EnrichmentRun (or HookRun)
ValidateDeposition handler → EnrichDeposition
ValidationCompleted / ValidationFailed events → EnrichmentCompleted / EnrichmentFailed
- All import paths:
osa.domain.validation.* → osa.domain.enrichment.*
Why
- "Validation" misleadingly implies the domain is deposition-specific
- "Enrichment" captures the full purpose: running hooks, producing features, retry on OOM
- The ingest domain already imports hook types from validation — the cross-domain dependency is architecturally correct (ingest → enrichment), but the naming obscures this
Depends on
Effort
M — mechanical refactor, no logic changes. (human: ~1 day / CC: ~15 min)
Context
The
validation/domain currently owns hook execution types and services (HookRunner, HookResult, HookStatus, HookInputs, HookRecord, BatchRecordOutcome, ValidationService). Both the deposition and ingest pathways depend on these types.The name "validation" implies deposition-specific, but the domain is really about enrichment — running hooks against records, producing features, handling retry logic. Both pathways use it.
What
Rename
domain/validation/todomain/enrichment/. Update all imports, events, DI providers, and tests.Key renames:
ValidationService→EnrichmentService(or keep as-is internally)ValidationRun→EnrichmentRun(orHookRun)ValidateDepositionhandler →EnrichDepositionValidationCompleted/ValidationFailedevents →EnrichmentCompleted/EnrichmentFailedosa.domain.validation.*→osa.domain.enrichment.*Why
Depends on
Effort
M — mechanical refactor, no logic changes. (human: ~1 day / CC: ~15 min)