Skip to content

Test the Architect plan's checks and the Architect idea's labelling in-process behind the Pass seam - #387

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-386
Oct 5, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-386

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

The Architect run's conclusion now reaches GitHub through the Pass seam it already holds for its gates. A plan is viewed once, and its Edit is built from that view.

 trait pass::Outside
   open_issues / closed_issues / ready_issue / apply / step
+  issue(url)      # state, labels, createdAt (github::issue)
+  interrupted()   # interrupt::requested
 run
   gates(&mut on_github)
-  review(worktree, …)
-    conclude(final_message, origin, started, base)
+  review(&mut on_github, worktree, …)
+    conclude(outside, final_message, origin, started, base)
       mark_plan_ready
-        progress::step(published)
-        check_plan            # github::issue        (read 1)
-        interrupt::requested
-        progress::step(marking)
-        Edit::read(plan).apply()  # issue_labels  (read 2)
+        outside.step(published)
+        labels = check_plan   # outside.issue        (only read)
+        outside.interrupted()
+        outside.step(marking)
+        outside.apply(Edit::of(plan, labels, …))
       label_idea
-        Edit::read(idea).apply()
+        outside.interrupted(); outside.step(labelling)
+        outside.apply(Edit::of(idea, outside.issue(idea).labels, …))
  • Edit::read is deleted, so building an Edit no longer does I/O.
  • The Pickup run gets the two new operations through the shared adapter and doesn't use them.
  • The Architecture review's starting line still goes through progress::step.

Evidence

  • Before: the plan's checks and the idea labelling ran only end to end, against the fake gh (5 tests in tests/architect_run.rs).
    After: 13 new unit tests in src/architect.rs drive conclude with pass::InMemory and assert on the ending or cause and on the call record:
    plan ready           → [Step(published), View(8), Step(marking), Edit(-needs-triage, +ready-for-agent +architect-plan, others kept)]
    plan refused         → [Step(published), View(8)]  for closed / older / ready-for-human / needs-info / wontfix
    other repository     → [Step(published)]           no view
    interrupt (plan)     → [Step(published), View(8)]  no Edit
    interrupt (idea)     → []
    idea triaged         → needs-triage put back, Architect-Idea in another case not added twice
    idea view/Edit fails → "could not label the Architect idea #8: …"
    no final line        → []
    
  • The five end-to-end tests named in the issue are deleted. The other 79 Architect run tests pass unchanged.
  • cargo test (every suite), cargo clippy --all-targets and cargo fmt --check all pass.

Merge Danger

Door: two-way

This is an internal refactor. Users see the same progress lines, causes, labels, stdout, exit codes and Run notifications.

Blast Radius: Architect-runs

A plan now takes one fewer gh request. Its Edit is built from the labels viewed for the checks. A label someone adds between that view and the Edit is overwritten. Before, the Edit read the labels a second time, so it kept such a label.

Unaddressed findings

Standards

  • Divergent Change, the Pass seam now serves the gates and the conclusion: skipped. The issue chose this on purpose ("The same Pass seam, not a new one").
  • run still calls interrupt::requested() and review still calls progress::step directly: skipped. That check comes before the review and is outside the conclusion. The issue says the review's starting line stays where it is.
  • Data Clumps, origin, started and base passed together: skipped. This is a judgement call outside this issue's scope, and the parameters were there before.
  • Duplicated Call::Edit test helper in architect.rs and pickup.rs: skipped. It is a small test-only helper. A shared helper in pass::in_memory can come with a later seam change.
  • viewed(bool, i64, …) test helper parameters aren't self-describing: skipped. Its doc comment explains them, and the gates' InMemory::issue(n, open, labels) uses the same style.

Spec

  • a_plan_created_in_the_second_the_run_started_passes is beyond the listed cases: kept. It covers the spec's "created since the run started (to the second)".

Closes #386

🤖 Generated with Claude Code

JacobStephens2 and others added 2 commits October 4, 2026 21:18
…, tested in-process (#386)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit 99d7d85 into main Oct 5, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-386 branch October 5, 2026 01:34
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 5, 2026
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.

Test the Architect plan's checks and the Architect idea's labelling in-process behind the Pass seam

1 participant