Skip to content

refactor: rebuild schema, source, and ingestion boundary contracts #271

Closed

Description

@Sinity

Context

The next highest-payoff renewal slice is the oldest schema/source/ingestion stratum. These modules still carry the strongest path dependence from earlier agent-authored code: dict-shaped payload flow, broad object-typed seams, and repeated coercion logic around provider/source ingestion.

Scope

Focus on schema/source/ingestion substrate work, not surface polish:

  • polylogue/schemas/
  • polylogue/sources/
  • ingestion-oriented polylogue/pipeline/ services

Likely hard-center files include:

  • polylogue/schemas/extraction.py
  • polylogue/schemas/synthetic/runtime.py
  • polylogue/sources/dispatch.py
  • polylogue/sources/drive_gateway.py
  • polylogue/pipeline/services/ingest_batch.py
  • polylogue/pipeline/services/ingest_worker.py

Acceptance criteria

  • Open payload dictionaries are replaced with explicit aliases, records, or typed adapters where the structure is known.
  • Repeated provider/source coercion is collapsed into shared helpers instead of being re-implemented in multiple files.
  • Cast pressure and weak boundary types are materially reduced in the targeted modules.
  • The tranche lands as one coherent PR with full verification.

Out of scope

  • Major CLI/UI polish
  • Broad test-suite cleanup beyond fallout and targeted contract assertions

Activity

  1. added
    type:refactor
    on Apr 20, 2026
  2. added 4 commits that reference this issue on Apr 22, 2026
    708a338
    7dbd045
    acf3198
    3e19df4
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:storagetype:refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions