fix: env.sh should not source .env inside containers — compose env is the source of truth #378
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#378
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
lib/env.sh unconditionally sources .env (or .env.enc) on every script invocation. Inside Docker containers, compose environment: vars are the source of truth. Sourcing .env inside the container overwrites compose-injected values (FORGE_TOKEN, etc.) with stale or wrong values.
This is the root cause of: dev-qwen resolving as dev-bot, stale tokens after regeneration, FORGE_TOKEN_OVERRIDE being clobbered.
Fix
Wrap the .env sourcing block in a container guard:
Inside containers (DISINTO_CONTAINER=1), env vars come from compose. On bare metal, .env is sourced as before.
Affected files
Acceptance criteria
Regression checklist
Dependencies
Depends on #379