triage preflight query never excludes deferred issues — #423 resurfaces as untriaged every run #465
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#465
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?
Discovered while running
/triageheadless:.sandcastle/preflight-triage.shqueries open issues and treats any issue as "untriaged" (needing a fresh/triagepass) unless it carries one of a hardcoded set of terminal labels.deferredis missing from that set, even thoughdocs/agents/triage-labels.mdexplicitly documents it as a terminal, automation-skipped state:no-triageand thewayfinder:prefix ARE excluded;deferredis not. First instance: #423, which was ruleddeferred(with revisit criteria) by Ben on 2026-08-10 and correctly carries thedeferredlabel — but every subsequent triage run (the:05/:35cron, or any issue-opened trigger) still lists #423 as untriaged, and.sandcastle/run-triage.shspends a fullclaude -p /triageinvocation re-discovering that it's already resolved. This will repeat for every futuredeferredissue.Current behavior
The untriaged-issue query excludes issues labeled
ready-for-agent,ready-for-human,needs-design,needs-info,wontfix,no-triage,agent-blocked, or anywayfinder:*label. Adeferredissue passes none of those checks, so it is reported as needing triage on every run, indefinitely — even though it already carries a valid terminal label with recorded revisit criteria.Desired behavior
The untriaged-issue query's exclusion set matches
docs/agents/triage-labels.mdexactly: adeferred-labeled issue is excluded from the "needs triage" result, the same wayno-triageis. Nothing else about the query's shape changes.Key interfaces
jqany(...)label-name check) needs adeferredbranch alongside the existingno-triageone.Acceptance criteria
deferred(+ a category label) returns it as already-triaged, not untriaged.ready-for-agent,ready-for-human,needs-design,needs-info,wontfix,no-triage,agent-blocked,wayfinder:*) are unchanged.Out of scope
priority,model-<name>additive labels) — unaffected by this gap.Blocked — this is a protected-path (machinery) change an agent cannot make.
The entire fix lives in
.sandcastle/preflight-triage.sh: the untriaged-issue query'sjq any(...)exclusion set needs adeferredbranch alongside the existingno-triageone. There is no non-protected surface to this ticket — the exclusion set exists nowhere else in the repo (confirmed by grep;docs/agents/triage-labels.mdonly documents the intent).Per
CLAUDE.mdrule 9, agents must never edit.sandcastle/— the before/after tree-fingerprint would roll the change back and fail the run, and a human rules on machinery changes before any agent touches them. This issue was labelledready-for-agent, but as a Sandcastle-machinery change it belongs on the human lane.What a human must do to close this: apply the one-line change in
.sandcastle/preflight-triage.sh, adding adeferredbranch to the exclusionany(...)— e.g.That satisfies all three acceptance criteria: a
deferred-only issue is then reported as already-triaged, the other exclusions are untouched, and #423 stops resurfacing. (Optionally also refresh the header comment, which lists the excluded states in prose.)Swapping
ready-for-agent→ready-for-humanand releasing the claim (run 4941).Already fixed on main:
73a5216added. == "deferred"to the exclusion set (header comment documents it; docs/agents/triage-labels.md now matched exactly). Verified live 2026-08-13 during Ben's backlog walk:preflight-triage.shreturns[]— #423 no longer surfaces as untriaged. All three acceptance criteria met; closing.