Skip to content

build-bundle silently skips packages whose aliases drifted from the db/data layout #78

Description

@MaxGhenis

Problem

SOURCE_PACKAGE_ALIASES has drifted out of sync with the reorganized db/data manifests and packages/* directory layout, so ledger build-bundle (which iterates the alias map) silently skips the renamed/consolidated packages instead of failing.

Observed while rebuilding the canonical consumer_facts.jsonl for the populace US build (2026-07-03): the alias-driven path could not reproduce a complete export. Examples of drifted entries:

  • PEP national + state aliases → now census/pep_2024_age_sex
  • two IRA packages → consolidated into irs_soi/ira_contributions
  • z1_household_net_worth → renamed ..._2026

Workaround used: iterate packages/*/*/source_package.yaml directly (the authoring surface), which produced 78,089 consumer fact rows vs the incomplete alias-driven set.

Why it matters

A silently-incomplete facts export propagates into consumer builds as "reference did not match a Ledger fact identifier" failures far downstream (or worse, missing targets that don't fail at all) — this is how the populace fiscal-refresh build broke on jct.tax_expenditures.cy2024.salt_deduction.revenue_loss.

Suggested fix

Re-sync the alias map to the current layout, and make build-bundle fail loudly when an alias resolves to a missing directory (or derive the package list from packages/* and drop the parallel alias map entirely).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions