From 6c9ebd8684433c52f03830630bcb18c55a89bb99 Mon Sep 17 00:00:00 2001 From: Shuhao Date: Sat, 14 Nov 2026 20:45:48 -0500 Subject: [PATCH] ci(factory): let cloud stations run node/npm on the bot's own factory PRs claude-code-action 3fd0895 (2026-11-12, anthropics/claude-code-action#2001) denies code-running commands on PRs whose author lacks write access, and counts bots as untrusted. Factory PRs are opened by the Claude bot, so the #80 build (run 43660639722) had node, npm and vitest denied and stopped before doing anything. Set restrict_untrusted_prs: "false" on the plan and build stations. Their trust check is the gate: state.mjs only lets a station run after a factory actor opened the human gate, and fork PRs get no secrets. Both files stay identical on dev and master. --- .github/workflows/factory-build.yml | 5 +++++ .github/workflows/factory-plan.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/factory-build.yml b/.github/workflows/factory-build.yml index 55bb39b..774e6ab 100644 --- a/.github/workflows/factory-build.yml +++ b/.github/workflows/factory-build.yml @@ -71,6 +71,11 @@ jobs: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: /factory-build ${{ steps.gate.outputs.issue }} claude_args: --model claude-opus-5-5 --effort high --max-turns 200 --allowedTools Bash,Read,Edit,Write,MultiEdit,Glob,Grep,Task,Skill + # Factory PRs are opened by the Claude bot, which the action counts as untrusted since + # 2026-11-12 (restrict_untrusted_prs, on by default) and so denies node/npm/vitest. + # The trust check is this workflow's gate: state.mjs only lets a station run after a + # factory actor opened the human gate (.factory/README.md), and fork PRs get no secrets. + restrict_untrusted_prs: "false" - name: Check the station ran if: steps.gate.outputs.issue env: diff --git a/.github/workflows/factory-plan.yml b/.github/workflows/factory-plan.yml index d1dd688..8895380 100644 --- a/.github/workflows/factory-plan.yml +++ b/.github/workflows/factory-plan.yml @@ -71,6 +71,11 @@ jobs: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: /factory-plan ${{ steps.pick.outputs.issue }} claude_args: --model claude-opus-5-5 --effort high --max-turns 80 --allowedTools Bash,Read,Edit,Write,MultiEdit,Glob,Grep,Task,Skill + # Factory PRs are opened by the Claude bot, which the action counts as untrusted since + # 2026-11-12 (restrict_untrusted_prs, on by default) and so denies node/npm/vitest. + # The trust check is this workflow's gate: state.mjs only lets a station run after a + # factory actor opened the human gate (.factory/README.md), and fork PRs get no secrets. + restrict_untrusted_prs: "false" - name: Check the station ran if: steps.pick.outputs.issue env: