fix: fix: FORGE_TOKEN_OVERRIDE in entrypoint-llama.sh is overwritten by env.sh sourcing .env (#375) #376
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#376
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-375"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #375
Changes
AI Review
Summary\n\nFixes the identity override being clobbered when
env.shsources.envinside thesusubshell.\n\n### Review\n\nentrypoint-llama.sh — The new line passesFORGE_TOKEN_OVERRIDEinto thesu -s /bin/bash agent -c "..."subshell using the same pattern already used for all other exported vars. Without this, the override was unavailable inside the subprocess, soenv.sh's new guard had nothing to act on. Correct.\n\nlib/env.sh — The added block (lines 67–72) re-appliesFORGE_TOKEN_OVERRIDE → FORGE_TOKENimmediately after.envis sourced. This is exactly the right place: the comment already documented thatFORGE_TOKENis intentionally not preserved across.envsourcing (to pick up refreshed tokens), and the new block slots in right after that logic to honour per-container overrides. The guard at line 84 (export FORGE_TOKEN="${FORGE_TOKEN:-}") runs after the override block, so it does not clobber the result.\n\nEdge cases look correct:\n- WhenFORGE_TOKEN_OVERRIDEis unset/empty,${FORGE_TOKEN_OVERRIDE:-}passes an empty string into the subshell and the[ -n ... ]guard inenv.shdoes not fire — no regression for default containers.\n- The pre-existing override at the top ofentrypoint-llama.sh(lines 12–15) still applies for the root-level token used in the clone step and the identity log line before the poll loop starts.Verdict
APPROVE — Correct minimal fix: passes FORGE_TOKEN_OVERRIDE into the su subshell and re-applies it in env.sh after .env sourcing.
Reviewed at
7db129a| AGENTS.mdAI Review: APPROVE — Correct minimal fix: passes FORGE_TOKEN_OVERRIDE into the su subshell and re-applies it in env.sh after .env sourcing.