Skip to content

porch: make gate artifact auto-open configurable#1231

Open
mohidmakhdoomi wants to merge 39 commits into
cluesmith:mainfrom
mohidmakhdoomi:builder/spir-1216
Open

porch: make gate artifact auto-open configurable#1231
mohidmakhdoomi wants to merge 39 commits into
cluesmith:mainfrom
mohidmakhdoomi:builder/spir-1216

Conversation

@mohidmakhdoomi

@mohidmakhdoomi mohidmakhdoomi commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds porch.autoOpenArtifacts as a backward-compatible, producer-side opt-out for Porch's automatic specification, plan, and review artifact opens. Setting it to false prevents Porch from invoking afx open while preserving gate state, artifact output, approval instructions, manual file opens, and Tower's normal tab-focus behavior.

Agent Farm also propagates the main workspace's personal .codev/config.local.json preference into builders as an atomically refreshed regular-file snapshot, avoiding write-through mutation of the main personal configuration.

Closes #1216

Changes

  • Add the optional porch.autoOpenArtifacts configuration key; unset and true preserve existing behavior, while explicit false suppresses the automatic afx open child process.
  • Cover specification, plan, review, missing-artifact, and unmapped-artifact gate paths while verifying that pending gate state and approval output remain unchanged.
  • Snapshot .codev/config.local.json into builder worktrees during both spawn paths and afx setup, refreshing it before post-spawn hooks without using a symlink or deleting builder-local preferences when the main source is absent.
  • Add config-precedence, gate-boundary, spawn/setup-ordering, filesystem, refresh, idempotency, and source-immutability regression tests.
  • Isolate tower-utils.test.ts’s HOME so developer-global architect-harness configuration cannot affect Agent Farm/Tower default-harness assertions.
  • Document the setting, precedence, manual-open behavior, and builder snapshot ownership model in both project and shipped skeleton references.

Testing

  • Focused config, gate, spawn, setup, and snapshot suites: 140 passed.
  • Full @cluesmith/codev Vitest suite: 3,638 passed, 48 existing skips, 0 failed.
  • Root pnpm build: passed.
  • Porch build and test checks: passed.
  • Headless Tower flow: a disabled gate created 0 file tabs and left the existing Work tab active; manual afx open still created and focused the expected file tab.

Spec

Link: codev/specs/1216-configurable-porch-gate-artifact-auto-open.md

Review

Link: codev/reviews/1216-configurable-porch-gate-artifact-auto-open.md

@mohidmakhdoomi

Copy link
Copy Markdown
Contributor Author

Architect Integration Review

Risk: High — 1,654 additions across 21 files, touching Porch orchestration and Agent Farm worktree setup.

Three-way integration review (Gemini, Codex, Claude) returned unanimous APPROVE with high confidence and no key issues.

I independently reviewed the producer guard, config precedence, snapshot/setup paths, tests, documentation, and governance updates. The design fits the architecture: porch.autoOpenArtifacts is enforced at the sole producer, defaults remain backward-compatible, and personal config reaches builders as a managed regular-file snapshot rather than a write-through symlink.

Local verification passed:

  • 190 focused tests across config, Porch gate behavior, spawn/setup, snapshot, and test isolation
  • repository build
  • recorded headless Tower UX flow confirms disabled gates create no tab/focus change while manual afx open remains unchanged

Before the Porch PR gate is approved, please include the remaining untracked project protocol artifacts under codev/projects/1216-* and push the resulting commits to the fork. Do not include builder harness files.

No implementation changes requested.


Architect integration review

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.

porch: config toggle to disable auto-opening spec/plan/review artifacts in the Tower dashboard

1 participant