Repository navigation
trail: overlap only after an edit to a shared function - #617
Conversation
🌱 graft blast radius4 areas changed → 3 areas can be affected. 7 dependent symbols, depth 2. flowchart TB
A0(("Tool Invocation<br/>3 symbols"))
A1(("Workspace Sync<br/>3 symbols"))
A2(("Workspace Query<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2 reached;
Who knows this code — 2 people across 7 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 7 dependent symbols, grouped by areaTool Invocation — 3 symbols in 1 file
Workspace Sync — 3 symbols in 1 file
Workspace Query — 1 symbol in 1 file
Test signal per changed area — 1 ✓ · 1 ⚠ · 2 ✗Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
4 test suites also reference this code4 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Moves: none of the project's metrics directly.
learnings_committedis the main number, and this doesn't change what gets committed. It stops trail from putting false alarms in front of people during the assign rollout, where overlap lines were the first thing a teammate saw.Why
On 15 Oct every overlap line trail showed in a session was wrong.
fix/trail-release-prepandfix/npm12-grammarshad been squash-merged as #595 and #594. Their branches were still on origin, so git's history called them unmerged, and trail flagged them as open work. The lines also fired on files guessed from the prompt rather than code anyone was editing. They flaggedsrc/cli.tson a prompt that matched no code at all, and they only said which file was shared, never what the clash was.What changes
Merged or closed branches aren't open work.
refreshBranchesnow skips a branch when:git merge-tree --write-tree), which is how a squash merge looks, orgh. The result is kept in the cache, so the session-start refresh never waits on GitHub. Withoutgh, or off GitHub, the merge-tree check still applies.A branch that gets new commits after its merge or close shows up again.
Overlap comes after an edit, at the function level. The prompt hook and
trail askno longer print overlap lines. After Claude edits a file that a teammate's open branch also changes, the post-edit hook parses both versions of the file and compares the function each change lands in. It does the same for a top-level declaration such asconst defaultRetryMax, since the graph has no node for constants. It ignores imports. The parse runs only for a file some branch changes, so most edits cost one cache read.When both changes land in the same function, Claude gets the function, the branch, its commit message (quoted as data, cleaned to one line) and the
git diffcommand to read the change. It's asked to tell the user in its own words, starting with🔀 trail ·, whether the two clash:Each branch and function is mentioned once per session.
trail check's file-level line keeps its place before a PR, now with the🔀 trailmark and without merged branches.Tests
trail-edit-overlap:trail-cloudfor the new mark. Removed the prompt-overlap test along withoverlapsForPrompt.trailis installed globally on this machine for a demo. CI has no global trail.🤖 Generated with Claude Code