Skip to content

fix: session-close drops DONE when the anchor is still in progress - #298

Merged
bborbe merged 1 commit into
masterfrom
fix/session-close-closer-in-progress-anchor
Oct 15, 2026
Merged

bborbe merged 1 commit into
masterfrom
fix/session-close-closer-in-progress-anchor

Conversation

@bborbe

@bborbe bborbe commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Problem

/vault-cli:session-close § Closer panel prescribes ⚪ DONE for every clean verdict — mode 1, mode 2, and the goal-anchored case. Its own mode gate deliberately permits reaching those verdicts when the anchor task was resolved this session but still reads in_progress on disk: "a carried-forward in_progress task does not block them."

~/.claude/CLAUDE.md names exactly that an anti-pattern — "⚪ DONE while the anchored task is still in_progress" — and requires 🔵 READY / 🟡 WAITING / 🔴 BLOCKED in its place.

The two rules cannot be reconciled by wording. § Closer panel says "verbatim, no rewording", so a session that reaches mode 1 or 2 with a carried-forward anchor has no legal closer to emit: following the command breaks the memory rule, and following the memory rule breaks the command's own verbatim requirement.

Fix

One paragraph after the § Closer panel intro. It keeps the block's body unchanged and swaps its ⚪ DONE line for the panel the anchor's own state calls for — 🟡 WAITING with later (on <trigger>): when every open item is clock-bound, 🔵 READY when the next step is the operator's. Only the anchor's own status licenses ⚪ DONE.

Closing a session is not the same claim as the task being finished.

Evidence

Measured 2026-10-14 and 2026-10-15: two consecutive runs reached a clean verdict with a carried-forward anchor and had to improvise the panel against this section's own verbatim rule, because no block below offered one.

Verification

make precommit — PASS (ready to commit). CHANGELOG structure OK, golangci-lint 0 issues, go vet clean, all scenario/rule suites green, 0 vulnerabilities and 0 secrets.

@bborbe
bborbe marked this pull request as ready for review October 15, 2026 19:17

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No automated checks needed for a markdown-only change. Let me review the diff.

Reviewing commands/session-close.md:

The added paragraph (lines 711-712) states: when a carried-forward in_progress anchor keeps the clean verdict (modes 1 or 2), the ⚪ DONE line is replaced with the panel the anchor's own state calls for — 🟡 WAITING when items are clock-bound, 🔵 READY when the next step is the operator's.

The logic is sound: ~/.claude/CLAUDE.md forbids ⚪ DONE while the anchor is in_progress, but the mode gate lets a resolved anchor reach clean verdicts. The verbatim-rule prevents rewording the closer blocks, so the fix must substitute the right panel for the ⚪ DONE line. The two observed cases (2026-10-14 and 2026-10-15) are cited.

Reviewing CHANGELOG.md:

The Unreleased entry accurately describes the bug, the mechanism of the fix, what's in scope and out of scope, and the measured observation. Consistent with the code change.

Correctness: The fix is correct. The closer panel rules (⚪ DONE for clean verdict) conflicted with CLAUDE.md's anti-pattern rule (⚪ DONE while anchor is in_progress). The resolution is correct: keep the clean verdict (nothing is blocking), but substitute the panel that matches the anchor's actual state.

{
  "verdict": "approve",
  "summary": "Bugfix corrects the session-close closer panel: when a carried-forward in_progress anchor reaches the clean verdict, the ⚪ DONE line is replaced with the appropriate 🔵 READY or 🟡 WAITING panel per CLAUDE.md's own anti-pattern rule. CHANGELOG and code are consistent. No functional code changed.",
  "comments": [],
  "concerns_addressed": [
    {
      "concern": "correctness: session-close closer panel logic change — should show panel based on anchor state instead of always showing DONE",
      "disposition": "addressed",
      "detail": "commands/session-close.md:711-712 — clean verdict is preserved but the ⚪ DONE line is substituted with 🔵 READY or 🟡 WAITING when the anchor is still in_progress; CHANGELOG.md documents the fix in Unreleased"
    }
  ]
}

@bborbe
bborbe merged commit 66edc0b into master Oct 15, 2026
5 checks passed
@bborbe
bborbe deleted the fix/session-close-closer-in-progress-anchor branch October 15, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant