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)
- 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.
- 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.
- 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).
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/pipelineand@civic-source/observabilityacross*.ts/*.astro/*.yml/*.mjs(excluding each package's own source) returns zero importers. No other package depends on them.Notably, the live
sync-law.ymlcron inlines the fetch→transform→annotate logic in Node heredocs that duplicate whatorchestrate.tsalready does. The recent fix (#199) wired the workflow's inline scripts correctly but did not route them through thepipelinepackage — so the duplication and the unused packages persist.Decision needed (pick one)
sync-law.ymlto call@civic-source/pipeline'sorchestrate()(and have it emit@civic-source/observabilitymetrics), removing the duplicated heredoc logic. Makes the live cron path the tested, documented one and gives the two packages a real consumer.@types/nodedrift 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).