Repository navigation
Conversation
Three failing tests for removing microcosm.build.build_folder_switch: the module cannot be found; no package source or test, shared test support, tool, doc or README names it; and the refusal for a repository with pointer files and no releases.json names no tool or step to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The US, UK and BE release repositories have all moved to build folders and releases.json and had their old layout deleted, so the one-time tool has nothing left to move. Remove microcosm.build.build_folder_switch (copy, switch and delete-old-layout), its three test modules and their in-memory Hub helper. The refusal for a repository with pointer files and no releases.json no longer names the tool or its steps. The fixture generator's docstring, the README, docs/release-contract.md and three microcosm-data mentions of delete-old-layout describe the move in the past tense. What moved builds' manifests carry (migrated_from, unpublished_artifacts) stays documented and accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every release repository lists its builds in releases.json, and each repository's switch deleted its latest*.json pointer files. These tests fail before the change, 32 of them on assertions: - DatasetSpec has no pointer_path and must name its release; - microcosm.data and microcosm.data.release export no pointer reader, writer or constant, and keep no private pointer reader; - microcosm.data.contract keeps no rules for latest-<line>.json names and their tags; - load() has no unverified_root option; - the loader refuses a repository without releases.json, online and offline, and requests no pointer file (today it follows latest.json); - AM's and NZ's release contracts name build folders and releases.json, not latest.json or a Hugging Face revision; - the C1 inventory fixture has no line field, and the C5 registry snapshot names no pointer file; - the emitter publishing command refuses pointer files in a repository without releases.json with the same advice to remove them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch builds on 5b · 11's removal of the build-folder switch tool, which changes the same refusal, README and release-contract paragraphs. # Conflicts: # packages/microcosm-build/tests/engine_free/uk/test_uk_release_publication.py
…ases.json (#1794) Every release repository lists its builds in releases.json, and each repository's switch deleted its latest*.json pointer files. - Loader: reads every entry through releases.json and refuses a repository without it, online and offline (when the cache never held it), naming the file; any other failure to read it propagates. The pointer fallback, the tagged-manifest checks and load(unverified_root=) are gone. CertifiedRelease keeps its fields; artifact_revision is always None. - Registry: DatasetSpec has no pointer_path and must name its release. - microcosm.data.release: latest_release, latest_line_release, latest_evidence_release, LatestPointer, line_pointer_path, line_pointer_payload, LINE_POINTER_PATH_TEMPLATE and RELEASE_TIER_CERTIFIED are gone, and microcosm.data exports no pointer name. The tagged publisher's own pointer writers (LATEST_POINTER_PATH, LATEST_EVIDENCE_POINTER_PATH, LATEST_POINTER_SCHEMA_VERSION, RELEASE_TIER_EVIDENCE, latest_pointer_payload and latest_evidence_pointer_payload) stay until 5b · 10 removes publish_release, their only caller. - microcosm.data.contract: line_for_release_id, dataset_role_for_line and the per-build tag pattern are gone; the fixture generator's C1 inventory has no line field. - release_publication: one refusal for a pointer file in any repository, with or without releases.json: remove it. - AM's and NZ's release contracts name build folders and releases.json, as BE's does; their golden specs pin the new digests. - Tests: the pointer-reader and line-pointer tests go; the loader checks they covered (a missing manifest, engine incompatibility, construction after verification, a Hub failure reading the record) run against build folders; the live loader test reads releases.json. - Docs and changelog: README, microcosm-data's README, the agent guide and docs/release-contract.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub reported conflicts with main. Two files conflicted: - docs/release-contract.md: main replaced the UK cut runner gap with the policyengine.py certification tool's; the pointer-readers gap goes, as this branch removes the readers. - tests/golden/nz_country_spec.json: main changed NZ's package; the file is regenerated from the merged sources, with this branch's NZ release contract digest. The release-contract fixtures still reproduce (--check). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1 found three bugs, all in tests or CI behaviour: - High: three tests still passed the removed expected_revision keyword to the loader's manifest check (two in test_release_contract_fixtures, one in test_release_contract_fixture_generation), so each raised TypeError. The keyword is gone. - Medium: test_declared_range_certifies_a_later_patch_for_both_readers handed the loader's package-certification reader a tagged-layout manifest; the loader now reads only build folders, so the test rewrites the manifest with the builders' own build_folder_release_manifest first. - Medium: the six cases of the export test for names the tagged publisher still uses failed on purpose, and the engine-free job stops at its first failure. They are now strict expected failures, so CI reports the rest, and the marks must go when the names do. Also from the review: the live-load helper's offline check follows the loader's refusal to its cause, so an offline US engine run still skips; the ruff configuration comment, the Armenia notes, the UK staging operations guide and two release-contract sentences no longer describe pointer files or the loader reading tagged builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 noted that making release a required field moved it in front of variant, so a caller passing variant as the eighth positional argument would set release instead. The test fails on its assertion: the eighth positional field is release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 2 found no bugs. From its code-quality points: - DatasetSpec.release is keyword-only, so variant keeps its position as the eighth positional argument (the test in 5752cae fails before). - docs/release-contract.md: C2 says the loader's certification reader reads a build-folder manifest's top level only, and the M1 row no longer says "where the repository has one". - DatasetSpec.hf_url's docstring says it names the root URL, which no repository holds a dataset at, for messages. - The tagged publisher's docstring says every release repository has releases.json, not only the UK and US ones. - The --base-h5 and --h5 help texts of build_us_fiscal_refresh_release and score_us_fiscal_targets name the current build in releases.json instead of "HF latest". - The offline check in both live-load helpers follows each cause once, so a cause cycle ends. - The changelog fragment names the one caller found outside this repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 3 found no bugs. From its code-quality points: - The loader's refusal of a repository without releases.json says what to check (the registry entry's repository) and how a build published before its repository switched is read (by path at its tag), and the Raises sections of resolve_certified, download_certified and load list it. - The live-load helpers' offline check is one check applied to the exception and each cause once, kept in test_support's loader module; the engine-free loader tests import it instead of keeping a copy. - The registry comment and the keyword-only test say only that variant stays the eighth positional argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ile removal (#1794) main removed the tagged publisher and this branch removed the pointer-file readers, so in microcosm.data.release, microcosm.data's exports, the release tests and their helpers neither side's names stay. With publish_release gone, nothing calls the pointer writers either, so they go in the resolution: latest_pointer_payload, latest_evidence_pointer_payload, LATEST_POINTER_PATH, LATEST_EVIDENCE_POINTER_PATH, LATEST_POINTER_SCHEMA_VERSION and RELEASE_TIER_EVIDENCE, with the tests and the comment that only they used. The publication command's docstring, the agent guide and docs/release-contract.md keep this branch's account of the pointer files and main's account of the tagged publisher's removal. The text main added on the pointer readers and on line_for_release_id goes, since this branch removes them, as does the ruff configuration comment on release.py's pointer readers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The six cases of test_microcosm_data_exports_no_pointer_file_reader_or_writer that waited for publish_release were strict expected failures. The merge of main removed the names, so the cases pass and the marks go. 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.
Closes #1794. Tracker task 5b · 12 ("Microcosm: Stop reading and writing
latest.jsonpointer files") of the collector/emitter project.What this does
Every release repository lists its builds in
releases.json, and each repository's switch deleted itslatest*.jsonpointer files: UK and US in November, BE on 2026-11-26. This PR removes what still read those files or wrote them, and moves the AM and NZ release contracts to build folders andreleases.json.Nothing that loads an older build needs a pointer file.
build=pins only a build thatreleases.jsonlists.src/policyengine/data/bundle/manifest.json); it reads no pointer file and imports no pointer reader.microcosm.data.release.latest_releasefor a provenance ID beforeload("us", 2024). That call already fails, because the US repository has nolatest.json(Hugging Face answered 404 on 2026-11-27); after this PR it fails at import instead. GitHub code search finds no other use oflatest_release,latest_line_release,latest_evidence_release,LatestPointerorunverified_rootoutside this repository.Changes:
microcosm.data.loader): reads every entry throughreleases.json.load(unverified_root=True). No repository holds a root dataset file.CertifiedReleasekeeps its fields so callers don't change;artifact_revisionis now alwaysNone.DatasetSpechas nopointer_path, andreleaseis required.microcosm.data.release: removeslatest_release,latest_line_release,latest_evidence_release(nothing called it),LatestPointer,line_pointer_path,line_pointer_payload,LINE_POINTER_PATH_TEMPLATEandRELEASE_TIER_CERTIFIED. With the tagged publisher gone (5b · 10, Remove the tagged publisher, microcosm-publish-release #1797), it also removes the pointer writers that publisher used:latest_pointer_payload,latest_evidence_pointer_payload,LATEST_POINTER_PATH,LATEST_EVIDENCE_POINTER_PATH,LATEST_POINTER_SCHEMA_VERSIONandRELEASE_TIER_EVIDENCE. Neithermicrocosm.datanormicrocosm.data.releasehas any pointer name left.microcosm.data.contract: removesline_for_release_id,dataset_role_for_lineand the per-build tag pattern, which only pointer-file code used. The fixture generator's C1 inventory loses itslinefield; the C1 and C5 fixtures are regenerated.microcosm-publish-release-build: keeps its check for pointer files. The emitter refuses only a change of a release's current build while one exists, so this check is the only refusal for a publication without--make-current. It is now one message for any repository, with or withoutreleases.json: remove the file.boundary.publiclistsreleases.jsoninstead oflatest.json;releases/<release>/<build>/folders thatreleases.jsonlists, replacing "data_build_id plus Hugging Face revision";releases.json. NZ's sentence that the dashboard readspopulace-nz/latest.jsonwas out of date: the calibration diagnostics dashboard names no NZ or AM repository and reads nolatest.json.docs/release-contract.md, andchangelog.d/1794-stop-reading-latest-pointer-files.removed.md.What this builds on
2ad51bfea, because both change the pointer-file refusal and its test. Until Remove the build-folder switch tool now that every release repository has moved #1793 merges, this PR's diff includes Remove the build-folder switch tool now that every release repository has moved #1793's changes.microcosm-publish-release) merged intomainon 2026-11-27, andmainis merged in here ated78493fd. Itspublish_releasewas the last caller of the six pointer-writer names, so they go in that merge. The six cases oftest_microcosm_data_exports_no_pointer_file_reader_or_writerthat were strict expected failures until then now pass, andd2a6621e2removes their marks.Commits
dbbc5f483adds the tests, which failed before the change: 32 failing on assertions, run individually.packages/microcosm-data/tests/engine_free/shared/test_no_pointer_files.py. Its two loader tests failed because the loader followed a pointer file and succeeded.test_country_spec.py.test_release_contract_fixtures.py.test_uk_release_publication.py.2ad51bfeamerges 5b · 11's branch. The one conflict, in that refusal test, keeps this PR's expectations plus Remove the build-folder switch tool now that every release repository has moved #1793's checks that no tool command is named.0dc0ddddais the change.latest_release; 5b · 10 removed the rest of that publisher's tests.releases.json.releases.json.5ee94414cmergesmain, to resolve conflicts indocs/release-contract.md(main replaced the UK-cut-runner gap with the .py certification tool's; the pointer-readers gap goes) and in the NZ golden spec (regenerated from the merged sources). The release-contract fixtures still reproduce (--check).e7dbcaf10fixes review round 1 (below).5752caec7adds a test thatDatasetSpectakesreleaseby keyword, which failed on its assertion.9f9cb4aa8makes it pass and addresses round 2's other points (below).4d8776890addresses round 3's points (below).ed78493fdmergesmain, with 5b · 10's removal of the tagged publisher. Seven files conflicted:microcosm.data.release,microcosm.data's exports, the release tests and their helpers,mainhad removed the tagged publisher and this branch the pointer readers, so neither side's names stay. The six pointer-writer names go too, with the tests that only they used.docs/release-contract.mdkeep this branch's account of the pointer files andmain's account of the tagged publisher's removal. The textmainadded about the pointer readers andline_for_release_idgoes, since this PR removes them.release.py's pointer readers, and a test-helper comment on how the tagged publisher handled evidence releases.--check).d2a6621e2removes the six expected-failure marks.Not changed
integrity_notesaying which taglatest.jsonnamed on 2026-08-29.source_enrichment.py,tools/build_us_acs_donor_receipt_qualification.py). This avoids changing their bytes for prose alone.contract.pyis in those lists too and changes here, as it does in most PRs.changelog.d/,PROGRESS*.mdandexperiments/are history.latest.jsonandlatest-national.jsonas pointer files.Merge waits for
done(Remove the build-folder switch tool now that every release repository has moved #1793).Review
Round 1, at
5ee94414c(three bugs, all fixed ine7dbcaf10; all three were in tests or in how CI reports, so there is no separate failing-test commit):expected_revisionkeyword to the loader's manifest check, so each raisedTypeError.test_declared_range_certifies_a_later_patch_for_both_readersgave the loader's package-certification reader a tagged-layout manifest. It now rewrites the manifest with the builders'build_folder_release_manifestfirst.ed78493fdand are accurate now.CertifiedRelease.buildandartifact_revisionkeep their optional types, as agreed, so existing callers don't change.Round 2, at
e7dbcaf10: no bugs. It confirmed round 1's fixes. Its code-quality points were addressed in5752caec7(test) and9f9cb4aa8:DatasetSpec.releaseis keyword-only, sovariantkeeps its position as the eighth positional argument.docs/release-contract.mdC2 says the loader's certification reader reads only a build-folder manifest's top level, and its M1 row no longer says "where the repository has one";DatasetSpec.hf_url's docstring says the URL is at the repository's root;releases.json;releases.jsoninstead of "HF latest";build_folder_release_manifest, the function production uses, instead of certifying a build-folder candidate.Round 3, at
9f9cb4aa8, was the last round. It found no bugs, and confirmed the keyword-only field on every declared Python version (3.11 and up), the C5 snapshot, and that every loader entry point goes through the same refusal. No caller intools/orpackages/*/srccatches the oldEntryNotFoundError; the UK reference tool andrun_uk_cutnow report the newValueErroras a refusal. Its code-quality points were addressed in4d8776890:releases.jsonsays to check the registry entry's repository, and how to read a build published before its repository switched (by path at its tag).Raisessections ofresolve_certified,download_certifiedandloadlist the refusal.test_support.variantkeeps its position.No bugs are left open after the three rounds.
🤖 Generated with Claude Code