Skip to content

identity.md injection still anchored on PROJECT_DIR in a git worktree (the #747 bug, second site) #756

Closed

Description

@fdaviddpt

Found by the v0.34.0 release audit (round 2, finding P3). It predates v0.34.0.

#747 fixed the tracked-handoff guard, which compared against PROJECT_DIR (the worktree) when the memory actually lives under MEMORY_PROJECT_DIR (the main checkout). The same anchoring pattern is still present in scripts/lib-memory-context.sh (~:100) for identity.md. From a linked worktree, the check runs against the wrong directory.

Fix direction: same as #752, anchor on ${MEMORY_PROJECT_DIR:-$PROJECT_DIR}. Better still, route it through the shared "may this memory file be injected" helper proposed in the sibling issue about name-only matching. Test-first, with a real git worktree add as in TestWorktreeTrackedHandoff.

[AI-generated]

Activity

  1. added
    filed-by-loop
    cohort-13
    on Sep 25, 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

    cohort-13filed-by-loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions