One reform vocabulary: score_reform takes a PolicyEngine reform; obr_shock is the escape hatch - #15
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…OBR shocks become obr_shock Closes #8. The generic verb now takes the suite's shared reform shape — the same {parameter_path: value} dict as the microsimulation tools — and dispatches by declared contract: model='og' routes through PolicyEngine-estimated tax functions (multi-parameter reforms now supported); model='obr' raises an actionable pointer until the static-costing bridge (#9) lands. Raw OBR variable shocks survive as the explicitly named escape hatch: obr_shock (MCP) / macromod obr-shock (CLI). og_score_reform_steady_state is folded into score_reform; og-score keeps a CLI alias with the reform-dict shape. Docs updated to match (README tool/command lists, connect + OLG pages, modal_app comments), including the stale nine-tool list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ss, shaped-JSON errors, fast multi-param guard Sol review findings on #15: (1) the obr_shock MCP/CLI wrappers no longer force investment_closure=False — omitted means core's safe per-variable default (a TCPRO shock without the closure solves to misleading zeros); (2) integration/README.md rewritten — it still taught the removed `macromod score --var` syntax, listed a stale tool inventory, claimed population scoring was unwired (hosted since 7/14), and carried personal dev paths; (3) list_reform_variables metadata points at obr_shock, not score_reform; (4) valid-but-wrong-shaped reform JSON ('[]', '{}') is a Click error, not a traceback, in both score and og-score; (5) a fast test asserts the full multi-parameter dict reaches policy construction; (6) root README + connect page state the OBR-pending exception and stop calling hosted population scoring local-only; (7) modal_app docstring inventory updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
unified-score-reform
branch
from
July 16, 2026 22:38
d1f029f to
0fd6021
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #8 — one reform vocabulary across the suite.
score_reform(country, reform, model)now takes the shared PolicyEngine reform shape (the same flat{parameter_path: value}dict aspopulation_reform_impact/household_reform_impact) and dispatches by declared contract:model="og"→ OG-UK via PolicyEngine-estimated tax functions._og_build_policygeneralizes to multi-parameter reforms; the result carriesreform+start_yearflat.model="obr"→ actionableNotImplementedErrorpointing to OBR reform contract: microsim static costing path in, second-round effects out #9 (the static-costing bridge) and to the escape hatch, exactly as One reform vocabulary: score_reform takes a PolicyEngine reform; raw OBR shocks become obr_shock #8 specced for landing ahead of OBR reform contract: microsim static costing path in, second-round effects out #9.obr_shock(MCP) /macromod obr-shock(CLI): the former raw interface, explicitly named — never the generic verb.og_score_reform_steady_statetool removed (unified intoscore_reform);macromod og-scorestays as a CLI alias, now taking--reformJSON.population_reform_impactwas missing), connect page snippets and tool roster, OLG pageog-scoreexample,modal_app.pycomments.test_remote_mcp.py) moves toobr_shockand gains a check thatscore_reform model="obr"errors with the pointer — so the Modal redeploy on merge stays green and the new contract is exercised live.Verification
core.obr_shock(var="CGG", shock=1250, periods=4)→ first-quarter ΔGDP £1.25bn, cumulative £5.0bn (multiplier ≈ 1, matching the remote test's expected band).obr_score_reform/og_score_reform_steady_statereferences outside the venv.Note for review: the hosted server's generic
score_reformintentionally has no working arm until #9 (OG is excluded from the image by design; OBR pending) — both arms return actionable instructions, andobr_shockkeeps hosted scoring functional.🤖 Generated with Claude Code