Skip to content

Architect waits forever on an idea labelled both needs-triage and ready-for-human #2335

Done

Description

@JacobStephens2

An Architect idea that carries both needs-triage and a triage outcome label stops Architect runs on its repository for good, because Architect waits for it and Triage refuses it. The daily plan-only Architect on this repository skipped on 2026-11-18, 11-20 and 11-25 with "Architect idea #2082 ... is waiting for triage", while the Triage Pass every 10 minutes logged "no eligible needs-triage issue ... it can reserve".

Evidence

  • Deepen Run metrics Session evidence attribution #2082 was triaged to ready-for-human at 2026-11-12 04:41 UTC. needs-triage was added back at 2026-11-13 05:24 UTC without removing ready-for-human.
  • Architect skips: 2026-11-18 17:20 and 20:20, 2026-11-20 09:20 (on thirdshift.app), 2026-11-25 09:20 (on stephens.page). Other days skipped for the Command limit or the Quota wait.
  • I removed ready-for-human on 2026-11-25 so the next Triage Pass can take it.

Root cause

  • src/architect.rs:390 counts an idea as waiting when it has needs-triage, whatever else it carries.
  • src/triage/pass.rs:153 (ineligible) excludes a needs-triage issue that also carries ready-for-agent, ready-for-human, needs-info, wontfix, in-progress or agent-failed.

The two disagree about what "untriaged" means, so neither side moves.

Proposed fix

  1. Share one predicate for "waiting for triage" between Architect and the Triage Pass, so an idea Architect waits on is always one Triage can take (or one that is Claimed or in-progress, which settles by itself).
  2. When Architect sees an idea with needs-triage and an outcome label, skip it from the wait and log the conflicting labels in the Activity log, rather than blocking.
  3. Test it in the Architect tests beside the existing "is waiting for triage" case (src/architect.rs:691): an idea labelled needs-triage and ready-for-human does not block an Architect run.

Activity

  1. added
    needs-triage
    in-progress
    and removed
    needs-triage
    in-progress
    on Nov 25, 2026
  2. JacobStephens2 commented on Nov 26, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Fix the permanent deadlock where an Architect idea labelled both needs-triage and a triage outcome blocks every Architect run while the Triage Pass refuses it. The reported instance (#2082) was cleared by hand; this is the code fix so it cannot recur.

    Confirmed root cause on the Base branch (main at 0d205f0, HEAD equals origin/main):

    • src/architect.rs:387-394 gates(): waiting ideas are open architect-idea issues filtered only by labels.has(NEEDS_TRIAGE), whatever else they carry.
    • src/triage/pass.rs:150-168 ineligible(): a needs-triage issue also carrying ready-for-agent, ready-for-human, needs-info, wontfix, in-progress or agent-failed is passed over as is labelled {label}; the Pass then ends no eligible needs-triage issue ... it can reserve (src/triage/pass.rs:141-147). So neither side ever moves.
    • No existing test covers both labels together: a_waiting_idea_skips... in src/architect.rs tests (near line 679) covers needs-triage alone, and an_idea_no_longer_labelled_needs_triage_does_not_skip covers an outcome label alone.
    • The factory itself can create the conflict, not only manual labelling: label_idea in src/architect.rs (near line 533) puts needs-triage back on while keeping other labels, as GLOSSARY.md Architect idea and docs/guide.md No Strong candidate describe.
    • Observed 2026-11-26 via gh issue view 2082 --json labels (labels only, no comments): enhancement, ready-for-human, architect-idea, no needs-triage. Inferred: the reporter's manual removal let it be triaged, so the instance is cleared and only the code bug remains.

    Required change (decisions pinned, following the issue's proposed fix):

    1. Share one label-disqualifier list/predicate between Architect and the Triage Pass so the two cannot drift again: ready-for-agent, ready-for-human, needs-info, wontfix, in-progress, agent-failed (case-insensitive via Labels::has in src/labels.rs). Architect waiting means: open architect-idea plus needs-triage plus none of those six. Pin in-progress as a disqualifier too (exact sharing): a live Triage Claim already takes needs-triage off, so nothing is lost, and a stale in-progress must not reintroduce the same permanent deadlock. Placement must respect layering: IN_PROGRESS/AGENT_FAILED live in src/claim.rs:37,44, claim imports labels, and src/labels.rs:1-5 keeps concept labels with their owner, so put the shared predicate where that holds (for example claim.rs or a Labels query over shared constants) instead of duplicating literal lists. The shared part is labels only: Architect has only ListedIssue labels and must not replicate the Triage Pass's history/trust checks (candidate.claimed, sub-issues, trust, skip-authors in ineligible()), which stay unchanged.
    2. Refactor ineligible() in src/triage/pass.rs to use the shared list. Triage Pass selection behavior must not change: it still passes over every conflicted issue.
    3. Conflicted ideas must not block and must be visible, without editing any labels (the Architect gate stays read-only): when gates() excludes an idea only because of a disqualifier, emit one line per idea naming the issue and the conflicting label(s) on the progress output and in the Activity log. Go through the Outside seam in src/pass.rs (extend the trait and the InMemory Call recording, following the step/skipped pattern) rather than calling logs:: directly from gates(), so unit tests can assert it. Avoid unbounded Activity log spam on every few-minute Architect run where feasible, following the dedup approach of logs::skipped in src/logs.rs. With a mix of clean waiting and conflicted ideas, skip naming only the clean waiting ideas (same stdout/stderr format as today) and log the conflicted ones.
    4. Tests: in src/architect.rs tests beside the existing waiting-idea case, for each disqualifier (including the reported needs-triage plus ready-for-human, with a case-variant at least once) an architect-idea carrying it with needs-triage does not block (decision proceeds to the Ready search) and the conflict line is recorded; a mixed clean-plus-conflicted case skips naming only the clean idea. Add unit tests for the shared predicate where it lands, and keep the existing waiting/outcome-alone tests passing. Verify with cargo test --bin thirdshift architect::tests and finish with scripts/affected-tests main per AGENTS.md/docs/testing.md.
    5. Docs in the same PR: update GLOSSARY.md Architect idea (and Architect run if wording requires) and docs/guide.md section An Architect idea waits for triage (plus the No Strong candidate labelling paragraph if its re-triage implication now misleads), regenerate with npm run docs --prefix site and verify npm run docs:check --prefix site. Re-check hand-written site/index.html, site/how-it-works/ and site/architecture/; triage found only general Architect idea mentions there, so change them only if wording contradicts the new rule. No prompt text change is expected, so no prompts_page regeneration unless src/prompt.rs is touched.

    Out of scope: do not strip outcome labels in label_idea, do not make the Triage Pass take conflicted issues (it deliberately passes over contradictory triage states), and do not auto-edit labels from the Architect gate; the logged conflict is the Day shift signal to remove one label.

    Acceptance: a repository whose only Architect idea carries needs-triage plus ready-for-human no longer skips Architect runs for waiting triage (it proceeds to the Ready-issue gate/review) and the conflict is logged; a clean needs-triage Architect idea still skips with the existing waiting-for-triage output; Triage Pass selection is unchanged.

  3. added
    bug
    ready-for-agent
    in-progress
    and removed
    in-progress
    ready-for-agent
    on Nov 26, 2026
  4. added
    agent-failed
    and removed
    in-progress
    on Nov 27, 2026
  5. JacobStephens2 commented on Nov 27, 2026

    @JacobStephens2
    OwnerAuthor

    This comment was generated by AI.

    thirdshift's Run on this issue failed, so it waits for the Day shift.

    Put ready-for-agent back to retry.

  6. removed
    agent-failed
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions