perf(daemon): scope sync.family's trace fence to the requested family - #2030
Merged
Conversation
Member
Author
This was referenced Jul 29, 2026
sync.family waited on the global trace fence, so an open mutating trace root in repository A delayed synchronization and test drains for unrelated repository B. Use the existing trace2-captured root family attribution to ignore roots already assigned to another family. Unattributed roots continue to fail closed, the requested family still waits for its own roots, and global consumers such as await and shutdown retain the global fence. Add internal fence coverage plus a two-TestRepo regression proving an unrelated family completes while the originating family remains blocked until the trace root closes. Re-lands the per-family fence idea from #1980 on the current architecture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
svarlamov
force-pushed
the
fix/per-family-trace-fences
branch
from
August 2, 2026 22:00
4888713 to
52c908e
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.

Summary
sync.familypreviously waited on the global trace fence, so an open mutating trace root in repo A could delay synchronization for unrelated repo B.root_familiesmap and add a family-scoped fence that ignores roots known to belong to a different family.awaitand shutdown drain) on the global fence.TDD / regression coverage
TestRepobehavioral test that holds repo A's mutating trace root open, proves repo A's ownsync.familystays blocked, and proves repo B synchronizes before repo A closes.main(repo B times out) and passes on this branch.task test,task lint,task fmt, andgit diff --checkare green locally after restacking onto currentmain.This re-lands the per-family fence idea from #1980 on the current trace2 architecture. It adds no Git spawn, object/ref lookup, or file read to the ingestion path.