Repository navigation
Build each leaf-assets publication on the branch's pin - #1857
Merged
Merged
Conversation
A publication used to clone the asset repository's head and make a directory's files exactly the ones this run produced. A file another branch had published into that directory since this branch's pin was on the head, absent from this run, and so deleted: while #1793 was in review, another session's thread-image publication removed its new inline-dark images. The clone now checks out the pinned revision, so a stage adds, replaces and removes against what this branch reads. Publish commits that change and cherry-picks it onto the current head before pushing, keeping what others published since. Where both changed one file, the publishing change's copy stands, as it would have on its own pin. The head stays a line, so of two pins that meet in a merge the later holds both branches' files. An unchanged checkout now keeps its pin rather than moving it to the head. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 6, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
Two overlapping publication cases still prevent a completed publish; details inline.
… push Review of the cherry-pick found two ways a publication could stop short. Where one side removed a file the other changed, `-X theirs` leaves a modify/delete conflict rather than applying the rule that the publishing change's choice stands. And a push refused because another publisher moved the head left a clean checkout whose retry pushed the same stale commit again. The change now lives at `refs/leaf-assets/change` in the checkout, and `replay` applies its file list to the current head: each file it added or altered takes its copy, each it removed is removed, whatever the head did to that file. `publish` replays and pushes up to three times, and a later call replays the kept change onto the head as it then stands. The catalog links derive from the commit each attempt pushes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 6, 2026
# Conflicts: # dev/leaf_dev/leaf_assets.py # tests/test_leaf_assets.py
leaf-agent
previously approved these changes
Oct 6, 2026
`clone` and `stage` wrote which pin the clone came from and which tree the writer owned into the clone's git config, for `publish` to read back. The facts travelled hidden between two calls. They now return a `Checkout` carrying the clone's path, its pin key and the owned tree, and `publish` takes it; callers that read files use `checkout.path`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 6, 2026
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.
A publication to
max-sixty/leaf-assetscloned the repository's head and set a directory to exactly the files that run produced. If another branch had published a file into that directory since this branch's pin, the file was on the head but missing from this run, so the publication deleted it. While #1793 was in review, another session's thread-image publication removed its newinline-darkimages this way.clonenow checks out the revisionleaf-assets.jsonpins. A stage's additions, replacements and removals are therefore measured against the set this branch reads.publishcommits that change, records it atrefs/leaf-assets/changein the checkout, andreplays its file list onto the current head:publishcall on the same checkout replays the kept change onto the head as it then stands.thread_snapshots_revision, from Add optional Playwright trace review and comments #1850) still installs its whole expectation tree exactly as staged.cloneandstagereturn aCheckout(its path, the pin key it was cloned from, and withreplace_tree=Truethe directory it owns), andpublishtakes that value.replayinstalls an owned tree whole from the change, so head files outside the tree survive. The pin a checkout publishes is the one it was cloned from:stage/clonetakerevision_key, andpublishno longer does.AGENTS.md:revisiontakes the later pin, which now holds both branches' files;thread_snapshots_revisionis accepted again from the merged tree.Validation
test_a_publication_keeps_what_others_published_since_its_pinis new.The existing publication test passes in both variants, including the refused push and its retry.