Skip to content

skills(verify-diff-lifecycle): model client ownership and ClaudeCodeDiffClosed reentrancy #342

Closed

Description

@ThomasK33

Known gaps in the verify-diff-lifecycle model (#328). The model does not cover these two paths, and SKILL.md lists both under Scope.

  1. Client ownership of a diff. SavedDiffKept counts a close by any connected Claude client as Claude's. Suppose a second client's closeAllDiffTabs or close_tab closes a diff that the user saved with :w, and the client that opened it died before it wrote the file. Then the accepted edits are lost, and the model does not check for it. Modeling this needs the closing client on the close actions, plus an owner-alive condition.
  2. ClaudeCodeDiffClosed handlers during a bulk close. close_active_diffs takes a snapshot of the tab names, then closes them one by one. Each close fires ClaudeCodeDiffClosed synchronously. A user handler that accepts another diff from the snapshot gets that saved diff closed by the next loop step. This is the same kind of reentrancy as the ClaudeCodeDiffOpened finding (bug(diff): a ClaudeCodeDiffOpened handler that accepts or denies the diff leaves openDiff unanswered forever #325). It has not been replayed on real Neovim, so it is a candidate bug, not a confirmed one. Modeling it needs an assumption constant and an expected-fail config, the same way opened-handler works.

Refs #325


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions