Skip to content

refactor: tighten source provider and ingestion emission seams #262

Closed

Description

@Sinity

Ref #250

Outcome

Renew the source/provider and ingestion-emission boundary layer so provider detection, source normalization, and pipeline emission depend on explicit contracts instead of path-dependent payload plumbing.

Problem

The recent boundary-renewal work improved dispatch, drive ingestion, and some source helpers, but the remaining source/provider layer still carries older shapes: provider-specific payload sniffing, emission adapters, and ingestion follow-through that are technically typed yet still broader than the runtime meaning requires.

The result is code that passes strict mypy while still hiding semantics behind generic payload containers and repeated conversion branches.

Expected scope

Likely modules include:

  • polylogue/sources/providers/**
  • polylogue/sources/emitter.py
  • selected polylogue/sources/*support*.py
  • selected polylogue/pipeline/services/ingest_*
  • selected polylogue/pipeline/services/acquisition_* follow-through where source contracts surface
  • minimal test fallout needed to prove the tranche

Constraints and invariants

  • Preserve ingest behavior and provider semantics.
  • Keep provider-specific differences explicit rather than smearing them into a generic adapter.
  • Prefer shared typed intermediate records only when they actually reflect shared meaning.
  • Mechanical propagation may be delegated; architectural center-of-gravity rewrites stay local.

Acceptance criteria

  • Provider/runtime boundaries express message and payload semantics more directly.
  • Emission and ingestion follow-through rely less on broad object/dict containers.
  • Repeated source-side conversion logic is reduced.
  • The tranche lands as a coherent PR with devtools verify green.

Verification plan

Run devtools verify before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:parserarea:pipelinetype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions