Skip to content

An Architect idea pauses Architect runs until it is triaged - #330

Merged
JacobStephens2 merged 3 commits into
issue-311from
issue-326
Oct 3, 2026
Merged

JacobStephens2 merged 3 commits into
issue-311from
issue-326

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

An Architecture review with no Strong candidate now labels the issue it ends on an Architect idea, and that idea pauses later Architect runs until the Day shift triages it.

 architect::run
   launch::start                      # lock → Skipped::AlreadyRunning
   open issues labelled architect-plan  → Skipped::OpenPlans
+  open issues labelled architect-idea
+    and needs-triage (any case)      → Skipped::IdeasWaiting  (URLs on stdout, reason on stderr, exit 0)
   review
     conclude
       Plan         → mark_plan_ready
-      Idea         → (no label)
-      AlreadyFiled → (no label)
+      Idea         → label_idea
+      AlreadyFiled → label_idea
+        ensure architect-idea exists
+        PUT labels: kept + needs-triage + architect-idea   (one request)
+        failure → failed review: "could not label the Architect idea #<n>: <why>"

The skip reason on stderr is Architect idea #<n> "<title>" is waiting for triage: <url>. A triage decision releases the pause: taking needs-triage off (whatever replaces it) or closing the issue. README (steps, No Strong candidate, the new "An Architect idea waits for triage" section, One Architect plan at a time) and the --help text describe the label and the pause.

Evidence

New and flipped end-to-end tests in tests/architect_run.rs, run against the real binary with the fake gh/claude:

  • Before: a_review_that_files_an_idea_prints_its_url_and_changes_no_label asserted the idea stays ["needs-triage"], and a_review_whose_idea_is_already_filed_… asserted that GitHub was left unchanged.
    After:
    idea filed                       → #8 labels == [needs-triage, architect-idea]
    already filed, triaged #7        → [ready-for-human, architecture] becomes [ready-for-human, architecture, needs-triage, architect-idea]
    architect-idea missing in repo   → created once; kept as-is when present as Architect-Idea
    label list / PUT fails           → exit 1, "could not label the Architect idea #7: …", one notification "review failed" with the cause
    open idea + needs-triage         → exit 0, idea URL on stdout, reason on stderr, no claude session, GitHub untouched
    Needs-Triage + Architect-Idea    → skips too
    triaged (any label) or closed    → runs the review
    open plan + waiting idea         → skip reports the plan
    idea filed → next run skipped → triaged → next run reviews
    
  • Full cargo test: every suite passes. cargo clippy --all-targets: clean.

Merge Danger

Door: two-way

Reverting this change stops the labelling and the skip. Any architect-idea labels already put on issues stay behind, but they are harmless.

Blast Radius: Architect runs

Once an Architect run has filed an idea, no later Architect run on that repository does anything until someone triages the idea. That is the intent, but an operator who never triages will see every Architect run skipped (exit 0, reason in the log). An "idea already filed" review now puts needs-triage back on an issue that was already triaged. Pickup runs and Runs are unchanged.

Unaddressed findings

Standards

  • Duplicated Code / Divergent Change: run() holds a growing cascade of skip checks (lock, plan, idea). The reviewer suggested a skip_reason(). Not done. The order is easy to read in run() as it stands. The sibling slice of Weeding: Architect runs that follow each other as soon as the last plan is merged #311 that adds the Ready-issue skip is the right place to gather the checks, once all four are known.
  • Primitive Obsession / Data Clumps: (IssueUrl, String) tuples in Skipped. Not done. The pattern predates this change (OpenPlans), and the new variant follows it. Changing it is a separate refactor.
  • Duplicated Code (minor): label_idea and mark_plan_ready share an interrupt → progress → ensure → set_labels shape. Not done. The checks and error context differ, and the reviewer called the extraction optional.

Spec

  • "The idea half of the test … is rewritten to the new rule": it was removed rather than rewritten in place. The renamed a_plan_left_needing_triage_does_not_skip_the_architect_run keeps the plan half. The idea half's new rule has dedicated tests: an idea waiting for triage skips, and one triaged or closed does not.

Closes #326

🤖 Generated with Claude Code

@JacobStephens2
JacobStephens2 merged commit 7a664c8 into issue-311 Oct 3, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-326 branch October 3, 2026 07:33
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