triage preflight query never excludes deferred issues — #423 resurfaces as untriaged every run #465

Closed
opened 2026-08-12 03:35:39 +00:00 by ben · 2 comments
Owner

This was generated by AI during triage.

Discovered while running /triage headless: .sandcastle/preflight-triage.sh queries open issues and treats any issue as "untriaged" (needing a fresh /triage pass) unless it carries one of a hardcoded set of terminal labels. deferred is missing from that set, even though docs/agents/triage-labels.md explicitly documents it as a terminal, automation-skipped state:

Triage automation skips deferred issues exactly as it skips no-triage; agents must not pick them up.

no-triage and the wayfinder: prefix ARE excluded; deferred is not. First instance: #423, which was ruled deferred (with revisit criteria) by Ben on 2026-08-10 and correctly carries the deferred label — but every subsequent triage run (the :05/:35 cron, or any issue-opened trigger) still lists #423 as untriaged, and .sandcastle/run-triage.sh spends a full claude -p /triage invocation re-discovering that it's already resolved. This will repeat for every future deferred issue.

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 any wayfinder:* label. A deferred issue 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.md exactly: a deferred-labeled issue is excluded from the "needs triage" result, the same way no-triage is. Nothing else about the query's shape changes.

Key interfaces

  • The untriaged-query exclusion set (currently a jq any(...) label-name check) needs a deferred branch alongside the existing no-triage one.

Acceptance criteria

  • Running the untriaged-issue preflight query against an open issue labeled only deferred (+ a category label) returns it as already-triaged, not untriaged.
  • The existing exclusions (ready-for-agent, ready-for-human, needs-design, needs-info, wontfix, no-triage, agent-blocked, wayfinder:*) are unchanged.
  • Running the query against the live tracker no longer lists #423.

Out of scope

  • Any other triage-label handling (e.g. priority, model-<name> additive labels) — unaffected by this gap.
  • Re-litigating the #423 ruling itself.
> *This was generated by AI during triage.* Discovered while running `/triage` headless: `.sandcastle/preflight-triage.sh` queries open issues and treats any issue as "untriaged" (needing a fresh `/triage` pass) unless it carries one of a hardcoded set of terminal labels. `deferred` is missing from that set, even though `docs/agents/triage-labels.md` explicitly documents it as a terminal, automation-skipped state: > Triage automation skips `deferred` issues exactly as it skips `no-triage`; agents must not pick them up. `no-triage` and the `wayfinder:` prefix ARE excluded; `deferred` is not. First instance: #423, which was ruled `deferred` (with revisit criteria) by Ben on 2026-08-10 and correctly carries the `deferred` label — but every subsequent triage run (the `:05/:35` cron, or any issue-opened trigger) still lists #423 as untriaged, and `.sandcastle/run-triage.sh` spends a full `claude -p /triage` invocation re-discovering that it's already resolved. This will repeat for every future `deferred` issue. ## 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 any `wayfinder:*` label. A `deferred` issue 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.md` exactly: a `deferred`-labeled issue is excluded from the "needs triage" result, the same way `no-triage` is. Nothing else about the query's shape changes. ## Key interfaces - The untriaged-query exclusion set (currently a `jq` `any(...)` label-name check) needs a `deferred` branch alongside the existing `no-triage` one. ## Acceptance criteria - [ ] Running the untriaged-issue preflight query against an open issue labeled only `deferred` (+ a category label) returns it as already-triaged, not untriaged. - [ ] The existing exclusions (`ready-for-agent`, `ready-for-human`, `needs-design`, `needs-info`, `wontfix`, `no-triage`, `agent-blocked`, `wayfinder:*`) are unchanged. - [ ] Running the query against the live tracker no longer lists #423. ## Out of scope - Any other triage-label handling (e.g. `priority`, `model-<name>` additive labels) — unaffected by this gap. - Re-litigating the #423 ruling itself.
Author
Owner

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's jq any(...) exclusion set needs a deferred branch alongside the existing no-triage one. 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.md only documents the intent).

Per CLAUDE.md rule 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 labelled ready-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 a deferred branch to the exclusion any(...) — e.g.

              . == "wontfix"         or . == "no-triage"       or
              . == "deferred"        or
              . == "agent-blocked"   or

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-human and releasing the claim (run 4941).

**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's `jq any(...)` exclusion set needs a `deferred` branch alongside the existing `no-triage` one. 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.md` only documents the intent). Per `CLAUDE.md` rule 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 labelled `ready-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 a `deferred` branch to the exclusion `any(...)` — e.g. ``` . == "wontfix" or . == "no-triage" or . == "deferred" or . == "agent-blocked" or ``` 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-human` and releasing the claim (run 4941).
Author
Owner

Already fixed on main: 73a5216 added . == "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.sh returns [] — #423 no longer surfaces as untriaged. All three acceptance criteria met; closing.

Already fixed on main: `73a5216` added `. == "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.sh` returns `[]` — #423 no longer surfaces as untriaged. All three acceptance criteria met; closing.
ben closed this issue 2026-08-13 03:42:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#465
No description provided.