Skip to content

fix: exclude fleet-owned queue tasks from session-close's in-progress gate - #170

Merged
bborbe merged 1 commit into
masterfrom
fix/session-close-fleet-tasks
Sep 14, 2026
Merged

bborbe merged 1 commit into
masterfrom
fix/session-close-fleet-tasks

Conversation

@bborbe

@bborbe bborbe commented Sep 14, 2026

Copy link
Copy Markdown
Owner

What

session-close Phase 4.5 no longer hard-flags a bot-created queue task the session merely nudged.

Why

Phase 4.5's in-progress gate counts any vault-cli task set as "touched". A session that parks a dispatch loop or re-drives a probe writes exactly that — assignee: "" or assignee: sentry-fix-agent on an Analyze Sentry issue … alert — and the file then reads as a touched, in_progress task. The gate has no lever for it but a status flip, which changes nothing real, so the operator is asked to adjudicate the fleet's queue before the verdict can go clean.

Observed 2026-09-14: closing a session whose own anchor was already completed forced the operator to resolve two parked sentry-fix probes (NUKE-DEV-EY, NUKE-PROD-BX) — a reply spent on work that was never that session's.

Change

Such a task is excluded on the same terms as the existing created-this-session exclusion: no claude_session_id naming this session, not created here, and carrying a producer's task_type. If either of the first two fails, it is an anchor and the gate runs normally — the same scope test the existing clause uses.

Same class as the 2026-09-02 fix that added the created-this-session exclusion ("You do it every day nearly") — this is the sibling category it left open.

Verification

  • make precommit green (lint, vet, govulncheck, osv-scanner, trivy, CHANGELOG structure, tests)
  • Markdown-only change: commands/session-close.md + a ## Unreleased bullet

… gate

Phase 4.5 counted any vault-cli task set as 'touched', so a session that parked or re-drove a bot-created queue task had to have the operator resolve it before the verdict could go clean. Such a task is now excluded on the same terms as the created-this-session exclusion: no claude_session_id naming this session, not created here, carrying a producer's task_type.
@bborbe
bborbe marked this pull request as ready for review September 14, 2026 21:52

@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.

Now I have all the information needed. Let me analyze the candidate rules and render my verdict.

Step 4c-sel CLASSIFY (diff-scoped):

Changed files: CHANGELOG.md, commands/session-close.md

Rule Trigger matches? Applicable? Reason
changelog/conventional-prefix-required CHANGELOG.md ✅ Yes CHANGELOG.md changed
agent-cmd/command-frontmatter commands/**/*.md ✅ Yes commands/session-close.md changed
agent-cmd/command-thin commands/**/*.md ❌ No "substantially changed" — this adds 2 lines of prose to an existing rule; no new file, no structural change
agent-cmd/gap-driven-feedback commands/**/*.md ❌ No No agent depends on information that may be incomplete from this diff
agent-cmd/no-user-prompts commands/**/*.md ❌ No No permission requests or user prompts added
agent-cmd/scripts-in-claude-dir commands/**/*.md ❌ No No new script dependencies

Step 4d-sel ADJUDICATE:

  • changelog/conventional-prefix-required: CHANGELOG bullet fix: ... — ✅ valid prefix
  • agent-cmd/command-frontmatter: commands/session-close.md — frontmatter unchanged, file pre-existing

Internal consistency check on the documentation logic itself: The new paragraph (line 242) introduces a fleet-owned task exclusion that reads internally consistently with the surrounding created-this-session exclusion. No conflicts detected.

{
  "verdict": "approve",
  "summary": "Documentation-only change: a 4-line CHANGELOG entry and a 2-line addition to the session-close command doc that clarifies the fleet-owned task exclusion from the in-progress gate. The change is well-scoped, uses correct conventional prefixes, and introduces no new structural elements to the slash command.",
  "comments": [],
  "concerns_addressed": [
    {
      "concern": "correctness: documentation-only change — the fix adds a markdown exclusion rule to the session-close command doc. No Go code was modified, so the actual gate logic must already handle this case, or the fix is incomplete.",
      "disposition": "not-an-issue",
      "detail": "commands/session-close.md is itself the implementation — it is a CLAUDE.md slash command specification where the markdown IS the operational definition. The exclusion logic is fully specified in the prose (line 242) and applied via the interpret bullet at line 255 ('unless the created-this-session exclusion above applies' — fleet exclusion is documented alongside the created-this-session exclusion as an equivalent exception). The session-close command reads vault tasks via vault-cli and interprets status; the exclusion criteria (no claude_session_id naming this session, not created here, task_type present from a producer) is human-readable logic the command executes."
    }
  ]
}

@bborbe
bborbe merged commit f37af7a into master Sep 14, 2026
3 checks passed
@bborbe
bborbe deleted the fix/session-close-fleet-tasks branch September 14, 2026 21:56
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