Scope session-close background-process check to the current session - #63
Merged
Conversation
Phase 5 scanned the machine-wide process table and flagged any running dark-factory daemon / watcher, including ones belonging to sibling Claude sessions. That is a false positive: it makes the verdict untrustworthy and pushes the user to clean up work that is not theirs to clean up. Candidates now come from the conversation itself (Bash run_in_background, Monitor), with ps used only to confirm liveness of those specific PIDs. Empty list skips the phase entirely. Phase 6 gets the same scoping note for dark-factory projects, and the Phase 9 example no longer models the bug.
There was a problem hiding this comment.
The diff is purely documentation (CHANGELOG.md + commands/session-close.md). Let me now do the in-session classification and adjudication.
Step 4b-i — Candidate rules (triggers matching CHANGELOG.md or commands/session-close.md):
| Rule ID | Owner | Trigger match |
|---|---|---|
changelog/conventional-prefix-required |
agent-auditor | CHANGELOG.md ✓ |
changelog/unreleased-entry-required |
agent-auditor | (script, no glob) |
changelog/preamble-frozen |
agent-auditor | (script, no glob) |
agent-cmd/command-frontmatter |
slash-command-auditor | commands/**/*.md ✓ |
agent-cmd/command-thin |
slash-command-auditor | commands/**/*.md ✓ |
agent-cmd/gap-driven-feedback |
agent-auditor | commands/**/*.md ✓ |
agent-cmd/no-user-prompts |
agent-auditor | commands/**/*.md ✓ |
agent-cmd/scripts-in-claude-dir |
agent-auditor | commands/**/*.md ✓ |
agent-cmd/single-source-of-truth |
agent-auditor | commands/**/*.md ✓ |
Step 4c-sel — Classify:
changelog/conventional-prefix-required→ applicable (CHANGELOG has## Unreleasedwithfix:prefix — correct ✓)agent-cmd/command-frontmatter→ skipped — existing file, not created; rule triggers on creationagent-cmd/command-thin→ skipped — change clarifies behavior, doesn't make command thin; "thin" = sparse/underspecified, this makes it more preciseagent-cmd/gap-driven-feedback→ skipped — existing command receiving a bug fix, not a new capability introducing a gapagent-cmd/no-user-prompts→ skipped — purely docs; no behavioral prompts introducedagent-cmd/scripts-in-claude-dir→ skipped — purely docs; no script dependenciesagent-cmd/single-source-of-truth→ applicable — correctly identifies the conversation'srun_in_background/Monitorcalls as the authoritative source; documents this explicitly
Step 4d-sel — Adjudicate:
changelog/conventional-prefix-required: CHANGELOG has## Unreleasedwith- fix: session-close Phase 5...—fix:is a recognised prefix. PASS.agent-cmd/single-source-of-truth: The doc now correctly states candidates come from the conversation'srun_in_background/Monitorcalls, not a machine-wideps auxscan. This is an accurate and well-scoped single source of truth. PASS.
Both applicable rules pass. No violations.
Step 3a — LICENSE: Present at repo root. ✓
{
"verdict": "approve",
"summary": "Documentation-only PR clarifying session-close Phase 5 behavior: candidates now come from the conversation's own background-process tracking, not a machine-wide process scan. CHANGELOG entry uses correct `fix:` prefix. No violations of applicable judgment rules.",
"comments": [],
"concerns_addressed": []
}
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.
/vault-cli:session-closePhase 5 scanned the machine-wide process table (ps aux | grep -E '(dark-factory|daemon|watch)') and flagged anything it found. In practice that surfaces sibling Claude sessions' daemons as "outstanding before close" — a false positive that makes the verdict untrustworthy and asks the user to clean up work that isn't this session's.Hit live this session: a
dark-factory daemonstarted by a different session (different shell snapshot) was reported as an open item on a session that never touched dark-factory.Changes
run_in_background: true,Monitorwatches armed this session — instead of a process-table scan. Empty list → phase skipped silently, nops auxat all.ps -p <pid>is used only to confirm liveness of PIDs already on the list. Explicit rule added: never flag a process this session didn't spawn; each session cleans up its own.Docs-only change to the command definition;
make precommitgreen.