Repository navigation
Conversation
Comparisons attached ten policyengine-uk 2.89.2 review diagnoses and 2.89.2-specific construction notes to every row, whatever engine produced it. They are now scoped: on another engine a review diagnosis becomes a prior_diagnoses entry with status not_reverified, and an authored note is labelled as written against 2.89.2. Event reports and summaries for a variant state its execution and its unsupported years. Legacy outputs are byte-identical. diagnose_uk_event_models.py takes --expect-engine and --reverify: it reruns the ten measured candidates on the installed engine and records whether each defect persists, is resolved or is inconclusive, from the case's own observation. Every predicate returns persists on its founding 2.89.2 observation. On 2.125.1 three are resolved (CGT commencement, the Class 4 freeze, employer NICs above State Pension age); seven persist. audit_uk_event_premises.py records, per engine, what each executed world holds at every annual lookup and whether each frozen construction's premises hold. Between 2.89.2 and 2.125.1 only the AB2024 CGT annualisation changed (fiscal_year_blend). CONSTRUCTION_REVISIONS.md proposes a revision; running it waits on d1344. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 11, 2026
CI's Hypothesis run found an observation where annual_carers_allowance_gbp is a dict: slicing it raises KeyError (slices are hashable from Python 3.12), which defect_status did not catch, so the predicate raised instead of reporting inconclusive. KeyError is now caught with the other lookup errors; 20,000 generated observations across all ten predicates return a status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 35f61c6 found one more escape: a JSON integer beyond float range (json.loads parses it exactly) meeting float arithmetic in _close or the LCWRA cutoff raised OverflowError. The caught set is now one named tuple, MALFORMED (TypeError, ValueError, AttributeError, LookupError, ArithmeticError), and the record-level lookups (id, evidence, supporting_evidence, absent_variables) sit inside the same guard, so a record of the wrong shape is inconclusive too. The totality property now generates every key a predicate reads (a new test reads the predicate source and checks this), integers beyond float range, and whole malformed records. 20,000 generated records return a status; dropping ArithmeticError makes the new huge-integer test fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Stacked on #160. WIP: W6 of the Autumn Budget 2026 CI plan.
Why
compare_uk_event.pyattached ten review diagnoses established on policyengine-uk 2.89.2 to every comparison row, whatever engine produced the row, with"engine_version": "2.89.2"hardcoded. Its construction notes also stated 2.89.2 facts as facts about the run: the £3.15 Class 2 rate, "the pin still has the 3% surcharge scale".diagnose_uk_event_models.pyrefused any other engine. A rerun on a new certified variant would therefore present stale findings as current.What changes
prior_diagnoseswithestablished_on: ["2.89.2"]andstatus: "not_reverified", and is rendered under its own heading. Authored notes are prefixed "Authored against policyengine-uk 2.89.2", and the 2.89.2-only corrections are dropped.RUN_MANIFEST.json, bound inCOMPARISON_PROVENANCE.json. They show unsupported years ("complete on supported years; unsupported: 2023").diagnose_uk_event_models.py --reverify <prior> --expect-engine <v>reruns all ten small synthetic cases on the installed engine. Each case's own predicate recordspersists,resolvedorinconclusive. A moved file or missing variable isinconclusive, neverresolved.pipeline/audit_uk_event_premises.pyrecords, per engine and parameter tree only, what each executed world holds at every annual lookup. It checks four premises: forward deltas change current law; reversals differ from it; authored constructions re-derive identically; and annualisation is a 30 April sample.gov.hmrc.cgt.*_rate(fiscal_year_blend,utils/parameters.convert_to_fiscal_year_parameters), so CY2024 current law is 0.1346 in both worlds.docs/uk_replay/CONSTRUCTION_REVISIONS.mdproposes a revision. Running it changes the construction and waits on cos d1344. Nothing here changes a registered construction.Committed outputs:
results/uk/events/CONSTRUCTION_PREMISES.json(2.89.2)results/uk/replays/pe6.2.6_uk2.125.1_policyengine-uk-data-1.58.0/{CONSTRUCTION_PREMISES,MODEL_DIAGNOSTICS}.json(2.125.1)Invariants and tests
tests/test_uk_event_version_scope.pyandtests/test_uk_event_premises.pycheck:persistson its founding 2.89.2 observation andresolvedon the corresponding fixed observation. A missing file or variable givesinconclusive. Predicates are total (Hypothesis over arbitrary observations).Legacy byte preservation: all five events re-staged and re-compared, plus the summary, give a clean
git diffonresults/uk/events. The 2.89.2 diagnostics run is identical toorigin/main's script output.Status
axiom: n/a: replay reporting and audit tooling in scorecard, no policy encoding.
🤖 Generated with Claude Code