Skip to content

refactor: rename validation/ domain to enrichment/ #118

@rorybyrne

Description

@rorybyrne

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:

  • ValidationServiceEnrichmentService (or keep as-is internally)
  • ValidationRunEnrichmentRun (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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorInternal restructuring, no behavior change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions