Skip to content

QBI v2 engine: qualification derivations + host-conditioned SSTB (fail-closed) - #534

Draft
MaxGhenis wants to merge 11 commits into
qbi-port-530from
qbi-v2-engine
Draft

QBI v2 engine: qualification derivations + host-conditioned SSTB (fail-closed)#534
MaxGhenis wants to merge 11 commits into
qbi-port-530from
qbi-v2-engine

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

Builds the v2 machinery on top of the #532 fidelity port, per the evidence-anchored spec on #530. v1 remains the production default; v2 fails closed until crosswalk content and published priors land.

  • qbi_assumptions_v2.json + loader: per-source qualification as derived | prior with a rationale string each; an sstb_classification block (crosswalk resource, ambiguous prior, passive pass-through SSTB priors by AGI band); per-family independent rng streams — removing one family's draws leaves every other family's stream byte-identical (proven by test).
  • Qualification derivations: where law determines the flag, no rng is consumed (resolves the Should *_would_be_qualified columns be derivations rather than QRF targets? #416 forests-over-coin-flips question on the v2 path); the QRF-target exclusion seam sits behind the version gate.
  • Host-conditioned SSTB: a post-QRF transform classifies business_is_sstb from host occupation through the versioned crosswalk (clear/non-SSTB deterministic; ambiguous → seeded Bernoulli), passive pass-through income draws from AGI-band priors, then the SE split and SSTB W-2/UBIA pools reroute and the mutually-exclusive qualification routes re-derive — ending in a state that satisfies every existing reconciliation invariant.
  • Fail-closed placeholder: sstb_crosswalk_placeholder.json ships with "status": "placeholder"; running v2 against it outside tests raises.
  • Industry seam: the frozen census_cps columns carry AGI and PEIOOCC but no detailed industry, so the spine is occupation-first with an explicit industry_column: null seam and a synthetic industry-primary test for the future wire-up.
  • Includes the target-parity feed pin refresh (stale since Add JCT tax-expenditure target references: ALD components + CDCC (supersedes #514) #519), filed standalone as Refresh target-parity feed pin to buildn v9.4 (stale since #519) #533 — it drops out of this diff when Refresh target-parity feed pin to buildn v9.4 (stale since #519) #533 merges.

Verification (supervisor, independent)

  • Full workspace suite with restricted artifacts: 3,247 passed, 0 failed; ruff clean.
  • Wheel packages qbi_assumptions_v2.json and sstb_crosswalk_placeholder.json; both declared in country_package.json.
  • v1 golden tests untouched and passing.

Awaiting content (v2 stays fail-closed until then)

  • SSTB crosswalk content (census occupation → §1.199A-5 category) — research in flight
  • Passive pass-through SSTB priors by AGI (published source) — research in flight
  • SCF employer-structure W-2/UBIA conditionals (v3)

Refs #530

🤖 Generated with Claude Code

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Note on CI: the PR gate triggers on base=main only, so no checks run while this is stacked on qbi-port-530; they fire automatically when #532 merges and the base flips. Verification of record meanwhile is the supervisor's independent local run in the PR body: full workspace suite 3,247 passed / 0 failed with restricted artifacts, ruff clean, wheel-gate resources verified.

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