Repository navigation
git backend: one long-lived git, stream branches keep the base's promises, failures are named - #50
Merged
Merged
Conversation
save_batch looped over save, and save started git twice per file, so a caller that records n files to add one paid 2n process starts each time. Every blob now goes through one hash-object and every path through one update-index; saving one file is the batch of one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
GitStreamBackend keeps its staged tree in memory, names blobs and trees itself, and writes each checkpoint down one git fast-import that stays open for the repository. A checkpoint starts no process: 0.8 ms against 36 ms for a context of 60 turns. It is on disk, where another process reads it, at flush; reading anything not staged here flushes first. The index member's staging steps are named methods the stream member overrides, and both pass the same branch tests. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
Review (pm-trainer): a lost race was silent, the computed tree id was never checked while running, and the open git never closed. - A branch this stream has moved past the instance's head is a conflict raised at checkpoint. A branch another process moved is refused by git at flush; what git says goes to a file read at every flush, and the flush raises it. - Every checkpoint asks git for the root tree it made, in the same write, and raises if it differs from the one computed. A ref holding anything but plain files is refused when opened. - The open git closes when its last branch goes, leaves the table when it closes or dies, and is kept per process. Committer identity comes from the environment's one declaration; an unchanged checkpoint drops the blobs staged for it; answers are counted, not searched for in file content. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
What git says goes to a nameless file, so a repository deleted under an open stream no longer fails the stream's close while looking for it. After a flush raises a refused branch, git is told to forget where the stream had its branches: the refusal is not repeated at close, and other branches go on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
Review (pm-trainer): the finalizer took the lock an opening stream holds, so a collection inside an open waited on itself for ever; and a checkpoint dropped its staged bytes before it knew the commit had happened. - A branch's finalizer only notes that it has gone. The next open or flush closes the streams left without branches; one exit hook closes the rest. - The bytes are let go after the commit returns, or when the tree is unchanged. - A stream that ended, or one inherited through a fork, says so when used. - Git's words are read beside its place in the file, not by moving it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
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.
Merges
ccr-47f85394-dww5uu(7 commits, 5 files:git.py,git_stream.py,constants.py,__init__.py,tests/test_git_backend.py) into main.It continues the git backend merged in #49; written by pm-trainer-e for the agent-comms context history.
Maintainer instruction to merge: Tristan, bus messages 32383 (
5f618fde8035) and 32397: merges with--adminare the team's to make and nothing waits on him.🤖 Generated with Claude Code
https://claude.ai/code/session_016gZLdxS38RuoZjQTydVqFS