Discovery: move pr-review scratch state off the shared TaskContext #1780

Closed
opened 2026-11-02 14:32:58 +00:00 by sam · 1 comment
Owner

From the 2026-08 architecture review (recommendation: worth exploring).

What is wrong: in internal/domain/workflow, the pr-review pipeline's private state is a field (prReview) on TaskContext, the context every workflow step shares (30+ fields, 23 methods; pr-review stages alone are ~1.5k lines). The code comment admits the state has "no business being read or set outside its own stages", yet any step can read it — the seam leaks.

Wanted: prReviewState becomes private to a pr-review module behind a narrow interface reached through the seam from TaskContext.

Done when:

  • no field on TaskContext carries pipeline-private state; pr-review stages go through their module's interface
  • workflow tests pass unchanged; task check green
From the 2026-08 architecture review (recommendation: worth exploring). **What is wrong:** in `internal/domain/workflow`, the pr-review pipeline's private state is a field (`prReview`) on `TaskContext`, the context every workflow step shares (30+ fields, 23 methods; pr-review stages alone are ~1.5k lines). The code comment admits the state has "no business being read or set outside its own stages", yet any step can read it — the seam leaks. **Wanted:** `prReviewState` becomes private to a pr-review module behind a narrow interface reached through the seam from `TaskContext`. **Done when:** - no field on `TaskContext` carries pipeline-private state; pr-review stages go through their module's interface - workflow tests pass unchanged; `task check` green
sam added the discovery label 2026-11-02 14:53:55 +00:00
Author
Owner

Closed: goes against the product plan in epic #1977. Archie isn't a coding agent; coding is a side effect. PR review stops being a core product line, and the first story is proactive day-2 operations. Forge, repository and review behaviour moves behind a forge connector (#1657, #1978).

Closed: goes against the product plan in epic #1977. Archie isn't a coding agent; coding is a side effect. PR review stops being a core product line, and the first story is proactive day-2 operations. Forge, repository and review behaviour moves behind a forge connector (#1657, #1978).
sam closed this issue 2026-11-14 14:45:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1780