Repository navigation
feat(corrections): share the local findings buffer across a clone's worktrees - #12911
Conversation
…orktrees The local-file adapter now stores rows in findings-buffer/findings.jsonl under the git common directory, which every worktree of a clone shares, so a row noted in one worktree is visible to a retro in any other. The symlink and realpath guards and the append lock move with it. read.sh also returns rows from the old per-worktree .work/buffer/findings.jsonl. Closes #12907 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLCzgJayUQq9Saq4AK
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review (incremental, 910bc03 → d3cc7fb): PR #12911I read every hunk of the one file in scope, No security issues found. What I checked:
This push applies the fix from the settled thread on critical-findings: 0 |
|
claude-review reviewed Code review (incremental, 910bc03 → d3cc7fb)No new findings in this push. It changes one file, Last round's finding is fixed. That finding said the symlinked-
Closing issue #12907: this push changes only one test case, so the earlier judgment on the "Done when" items still holds. I can't check "CI green" from here. Other checks:
|
…he read A symlinked .work made read.sh exit 2 before it read the shared buffer, while append.sh, which no longer touches .work, kept succeeding: rows went in and could not be read back. The legacy path now skips only the legacy file with a note on stderr; the shared buffer keeps its hard symlink refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLCzgJayUQq9Saq4AK
The symlinked-.work case pointed at an empty directory, so it passed with the skip removed. Put a row behind the link and assert it is left out; the case now fails when "$TOP/.work" leaves the skip list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWmASLCzgJayUQq9Saq4AK
Post-merge mutation testingKilled 3, survived 2, timeout 0, no coverage 0, invalid 0, not run 2.
Surviving mutants
The run's summary has the full report. |
Closes #12907
Summary
The
local-filefindings buffer keyed its file ongit rev-parse --show-toplevel, which differs per worktree, so a row noted in one worktree (including the applied-change rows/session-flow:retrojudges) was invisible to a retro in any other worktree of the same clone. The buffer now lives in one file per clone, shared by every worktree, and still never leaves the machine.Fix
<git common dir>/findings-buffer/findings.jsonl, resolved withgit rev-parse --path-format=absolute --git-common-dirinappend.shandread.sh. Basis: git-rev-parse says--git-common-dirshows "$GIT_COMMON_DIRif defined, else$GIT_DIR", the directory linked worktrees share, and--path-format=absolutemakes the printed path "absolute and canonical". Git tracks nothing under its own directory, so rows never reach a commit. That is why the.work/buffer/.gitignorewrite and its symlink guard are gone; the conformance test still assertsgit status --porcelain --untracked-files=all --ignoredstays empty after an append.append.shrefuses a symlinkedfindings-buffer,.lock,.lockdirorfindings.jsonl, and refuses a buffer that resolves outside the git common directory. Both sides of that check come frompwd -P, as before.read.shrefuses the same symlinks at the new location and at the legacy one. Theflock, perl andmkdirlocks now sit in the shared directory, so they serialize appends from every worktree.read.shalso returns rows from the current worktree's.work/buffer/findings.jsonlwhen that file exists, and applies--sinceto them too.buffer.sh readalready drops a repeatobs_id.CONTRACT.md(Privacy, Adapters) and the corrections README state the new location and that it is shared by a clone's worktrees and stays on the machine. A.changes/correctionsfragment carriesbump: minor.Verification
bash plugins/corrections/tools/findings-buffer/conformance.test.sh: 38/38 ok. New cases:--sincefilters themorigin/mainadapter scripts fails the new worktree and legacy cases (32, 33, 35), so they test the change.bash plugins/corrections/tools/findings-buffer/buffer.test.sh: 53/53 ok, including a linked-worktree read throughbuffer.shand a legacy row with a repeatobs_idthat reads once.bash plugins/corrections/scripts/group-findings.test.sh: 29/29 ok (it writes the legacy path).shellcheckon the five changed scripts: clean.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASLCzgJayUQq9Saq4AK