Official-calculator oracles (mode 3): closed-set extension, dated-reading provenance, calculator work list - #64
Conversation
Review — Official-calculator oracles (mode 3)Enforcement is real code, not just SCHEMA.md prose:
Should address
Suggestion
Reviewed with Claude Code assistance. |
…d-reading provenance, 10-case calculator work list - Oracle enum grows five calculator ids (govuk_income_tax_estimator, govuk_hicbc_calculator, policy_in_practice_boc, entitledto, turn2us); CALCULATOR_ORACLES marks them as live services whose result rows must carry the reading date (YYYY-MM-DD) in oracle_version, enforced at validation, with the archive-the-reading rule documented in SCHEMA.md. oracle_version is now required non-empty for every oracle. - Three new boundary cases (2025-26 statutory values, verified against gov.uk/LITRG): HICBC full clawback at exactly GBP 80,000, the zero-allowance/additional-rate double boundary at GBP 125,140, and PSA ordering with GBP 1,500 savings interest (expected extra liability exactly GBP 100). Inputs + rationale only, per the battery doctrine. - battery/calculator_set.json + load_calculator_set(): the 10-case starter work list, each case into >= 2 calculators so PE-vs-UKMOD splits always have an adjudicating third reading; entries validate against the battery (unknown case, single oracle, model oracle in the set, duplicate, empty notes all raise). Suite: 174 passed / 4 skipped (was 164); ruff format clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r rows Review items from the 2026-08-18 pass: - _contains_iso_date now parses every shape-matching chunk with date.fromisoformat, so "2026-13-45" / "0000-00-00" / "2025-02-30" fail; "2024-02-29" passes. - The SCHEMA.md archive rule is validation, not prose: a calculator-oracle row must carry an "archive: <path-or-url>" annotation citing the archived reading, or it raises. Model oracles (UKMOD/TAXSIM) are unaffected. Also rebased onto uk/ukmod-cases-schema @ a1d57d7 (schema_version, variable_class, classify->CaseResult seam), resolving the test-file overlap additively. Suite: 190 passed, 4 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ec749c8 to
f3e9bb8
Compare
|
Both should-address items plus the suggestion addressed in f3e9bb8 (rebased onto the updated #49 branch, a1d57d7):
Suite: 190 passed / 4 skipped; ruff clean. Force-pushed with lease for the rebase. |
Re-review — addressed ✅
Only open item is the merge order — |
Stacked on #49 (
uk/ukmod-cases-schema) — retarget tomainwhen #49 merges; the diff shown here is this lane's own work only.What's here
govuk_income_tax_estimator,govuk_hicbc_calculator,policy_in_practice_boc,entitledto,turn2us).CALCULATOR_ORACLESmarks them as live services: theirCaseResult.oracle_versionmust carry the reading date (YYYY-MM-DD) — enforced at validation — and SCHEMA.md documents the provenance rule (archive every reading; manual or terms-compliant access, one case at a time, never a scrape).oracle_versionis now required non-empty for model oracles too.battery/calculator_set.json+load_calculator_set(): the 10-case starter work list from Official-calculator oracles (mode 3): gov.uk and benefits-calculator household cases as a second UK oracle family #63 — each case assigned to ≥ 2 calculators so a PE-vs-UKMOD disagreement always has an adjudicating third reading; the two-child abolition pair gets three production-calculator readings each. Fail-loud validation: unknown case id, fewer than two oracles, a model oracle in the set, duplicates, and empty notes all raise.No CaseResult rows and no expected values are committed — readings come from the real calculators later, dated and archived.
Suite: 174 passed / 4 skipped (was 164);
ruff format --checkclean.Builds #63.
🤖 Generated with Claude Code