Skip to content

Make Ledger aggregate facts sum-only#64

Merged
MaxGhenis merged 1 commit into
mainfrom
codex/sum-only-ledger-facts-20260626
Jun 26, 2026
Merged

Make Ledger aggregate facts sum-only#64
MaxGhenis merged 1 commit into
mainfrom
codex/sum-only-ledger-facts-20260626

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • remove count as an allowed aggregate fact aggregation method
  • migrate count-valued source-package measures to aggregation: sum with unit: count
  • reject aggregation: count during source-package validation
  • regenerate Arch fixture facts/consumer sample under the sum-only contract
  • keep human labels for sum-over-count facts readable as count facts

Validation

  • uv run ruff format --check arch/core.py arch/jurisdictions/us/soi.py arch/source_package.py tests/test_arch_database.py tests/test_arch_suite.py tests/test_policyengine_ledger_imports.py tests/test_arch_source_package.py
  • uv run ruff check arch/core.py arch/jurisdictions/us/soi.py arch/source_package.py tests/test_arch_database.py tests/test_arch_suite.py tests/test_policyengine_ledger_imports.py tests/test_arch_source_package.py
  • git diff --check
  • uv run python -m pytest tests/test_arch_core.py tests/test_arch_consumer_contract.py tests/test_arch_database.py tests/test_arch_suite.py tests/test_policyengine_ledger_imports.py -q
  • uv run python -m pytest tests/test_arch_source_package.py -q

@MaxGhenis MaxGhenis merged commit 052bff5 into main Jun 26, 2026
2 checks passed
@MaxGhenis MaxGhenis deleted the codex/sum-only-ledger-facts-20260626 branch June 26, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant