Skip to content

session-scoped composer inserts key on session id alone — carry project/work_dir identity through queued restores #350

Closed

Description

@wheregmis

Follow-up from #348.

pending_queued_restores and the session-scoped RequestedComposerInsert both key on session_id alone, while composer_drafts keys on (Option, Option) — project work_dir + session id. If two loaded projects ever surface the same session id (a copied project, a duplicated .threadlane state dir), a delayed cancel reply or journaled QueuedEntryCancelled could deliver its staged payload to a same-named session in a different project's draft.

Session ids are per-daemon unique today, so this is defense-in-depth rather than a live bug — but the insert already distinguishes "apply to whatever composer is on screen" (session_id: None) from "wait for this session" (Some), and tightening the key to (work_dir, session_id) aligns it with how drafts are actually stored. Documenting/enforcing global session-id uniqueness would also close it.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions