fix: exclude fleet-owned queue tasks from session-close's in-progress gate - #170
Merged
Merged
Conversation
… 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
marked this pull request as ready for review
September 14, 2026 21:52
There was a problem hiding this comment.
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 bulletfix: ...— ✅ valid prefixagent-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."
}
]
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
session-closePhase 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 setas "touched". A session that parks a dispatch loop or re-drives a probe writes exactly that —assignee: ""orassignee: sentry-fix-agenton anAnalyze Sentry issue …alert — and the file then reads as a touched,in_progresstask. 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
completedforced the operator to resolve two parkedsentry-fixprobes (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_idnaming this session, not created here, and carrying a producer'stask_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 precommitgreen (lint, vet, govulncheck, osv-scanner, trivy, CHANGELOG structure, tests)commands/session-close.md+ a## Unreleasedbullet