Reviews only in interactive sessions (forge config "reviews") #52

Closed
opened 2026-11-20 15:16:45 +01:00 by dario · 0 comments
Owner

Part of #23. After #48 is merged; independent of #49 to #51.

Goal

With the forge config option "reviews": "interactive" (default "all"), the factory never posts a review in a headless run. In interactive sessions the agent proposes each comment and posts only those the person approves. Works for every forge.

Required facts

  • forge.Policy (internal/forge/policy.go:17) does not know whether a run is interactive.
  • The dispatcher builds its policy in internal/dispatch/dispatch.go:272; factory mcp builds its own from FACTORY_* variables in internal/ops/env.go:87.

Changes

  • forge.Policy gets the review setting and whether the run is interactive; the guarded PostReview refuses with a PolicyError in headless runs when the setting is "interactive".
  • The config option in the forge config; the dispatcher passes the setting and the interactive flag into its policy and to factory mcp (a new FACTORY_* variable).
  • skills/review-pr/SKILL.md: in an interactive session with this setting, propose each comment and post only the approved ones. The pull request needs an Evidence section (AGENTS.md): #23, comment 275, answer 3.

Tests

  • Policy: headless refused, interactive allowed, "all" unchanged.
  • Dispatcher: the flag reaches the policy and the MCP environment.

Docs (same pull request)

  • README (config option), ADR from #<1> referenced.

Done criteria

  • just check passes.
Part of #23. After #48 is merged; independent of #49 to #51. ## Goal With the forge config option `"reviews": "interactive"` (default `"all"`), the factory never posts a review in a headless run. In interactive sessions the agent proposes each comment and posts only those the person approves. Works for every forge. ## Required facts - `forge.Policy` (internal/forge/policy.go:17) does not know whether a run is interactive. - The dispatcher builds its policy in internal/dispatch/dispatch.go:272; `factory mcp` builds its own from `FACTORY_*` variables in internal/ops/env.go:87. ## Changes - `forge.Policy` gets the review setting and whether the run is interactive; the guarded `PostReview` refuses with a `PolicyError` in headless runs when the setting is `"interactive"`. - The config option in the forge config; the dispatcher passes the setting and the interactive flag into its policy and to `factory mcp` (a new `FACTORY_*` variable). - `skills/review-pr/SKILL.md`: in an interactive session with this setting, propose each comment and post only the approved ones. The pull request needs an Evidence section (AGENTS.md): #23, comment 275, answer 3. ## Tests - Policy: headless refused, interactive allowed, `"all"` unchanged. - Dispatcher: the flag reaches the policy and the MCP environment. ## Docs (same pull request) - README (config option), ADR from #<1> referenced. ## Done criteria - `just check` passes.
dario closed this issue 2026-11-23 13:11:38 +01:00
Sign in to join this conversation.
No labels
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
dario/factory#52
No description provided.