sandcastle: preflight-triage.sh doesn't exclude ready-for-session — every triage run re-surfaces already-triaged session tickets #555
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#555
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What breaks
preflight-triage.sh's exclusion list (the zero-token gaterun-triage.shuses to decide whether there's any work for/triage) checks an issue's labels against:ready-for-agent,ready-for-human,needs-design,needs-info,wontfix,no-triage,agent-blocked,deferred, andwayfinder:*. It does not excludeready-for-session(minted by ADR 0174, accepted 2026-08-14).Every issue a human or session relabels
ready-for-sessionunder ADR 0174 therefore keeps showing up inpreflight-triage.sh's "still untriaged" list forever — even though it already carries a valid, reasoned state label. Observed live in this 2026-08-15 triage run: 11 of 14 issues surfaced as "untriaged" already carriedready-for-sessionwith a full ruling recorded in comments (e.g. #543, #541, #540, #537, #531, #525, #506, #474, #467, #425, #319) — every one needed re-reading and re-verifying for no label change at the end, andrun-triage.sh's before/afterhuman_gated()diff (which itself correctly greps forready-for-human/needs-designonly) never even looks at these, so the wasted work produces no compensating signal either.Cause
preflight-triage.sh's label-exclusionjqfilter was written beforeready-for-sessionexisted and was never updated when ADR 0174 introduced it.Fix
Add
ready-for-sessionto theany(...)exclusion list inpreflight-triage.sh(the same list that already excludesready-for-human/needs-design/etc.), matching that role's status perdocs/agents/triage-labels.mdas a legitimate terminal-ish triage state (swept and reclassified separately, per ADR 0174 rule 5 — not something/triage's own state machine should keep re-visiting on every run).Proof
After the fix,
preflight-triage.shon this repo's current issue set returns only genuinely unlabeled/needs-triageissues — none of the 11ready-for-sessionissues named above appear in its output.Found during the 2026-08-15 headless
/triageCI run while triaging #553/#551/#550.Redundancy check: searched
.sandcastle/preflight-triage.shanddocs/agents/triage-labels.mdfor any existingready-for-sessionexclusion — none found; confirmed live by running the script this session (it returned 11 issues that already carriedready-for-session).Agent Brief
Category: bug
Summary:
preflight-triage.sh's label-exclusion filter is missingready-for-session, so already-triaged session tickets are re-surfaced as "untriaged" on every/triagerun.Current behavior:
preflight-triage.shlists open issues whose labels contain none of a fixed set of "already triaged" outcome labels. That set omitsready-for-session. Any issue relabelledready-for-session(the ADR 0174 state for work needing an interactive session's standing, not Ben) keeps appearing in the script's output indefinitely.Desired behavior:
preflight-triage.shtreatsready-for-sessionthe same as the other outcome labels already in its exclusion set — an issue carrying it is not "still untriaged" and is left out of the script's output.Key interfaces:
preflight-triage.sh'sjqfilter — gainsready-for-sessionalongside the existing entries.Acceptance criteria:
preflight-triage.shno longer lists an open issue whose only relevant label isready-for-session.needs-triage) still appear, unchanged.ready-for-agent,ready-for-human,needs-design,needs-info,wontfix,no-triage,agent-blocked,deferred,wayfinder:*) are unaffected.Out of scope:
run-triage.sh's separatehuman_gated()before/after diff (used for the Mattermost digest) — that already greps onlyready-for-human/needs-designand needs no change.ready-for-sessionissues get swept and reclassified — that's ADR 0174's separate concern, not this script.Why session, not agent: the target file lives under
.sandcastle/, a protected path (#445) — a swarm worker's edit would be rolled back.Reproduced live, this run (2026-08-15 headless
/triage, CI mode).preflight-triage.shsurfaced 9 "untriaged" issues: #555 itself, #543, #541, #537, #531, #525, #506, #474, #467. Checked each — every one of the other 8 already carries exactly one category label (bug/enhancement) andready-for-sessionwith a full ruling recorded in comments (several already carry a prior triage pass's "added the missing category label; state left as-is" note). None needed a label change.Per this ticket's own diagnosis, re-touching them would only reproduce the wasted-work pattern — so this run applied no label changes to any of the 8, and is leaving #555 itself as-is too (already
bug+ready-for-session, agent brief already posted). Recording this as the compensating signal the issue named as currently missing.No new action needed here beyond what's already on the ticket — surfacing this as confirmation the bug is still live and the fix (
ready-for-sessionadded topreflight-triage.sh's exclusion list) is still outstanding, for whichever session picks up the protected-path edit.Bumping to
priority. This is now the third distinct headless/triagerun to document hitting this exact bug live: 01:02 UTC (agent brief posted), 04:13 UTC (reproduced, explicitly declined to re-touch the 8 affected issues to avoid the wasted-work loop this ticket describes), and now 06:56 UTC (same 8 issues re-surfaced again, same no-op outcome). The:05,:35 * * * *cron means this has likely repeated many more times in between without anyone commenting. Each cycle spends a fullclaude -pinvocation re-reading and re-verifying 8 already-triaged issues for zero label change — real token/CI cost, recurring every ~30 minutes, for a fix this ticket already scoped as a one-linejqfilter addition.Per this run's own diagnosis (matching the 04:13 run): no label changes applied to #555 itself beyond this bump, and no re-touching of #543/#541/#537/#531/#525/#506/#474 — they're already correctly
bug|enhancement+ready-for-session, and re-confirming them again would only add to the noise this ticket is about.State unchanged (
ready-for-session— still correctly blocked on a session touching the protected.sandcastle/path).Ruled by agent under ADR 0174 — veto anytime.
Ruling: two-way door. This is a one-line
jqfilter change in.sandcastle/preflight-triage.sh(a repo-tracked script, no host/live-infratouch), revertible with a commit, and provable by an offline test with no
network dependency. No credentials, security-posture widening, or
member-facing trust surface is involved — none of the ADR 0174 one-way-door
categories apply.
What landed (
9dd57a0fc8ca465baa579823bd67a6a67413006e, pushed tomain):.sandcastle/preflight-triage.sh: added. == "ready-for-session"to theany(...)exclusion filter (alongsideready-for-agent,ready-for-human,needs-design,needs-info,wontfix,no-triage,agent-blocked,deferred,wayfinder:*), matching its role indocs/agents/triage-labels.mdas a state already ruled under ADR 0174 andswept/reclassified separately — not something
/triage's preflight gateshould keep resurfacing.
.sandcastle/tests/preflight-triage-test.sh: new offline scenario — a fixed5-issue batch carrying
ready-for-session,ready-for-human,wayfinder:map,deferred, and one genuinely unlabeled issue. ConfirmedRED against the pre-fix script (
ready-for-sessionwrongly surfacedalongside the unlabeled issue), then GREEN after the fix (only the unlabeled
issue surfaces).
STATUS.md: header + milestone-log entry.Proof:
Confirmed
run-triage.sh's ownhuman_gated()before/after diff (which theticket correctly notes only greps
ready-for-human/needs-design) needed nochange — it was never part of the bug.
Commit:
9dd57a0— sandcastle: #555 preflight-triage.sh's exclusion list now excludes ready-for-session