Skip to content

Add CRFB TOB scenario contract#338

Draft
MaxGhenis wants to merge 1 commit into
mainfrom
codex/crfb-tob-scenario-runner
Draft

Add CRFB TOB scenario contract#338
MaxGhenis wants to merge 1 commit into
mainfrom
codex/crfb-tob-scenario-runner

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a named CRFB Post-OBBBA long-run TOB scenario contract
  • expose constants for the target source, scenario id, target hash, and trustees-2025 core threshold law mode
  • add metadata validation helpers that reject raw current-law substitution and hash mismatches

Validation

  • ruff check src/policyengine/scenarios tests/test_crfb_scenario_contract.py
  • ruff format --check src/policyengine/scenarios tests/test_crfb_scenario_contract.py
  • PYTHONPATH=src /Users/maxghenis/PolicyEngine/policyengine.py/.venv/bin/python -m pytest tests/test_crfb_scenario_contract.py

Notes

  • This package carries only the portable scenario contract. It does not try to load policyengine-us-data or imply the long-term model/artifacts are installed.
  • The first pytest attempt with PYTHONPATH=. failed because this repo uses a src layout; rerun with PYTHONPATH=src passed.

@MaxGhenis MaxGhenis force-pushed the codex/crfb-tob-scenario-runner branch from 9382913 to eb751fd Compare May 3, 2026 11:09
@MaxGhenis MaxGhenis force-pushed the codex/crfb-tob-scenario-runner branch from eb751fd to faa126e Compare May 3, 2026 11:15
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Reviewed 2026-07-08 as part of the open-PR sweep — disposition: stays open as an active draft. It's self-contained (new policyengine.scenarios namespace, nothing on main imports it), all checks green. Deliberately NOT merging while the CRFB engagement is held, for two reasons: (1) merging publishes a new public namespace (7 exported symbols) to PyPI as a compatibility surface; (2) the contract hardcodes a provisional calibration target (oact_2025_08_05_provisional + its sha256) that may change before the engagement finalizes. Pre-merge checklist when CRFB resumes: reconcile target_source/target_sha256 with the finalized OACT artifact, and make a deliberate call on whether policyengine.scenarios is the right public home vs keeping the contract engagement-side. Non-blocking nit: validate_metadata compares metadata['name'] against the contract's target_source field — confusing key/field naming.

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