fix: bug: architect FORGE_TOKEN override nullified when env.sh re-sources .env — agent actions authored as dev-bot (#762)
Use FORGE_TOKEN_OVERRIDE (set before sourcing env.sh) instead of post-source FORGE_TOKEN reassignment in all five agent run scripts. The override mechanism in lib/env.sh:98-100 survives re-sourcing from nested shells and claude -p tool invocations. Affected scripts: architect-run.sh, planner-run.sh, gardener-run.sh, predictor-run.sh, supervisor-run.sh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c7a1c444e9
commit
aff9f0fcef
5 changed files with 15 additions and 10 deletions
|
|
@ -34,10 +34,11 @@ FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
# Accept project config from argument; default to disinto
|
||||
export PROJECT_TOML="${1:-$FACTORY_ROOT/projects/disinto.toml}"
|
||||
# Set override BEFORE sourcing env.sh so it survives any later re-source of
|
||||
# env.sh from nested shells / claude -p tools (#762, #747)
|
||||
export FORGE_TOKEN_OVERRIDE="${FORGE_ARCHITECT_TOKEN:-}"
|
||||
# shellcheck source=../lib/env.sh
|
||||
source "$FACTORY_ROOT/lib/env.sh"
|
||||
# Override FORGE_TOKEN with architect-bot's token (#747)
|
||||
FORGE_TOKEN="${FORGE_ARCHITECT_TOKEN:-${FORGE_TOKEN}}"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/worktree.sh
|
||||
|
|
|
|||
|
|
@ -26,10 +26,11 @@ FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
# Accept project config from argument; default to disinto
|
||||
export PROJECT_TOML="${1:-$FACTORY_ROOT/projects/disinto.toml}"
|
||||
# Set override BEFORE sourcing env.sh so it survives any later re-source of
|
||||
# env.sh from nested shells / claude -p tools (#762, #747)
|
||||
export FORGE_TOKEN_OVERRIDE="${FORGE_GARDENER_TOKEN:-}"
|
||||
# shellcheck source=../lib/env.sh
|
||||
source "$FACTORY_ROOT/lib/env.sh"
|
||||
# Use gardener-bot's own Forgejo identity (#747)
|
||||
FORGE_TOKEN="${FORGE_GARDENER_TOKEN:-${FORGE_TOKEN}}"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/worktree.sh
|
||||
|
|
|
|||
|
|
@ -22,10 +22,11 @@ FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
# Accept project config from argument; default to disinto (planner is disinto infrastructure)
|
||||
export PROJECT_TOML="${1:-$FACTORY_ROOT/projects/disinto.toml}"
|
||||
# Set override BEFORE sourcing env.sh so it survives any later re-source of
|
||||
# env.sh from nested shells / claude -p tools (#762, #747)
|
||||
export FORGE_TOKEN_OVERRIDE="${FORGE_PLANNER_TOKEN:-}"
|
||||
# shellcheck source=../lib/env.sh
|
||||
source "$FACTORY_ROOT/lib/env.sh"
|
||||
# Use planner-bot's own Forgejo identity (#747)
|
||||
FORGE_TOKEN="${FORGE_PLANNER_TOKEN:-${FORGE_TOKEN}}"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/worktree.sh
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@ FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
# Accept project config from argument; default to disinto
|
||||
export PROJECT_TOML="${1:-$FACTORY_ROOT/projects/disinto.toml}"
|
||||
# Set override BEFORE sourcing env.sh so it survives any later re-source of
|
||||
# env.sh from nested shells / claude -p tools (#762, #747)
|
||||
export FORGE_TOKEN_OVERRIDE="${FORGE_PREDICTOR_TOKEN:-}"
|
||||
# shellcheck source=../lib/env.sh
|
||||
source "$FACTORY_ROOT/lib/env.sh"
|
||||
# Use predictor-bot's own Forgejo identity (#747)
|
||||
FORGE_TOKEN="${FORGE_PREDICTOR_TOKEN:-${FORGE_TOKEN}}"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/worktree.sh
|
||||
|
|
|
|||
|
|
@ -25,10 +25,11 @@ FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
# Accept project config from argument; default to disinto
|
||||
export PROJECT_TOML="${1:-$FACTORY_ROOT/projects/disinto.toml}"
|
||||
# Set override BEFORE sourcing env.sh so it survives any later re-source of
|
||||
# env.sh from nested shells / claude -p tools (#762, #747)
|
||||
export FORGE_TOKEN_OVERRIDE="${FORGE_SUPERVISOR_TOKEN:-}"
|
||||
# shellcheck source=../lib/env.sh
|
||||
source "$FACTORY_ROOT/lib/env.sh"
|
||||
# Use supervisor-bot's own Forgejo identity (#747)
|
||||
FORGE_TOKEN="${FORGE_SUPERVISOR_TOKEN:-${FORGE_TOKEN}}"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/worktree.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue