Skip to content

feat(reaper): shadow would-close and blocked:#N verdicts, oracle claims for worktree-less sessions, and listed skips (refs theQuert/stima-api#6477) - #110

Merged
theQuert merged 4 commits into
mainfrom
feat/6477-reaper-blocked-would-close
Oct 28, 2026
Merged

theQuert merged 4 commits into
mainfrom
feat/6477-reaper-blocked-would-close

Conversation

@theQuert

Copy link
Copy Markdown
Owner

Packet 3 of theQuert/stima-api#6477 (dispatches EL-T336U / EL-T337U / EL-PATROL10: sessions falsely IDLE, falsely waiting on Leo, or DONE but never closed). Shadow only: nothing new is closed.

Survey on 2026-10-28 09:45 TPE: sec-p1 and openlux-supply had said "no open scope / the reaper can close this session" and were kept 8-10 h as waiting, claim-unknown; auth-audit was missing from the report; no row said which issue blocks a session.

  • Claims from the oracle. A session with no worktree gets claims from the issues it names whose delivery-oracle brief names this session as claimant (oracle_claims, through the existing oracle_brief/classify_claim). They feed only the shadow verdict, so decide() and cc-selfpush are unchanged.
  • would-close (report only). A kept session whose only keep reasons are soft (claim-unknown, a keyword waiting), idle past the threshold, with no dirty or unpushed work, no background child or subagent, no question, no BLOCKED: text, not PROTECT and not NEVER_CLOSE (uiux* homepage*), gets would-close when it has no claim and a close line, or when every claim is ended. reap() still runs only with no keep reason, so APPLY never acts on it (tested with --apply).
  • Keyword waiting. The WAITING_RE match keeps the name waiting only with no claims or a claim at an oracle stop; otherwise it is waiting-keyword, still a keep reason (cc-selfpush's startswith("waiting") treats it the same).
  • blocked: #N on each kept row, from BLOCKED:#N in the last text or in a claim's brief.
  • Skipped live sessions are listed with the reason (kind:*, no-tmux-field, procstart-mismatch, pane-missing, pane-ancestor-mismatch) instead of a silent continue.

Tests: python3 tests/session-reaper.py: 108 OK (20 new). 15 mutants killed (keyword split, person step, soft-keep gate, BLOCKED from text and brief, dirty cwd, oracle claims off, skips, any vs all ended, close line, uiux exclusion, background child, APPLY acting on would-close).

Promotion of would-close to a close verdict comes in a later revision after SCRIPT-SAFE spot-check rounds on stima-api#6477.

… a would-close candidate

Review of #110: a lowercase Done or a conditional phrase counted as a close line,
and oracle_claims ran for every idle kept session before the cheap gates.
@theQuert
theQuert merged commit 77e8b44 into main Oct 28, 2026
2 checks passed
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