Skip to content

feat(corrections): share the local findings buffer across a clone's worktrees #12907

Description

@kyle-sexton

Parent: #7555. Follows #12884 / #12889. The owner chose "whatever the research says" in session on 2026-11-03; the research recommends one buffer per clone, shared by every worktree.

Why

The local-file findings-buffer adapter keys its file on git rev-parse --show-toplevel (plugins/corrections/tools/findings-buffer/adapters/local-file/append.sh:17, read.sh:30), which is per worktree. A row noted in one worktree, including the applied-change rows /session-flow:retro now writes and judges, is invisible to a retro in any other worktree of the same clone. The owner runs many concurrent sessions across worktrees, so most later retros would find no rows.

  • Claude Code's own auto memory uses the scope proposed here: "Auto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments." (memory docs, auto memory).
  • Rows stay on the machine: "Rows derived from session transcripts never leave the machine" (CONTRACT.md:87, Privacy). A GitHub-backed or committed store would loosen that control in a public repository; that is out of scope and the owner's call.
  • git rev-parse --git-common-dir names the directory every linked worktree of a clone shares (git-rev-parse).

Done when

  • local-file append.sh and read.sh resolve the buffer directory from git rev-parse --path-format=absolute --git-common-dir, so every worktree of one clone reads and writes one file, with the existing symlink and path guards applied to the new location.
  • read.sh also returns rows from the old per-worktree <toplevel>/.work/buffer/findings.jsonl when present, so rows written before this change are not lost (buffer.sh read already drops repeat obs_ids).
  • CONTRACT.md (and the corrections README where it names the path) states the new location and that it is shared by a clone's worktrees and stays on the machine.
  • buffer.test.sh / conformance.test.sh gain a case: a row appended from a linked worktree is read from the main worktree, and the reverse.
  • .changes/corrections/*.md fragment, bump: minor.
  • CI green.

Out of scope

  • Sharing rows across machines or through GitHub (Privacy rule above).

Activity

  1. added
    priority: mediumReal value, no hard deadline; normal backlog flow.
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.
    on Nov 3, 2026
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: change the corrections local-file findings-buffer adapter so it keys the buffer on the clone's git common dir. Every worktree of a clone then shares one local file. read.sh also keeps reading the old per-worktree file. Docs, a cross-worktree test and a changelog fragment come with it. The done-when list is exact and the design is already chosen. I found no duplicates among open issues.

    Automated triage, applied by the lanes App.

  3. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor
    No description provided.
  4. removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions