Repository navigation
Conversation
New tests require that the modules, script, ledger helper and data files only certify-uk-release.yaml used are gone, that certification names the compatibility check instead of qualification, that certify-data no longer takes --qualified-pair-id, and that loading a bundle whose certificate is on the retired qualified_exact_pair basis is refused. tests/test_release_consumers.py requires scripts/release_consumers.py to build the policyengine-release dispatch and the scorecard's released-bundle request itself, printing exactly the documents the old builders printed (written to tests/fixtures/release_consumers/ by the unchanged code). Existing tests that used a qualified-pair certificate as their default now use the built_with_model_package certificate real bundles carry, or a compatibility-checked certificate with its record where they test the exact-pair refusals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
certify-uk-release.yaml, which ran it, was removed earlier. This removes the rest: scripts/check_uk_candidate.py, the replay probe, the UK candidate, qualification and ledger modules, .github/qualification-ledger.sh, the data files and vendored scorecard receipt and status schemas only the pipeline read, and their tests and fixtures. The qualified_exact_pair basis goes with it. Certification no longer takes --qualified-pair-id, a model that neither the build nor a publisher claim covers is now pointed to the compatibility check, and a model refuses to load a bundle whose certificate names the retired basis. scripts/release_consumers.py now builds the policyengine-release dispatch and the scorecard's released-bundle request itself, and checks the request against the vendored qualification_request.v1.json. Both documents are unchanged. The dispatch keeps its qualification member, always null, only so that API v2's simulation service and the UK Budget dashboard, which read it, need no change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…icate Review round 1 found that the strict TRACE release check no longer recognises the retired qualified_exact_pair basis, so such a bundle would pass the release and then fail every UK import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The strict TRACE release check now refuses the qualified_exact_pair basis, as loading the model does, so such a bundle cannot be released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 found two behaviours left without a test once the pipeline's tests went: a model load reads the installed policyengine-core for a compatibility-checked certificate, and the scorecard request leaves out null requested_by members while keeping nulls in expected_release_bundle. Also drop the receipt docstring's mention of the removed pipeline's supported_years check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 found two kept behaviours without a test: a manifest built with another model package is refused, and a certificate on a publisher claim that names a core still loads while another core runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anth-volk
marked this pull request as ready for review
December 4, 2026 17:51
Manual task 7c · 6, which would have replaced the uk-qualification-ledger branch with a tag, was cancelled, so the branch stays and the docs name it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been 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.
Fixes #796
Do not merge: Anthony's explicit approval
Tracker task 7c · 5 ("1. Collector/Emitter"): remove the UK qualification pipeline that the removed
certify-uk-release.yamlran.What this changes
Removed
scripts/check_uk_candidate.py.policyengine.provenance:replay_probe,uk_candidate,uk_qualification,qualificationandqualification_ledger..github/qualification-ledger.sh.src/policyengine/data/qualification/{uk.json, replay_policy.md, uk_replay_exceptions.json, uk_review_bounds.json, uk_budget_critical_inputs.json}.replay_receipt.v1.jsonandreplay_status.v1.json.replay_exceptions/,uk_metrics/,uk_qualification/, the two real replay receipts underuk_replay/, and the three contract reports underuk_contract/that only the candidate tests read.The
qualified_exact_pairbasis is removed entirely.certify-data(andbundle.py certify-data) no longer takes--qualified-pair-id.DataCertificationlosesqualification_pair_idandqualification_ledger_url.bundle.py check-compatibility) is required."scripts/release_consumers.pybuilds both documents itself, with the code moved unchanged fromuk_qualification:policyengine-releaserepository dispatch;released_bundlereplay request, now checked with jsonschema against the vendoredqualification_request.v1.jsoninstead of the removed pydantic copy of it.Both are printed exactly as before.
tests/fixtures/release_consumers/holds the two documents the unchanged code printed, and the tests compare the new output with them byte for byte."qualification": nullstays in the dispatch. It is kept purely to avoid the challenges of changing other apps: API v2's simulation service and the UK Budget dashboard read it (a null or missing value is accepted by both).bundle.ukis unchanged.Kept, because other code reads them:
uk_uc_floor.py,uk_uc_floor.json,scripts/check_uk_uc_floor.py);policyengine.provenance.receiptandcanonical(the UK Budget dashboard recomputes certificate digests withreceipt);evaluate_case_rows.json;test_canonical_jsonreads.Docs. The certification guide describes
qualified_exact_pairas removed. Its history paragraph says the qualification receipts are kept on theuk-qualification-ledgerbranch, which stays unchanged (manual task 7c · 6, which would have replaced it with a tag, was cancelled;a458dac2).The changelog entry is
removed, which the release workflow turns into a minor version bump: a command-line option, a certification basis and public modules go away.Effects outside .py
tools/certify_uk_cut_in_policyengine_py.pycallsuk_qualification.certified_constant_replacementsandrewrite_certified_constants. It will fail at its constant-rewrite step from this merge until 8d · 1 removes the tool. Certification of Microcosm builds goes throughscripts/certify_build.py(7c · 2), which has its own copies of those two functions.uk_qualification.py) no longer applies once this merges. It is left open for Anthony to close.Tests
Tests that fail before the change (
41c3ca41), then the change (ca0e70ee):tests/test_retired_uk_qualification.py:certify-datarefuses--qualified-pair-id;qualified_exact_paircertificate is refused online and offline.tests/test_release_consumers.py: the dispatch and the scorecard request are printed byte for byte as the old code printed them, and carry the fields API v2's simulation service and the UK Budget dashboard compare. It also has the earlier request tests, ported from the removed pipeline tests: size from the manifest or the file, the dataset's own location, a missing size source, and a request the schema refuses.tests/test_release_build_folders.py: the qualified folder-build test now expects the refusal.tests/test_local_data_manifest.py: the default certificate is thebuilt_with_model_packageone real bundles carry. Its exact-pair tests use acompatibility_checked_exact_paircertificate with its record. The differential with the frozen main implementation drops the three cases that relied on a qualified certificate.tests/test_certify_data_release.pyandtests/test_compatibility_certification.py: assertions about the removed wording and parameter.Local results, each test selected by node ID (no full suite):
41c3ca41), 62 test cases from 28 tests ran: 25 failed, all on assertions, and 37 passed. The tests that pass there are meant to pass on both commits: the byte-for-byte document checks, the files that stay, and the reworked existing tests.5e2b47ab, with the changelog entry), 64 test cases passed: the same tests plus the two existing tests this change updated.f51b08ab) and passed after the fix (de23c5a0). The tests that only restore coverage passed when added (86060ff8,3d43d169).Review
Two rounds of adversarial review, each by a fresh reviewer.
Round 1 (head
5e2b47ab) found one bug, rated medium: Microcosm's UK certification tool imports the removeduk_qualificationhelpers. This is the accepted effect described above, so it is not changed here. Its code-quality points were fixed:generate_trace_tros, whichbundle.py generateandcheckrun with--strict-tros) now refuses aqualified_exact_paircertificate, as loading the model does: a failing test first (f51b08ab), then the fix (de23c5a0).86060ff8):policyengine-coreagainst a compatibility-checked certificate;requested_bymembers and keeps nulls insideexpected_release_bundle, as the removed model did. The old builder was run on the same input and gives the same result.supported_yearscheck.Round 2 (head
86060ff8) found no bugs. It named two more kept behaviours without a test, and3d43d169adds them:The reviews stopped after round 2 because it found no bugs. Bugs left: none, apart from the accepted Microcosm effect.
Merge
merged, which is enough: this PR builds onmainand pins, installs or documents no release they publish. 7c · 7 (deleting thecandidate/uk/*branches) comes after this merge; 7c · 6 was cancelled.Environment variables
push.yamlchanges only in its comments. The NotifyConsumers job'sscripts/release_consumers.pyreads the same variables as before:HUGGING_FACE_TOKEN(alsoHF_TOKEN,HUGGINGFACE_HUB_TOKENif set)scorecard-request, throughhugging_face_auth_headersHUGGING_FACE_TOKENenv:of "Build the scorecard's released-bundle replay request"; the other two names are not set in the jobGITHUB_SERVER_URL,GITHUB_REPOSITORY,GITHUB_RUN_ID,GITHUB_RUN_ATTEMPT,GITHUB_SHAscorecard-request(requested_by)VERSION--versionversionoutputenv:of both stepsPOLICYENGINE_SKIP_COUNTRY_IMPORTSos.environ.setdefault)APP_ID,APP_PRIVATE_KEYactions/create-github-app-token(unchanged)with:of the token steps; not read by the changed code🤖 Generated with Claude Code