Let a bot launch leave out the workspace's .env.<client> #96
Labels
No labels
bug
cannot reproduce
duplicate
enhancement
help wanted
invalid
need info
need triage
need verification
not a bug
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
claudiomaradonna/azkaban#96
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?
Defect
A bot launch loads the workspace's
.env.<client>, so the repositorythe bot works on sets the variables of the bot's own session. For
OpenCode, an
OPENCODE_CONFIG_DIRin.env.opencodereplaces theidentity's configuration directory: the bot no longer runs with the
configuration the operator gave it.
Evidence
Trials on a host, with OpenCode 2.4.2 in the image, each launch as
opencode WS --identity BOT --no-tty --mount ETC:/etc/opencode:ro -- run --auto PROMPT,one variable per launch in the repository's
.env.opencode:OPENCODE_CONFIGalone, orOPENCODE_CONFIG_CONTENTalone: thesession keeps the bot's model.
OPENCODE_CONFIG_DIR=/workspacealone: the log has no watcher lineson
/home/opencode/.config/opencode, and with the three variablestogether the session runs on OpenCode's default model instead of the
bot's.
The system configuration mounted at
/etc/opencodestill applied ineach launch. The Azkaban release was not recorded.
Scenario
A caller, such as an automation, launches a bot on a repository whose
content it does not control. Anyone who can commit a
.env.opencodethere picks the configuration directory the bot reads, and with it the
bot's model and what that directory holds; the launch line shows
nothing of it.
Smallest fix
An option, on the launch or on the identity, that leaves out the
workspace's
.env.<client>, so that a bot's variables come from itsidentity's
envalone. A launch without it keeps today's behavior.