populace.data.release: latest.json pointer + contract-gated publishing#13
Closed
PavelMakarchuk wants to merge 1 commit into
Closed
populace.data.release: latest.json pointer + contract-gated publishing#13PavelMakarchuk wants to merge 1 commit into
PavelMakarchuk wants to merge 1 commit into
Conversation
The Hub repo had no way to say which release is current: consumers listed the releases/ tree and guessed, and same-day builds (the ids end in a date) have no defined ordering. publish_release() validates the release directory against the contract (an invalid release uploads nothing), uploads its files, and writes the latest.json pointer LAST so a reader never sees a pointer to files that are not there yet. latest_release() is the consumer side: one call that returns the typed pointer. The Hub client is injected so the suite tests the real ordering against a fake, network-free. Fixes #9. Stacked on #11's contract branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Superseded by #37, which merged the latest.json pointer and contract-gated publishing into main. |
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 #9. Stacked on #12 (the release contract) — merge that first; GitHub will retarget this to
mainwhen the base branch is deleted.What
Adds
populace.data.release— both sides of thelatest.jsonpointer:publish_release(release_dir, repo_id)validates the directory against the release contract (an invalid release uploads nothing), uploads its files, and uploadslatest.jsonlast — so a reader never sees the pointer before the release it points at.extra_files=lets a diagnostics artifact (Publish calibration diagnostics (per-target rows, loss trajectory, skipped targets) with each populace-us release #10) ride along.latest_release(repo_id)downloads the pointer and returns a typedLatestPointer— the one-call answer to "which release is current?" for dashboards and scorers. Refuses pointer schema versions it doesn't understand, loudly.Pointer payload (schema_version 1):
{ "schema_version": 1, "release_id": "populace-us-2024-9f1260b-20260611", "updated_at": "2026-06-11T13:53:15+00:00", "paths": { "build_manifest": "releases/populace-us-2024-9f1260b-20260611/build_manifest.json", "release_manifest": "releases/populace-us-2024-9f1260b-20260611/release_manifest.json", "sound_ecps_replacement_comparison": "releases/populace-us-2024-9f1260b-20260611/sound_ecps_replacement_comparison.json" } }Why
Nothing on the Hub says which release is current. Consumers list the
releases/tree and guess — and because build ids end in a date, two same-day builds (9f1260bvs5da5a95, both 2026-06-11) have no defined ordering. The calibration-diagnostics dashboard currently picks the lexicographically-last complete release, which is right today only by accident of hex ordering.Testing
api=), so the suite is network-free and mocks nothing of our own.ruff checkclean. Wheel builds.Follow-up (not here)
Backfilling
latest.jsonfor the already-published9f1260brelease is one call once this merges:🤖 Generated with Claude Code