Conversation
A pair gets its identity when its index is created, and bark::save adopts that identity into a manifest that has none. The records sink called with_identity first, which mints one, so save found an id already there and adopted nothing: a store whose first writer was the sink ended up with a manifest and an index naming different stores, and the next open refused it as two identities for one store. Only a store with no manifest before its first append was affected; a manifest written first (the unit runs `set host=` before the appender) hides it. The sink now hands save the manifest as it is, on the end-of-stream path and on the graceful-exit path. Co-Authored-By: Claude Sonnet 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.
Problem
timberfs create s.logwrites no manifest. Afterappend --recordsran once, the next open failed:A pair gets its identity when its index is created, and
bark::saveadopts that identity into a manifest that has none (its comment says so, and sayswith_identityis the last resort for a store not on disk yet). The records sink calledwith_identityfirst, which mints one, sosavefound an id already present and adopted nothing. The manifest and the index then named different stores.It was hidden wherever a manifest existed before the first append: the shipped unit runs
timberfs set host=…first, which creates one. A barecreatefollowed by an append, or a sink writing to a path nothing had set up, hit it.Change
sink.rshandssavethe manifest as it is, on both paths that write one: the end of the stream and the graceful exit. Nothing else changes:exportmints for a bundle that does not exist on disk yet, andincus_intakemints the id before it creates the pair, as its comment explains.Test
Runs the sink twice on a store with no manifest and checks that the manifest and the index carry the same id and that the second open succeeds. It fails on the previous code at the identity assertion. The same repro through the CLI (
create, then three appends) now opens every time, andinfoshows one identity.A store that already hit it
timberfs identity <store>reports the disagreement, and--keep indexor--keep manifestresolves it. The manifest side is the one readers were using.🤖 Generated with Claude Code