Skip to content

chore(vestigial): @civic-source/pipeline and @civic-source/observability are built/tested/documented but unused #208

Description

@williamzujkowski

Vestigial-code finding (from the QA/vestigial review)

Two workspace packages are fully built, tested, and documented as canonical architecture, but nothing imports them:

  • packages/pipeline (orchestrate())
  • packages/observability (createMetricsCollector, createTimer)

Confirmed unreferenced — grep for @civic-source/pipeline and @civic-source/observability across *.ts/*.astro/*.yml/*.mjs (excluding each package's own source) returns zero importers. No other package depends on them.

Notably, the live sync-law.yml cron inlines the fetch→transform→annotate logic in Node heredocs that duplicate what orchestrate.ts already does. The recent fix (#199) wired the workflow's inline scripts correctly but did not route them through the pipeline package — so the duplication and the unused packages persist.

Decision needed (pick one)

  1. Wire it up — refactor sync-law.yml to call @civic-source/pipeline's orchestrate() (and have it emit @civic-source/observability metrics), removing the duplicated heredoc logic. Makes the live cron path the tested, documented one and gives the two packages a real consumer.
  2. Demote to reference/library — if they're intentionally library-only, document that explicitly (so future readers don't assume the cron uses them) and keep them.
  3. Remove — if neither the workflow nor any consumer will use them, delete both packages to cut maintenance/build surface (they still carry @types/node drift etc.).

Recommendation: (1) is the highest-value — it both de-duplicates the pipeline logic and retires this finding. But it's a non-trivial workflow refactor with production-behavior implications, so it deserves a deliberate decision rather than a silent change.

Context: surfaced alongside #199 (which fixed the inline scripts) and the broader code review (#200#202).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions