Repository navigation
Correctness fixes: checked pyramids only, frozen lists that stay consistent, a binding saved after its crops - #93
Merged
Merged
Conversation
Deleting a volume left holes in the buffer's frozen lists, and the next append collided on the primary key (extend_frozen appends at the list's count) while the split replay indexed the rows by position. The surviving rows now take indices 0..n-1 again, each with its seq. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
harness stage writes ok before harness check-stage records its verification, and read_stage published on ok alone, so a job that ended between the two (a walltime kill during the check) left a pyramid later rounds would reuse. A build with ok and no verification now fails the round and stays for the .building-* sweep. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…epared publish installed the new binding before copying the crops, and the reindex in its finally stamped that binding's hash on whatever had landed, so a crop that failed its checksum left a folder prepared_row called prepared with an empty or partial set. The binding now lands once every crop is in; a Conflict leaves the earlier publication authoritative. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… staged reference put_volume replaced the volume row but only added references, so a volume that moved to a new artifact left the buffer referencing the old one and the keeper kept it on disk until the buffer retired. The reference now goes with the move when no other volume of the buffer still lives in that artifact, as a deletion already did. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e it rests The poll asked only about records not yet settled, so a dataset that stopped early and was shelved while another was still preparing kept its stale needs-human and the request rested at needs-human with nobody left to tell it (a recheck comes only to a request already resting). Before resting, the round reads every pinned record once more; behind a patch marker for the runs that rest there already. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
It skipped any URL files.json listed, and a HEAD or a read by range lists a file without keeping a byte, so a dropped replacement could be reported in place while the offline stage job found an empty cache. The skip now asks cache_missing, as raw_ready does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The sweep planned from one snapshot and deleted on the old row, while a buffer that reuses a pyramid registers it with no lock: a registration between the plan and the deletion left the buffer pointing at a missing directory. The keeper now reads the row with its references once it holds the lock and leaves one that is referenced or used since. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A map-style dataset with no __iter__ is iterated by index until IndexError, and the train branch returned a crop before the bounds check, so a loop over the dataset itself never ended. The check now comes first for every split. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A release by an owner whose lock had lapsed renamed the live lock aside before reading whose it was, so for a moment the new owner's heartbeat found it gone. Another owner's lock is now left alone; the put-back stays for one that changes hands between the look and the rename. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
harness stage writes ok with a verification whose ok is null; check-stage sets it true. read_stage requires that true, on a build before it is published and on a published pyramid before it is reused. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n lists in the same write put_volume compares the stored volume with the new one inside its transaction and removes every split's frozen rows there, returning the count; a buffer-api that stops between the volume write and the clear can no longer leave the new volume with rows drawn from the old candidates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… served The split route drops the rows of every quarantined volume before it reads the list, with the same compaction that runs at unregister, so a revoked volume is not handed out through a frozen list while another volume keeps the split open and the buffer's round has yet to unregister it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
buffer-api tells a request of a dataset that settles only once the request's stage reads needs-human, so one that settled between the round's last look and that write was not seen until the next buffer-api start; the request now looks once right after the write, under the prep-stuck-look marker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
krokicki
force-pushed
the
correctness-fixes
branch
from
November 23, 2026 02:36
3e70fc9 to
57f141d
Compare
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 from the 2026-11-22 correctness review and its follow-up, one commit each with a test. No new feature, no stage or action change, no wire-format change.
What changes
Staging
harness check-stagepassed it:read_stagerequiresverification.oktrue on a build before it is published and on a published pyramid before it is reused.harness stagewrites the block with a nullok; a job that ended between the two commands no longer publishes. The live staged root was scanned: the 21 pyramids without a passed check all predatecheck-stageand no buffer references them.verify_dropskips a dropped file only when the cache holds its bytes, not on a files.json entry alone.Registry.asset_row).Frozen eval lists and the ledger
seqrenumbered), so the next append no longer collides.mia-data
publishcopies the binding after the crops, so a Conflict leaves the earlier binding and manifest authoritative andprepared_rowdoes not call the new binding prepared.Preparation requests
needs-human, and once again right after that write (behind the patch markerprep-stuck-look), so a dataset that was shelved or prepared while others were still preparing is seen.Client and locks
BufferDatasetraisesIndexErrorpastlenfor the train split too, so a plainforover it ends.LockDir.releaselooks at the holder before it renames anything, so a release after the lock was lost never takes a new owner's lock out of play.Rollout
The
prep-stuck-lookmarker means running requests pick up the request fixes after a worker restart. Nothing else needs a step.Checks
Full suite (1931 tests),
pixi run lintandpixi run typecheckpass; the diff names no real path or host.@StephanPreibisch @jakobtroidl