fix: feat: hire-an-agent should support --local-model to auto-configure llama agents (#182) #183
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-182"
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 #182
Changes
AI Review
Security
bin/disinto:2907,2910,2937: Secret written to disk in plaintext. The heredoc delimiter is unquoted (<<OVERRIDEOF), so all shell variables expand at generation time.${agent_token}(which holds${FORGE_TOKEN}) is expanded to its literal value and written intodocker-compose.override.ymlas a hardcoded string. Any process, backup, or accidental commit of that file exposes the token. Fix: either quote the delimiter (<<'OVERRIDEOF') and sed-in only the values that must be baked in (agent_name, service_name, local_model, interval, claude_bin), or leave token-bearing variables as docker-compose interpolation references by escaping them:$${FORGE_TOKEN}so they appear as${FORGE_TOKEN}in the generated file and are resolved from the environment atdocker compose uptime — consistent with how.envinjection already works via theenv_filestanza on the same service. This violates AD-005.Minor
low
bin/disinto:2924-2928:${HOME}also expands at heredoc generation time, hardcoding the operator's home directory into the generated file. If the file is later run by a different user or copied to another machine, the volume mounts silently point at the wrong paths. Same fix as above: escape to$${HOME}so docker-compose interpolates at runtime.info
bin/disinto:2899: Comment reads "replace - with -" (no-op description). Thetrcommand only lowercases; the comment is misleading but harmless.Verdict
REQUEST_CHANGES — FORGE_TOKEN written in plaintext to generated override file via unquoted heredoc
Reviewed at
99adbc9| AGENTS.mdAI Review: REQUEST_CHANGES — FORGE_TOKEN written in plaintext to generated override file via unquoted heredoc
AI Re-review (round 2)
Previous Findings
agent_tokenvariable removed, heredoc is now quoted. The token is no longer written to disk. ✓New Issues
high
bin/disinto:2907-2909,2923-2927,2936: The comment claims$${VAR}causes docker-compose to interpolate at runtime — this is the opposite of the truth. In docker-compose,$$is the escape sequence for a literal$sign. So$${HOME}in a compose file expands to the literal string${HOME}, which Docker receives as a bind-mount source path. There is no directory named${HOME}/.claudeon disk; all four volume mounts will fail. Likewise,FORGE_TOKEN_OVERRIDE: $${FORGE_TOKEN}sets the container env var to the literal string${FORGE_TOKEN}, not the token value. To get docker-compose runtime interpolation from the host environment, write${HOME}and${FORGE_TOKEN}without any escaping — in a quoted heredoc they are written literally to the file, and docker-compose expands them atuptime.high
bin/disinto:2914,2934,2938: Bash-local variablesservice_name,local_model, andintervalare inside a quoted heredoc (<<'OVERRIDEOF'), so they are written literally as${service_name},${local_model}, and${interval}to the generated file. Docker-compose will attempt to interpolate these from the host environment atuptime, but they are not env vars — they are local variables of thehire-an-agentfunction. As a result: the service key${service_name}:will be empty (invalid YAML),ANTHROPIC_BASE_URLwill be empty (agent cannot reach the local model), andPOLL_INTERVALwill be empty. These values must be baked in at generation time via sed, using distinct non-YAML-conflicting placeholders (e.g.__SERVICE_NAME__,__LOCAL_MODEL__,__INTERVAL__).Verdict
REQUEST_CHANGES — 122395VAR escaping in docker-compose produces literal strings, not runtime interpolation — and bash-local variables are unresolvable at compose-up time
Reviewed at
ca73bc2| Previous:99adbc9| AGENTS.mdAI Re-review (round 2): REQUEST_CHANGES — 122395VAR escaping in docker-compose produces literal strings, not runtime interpolation — and bash-local variables are unresolvable at compose-up time
AI Re-review (round 3)
Previous Findings
bash-local vars not baked in (, , ) → FIXED: heredoc is now unquoted so bash correctly expands these at generation time. ✓
$${VAR}produces literal strings, not runtime interpolation → NOT FIXED. The fix switched back to an unquoted heredoc, but$$in bash is the shell PID special parameter — it does not produce a literal$. Verified:echo "$${HOME}"outputs122762{HOME}(PID then literal text), not${HOME}. So the four volume mount lines in the generated file will look like:\n\n - 122762{HOME}/.claude:/home/agent/.claude\n\nThese are invalid bind-mount paths; docker compose will fail to start the service. Similarly,FORGE_TOKEN_OVERRIDEwill be set to122762{FORGE_TOKEN}(garbage). The correct bash escape to write a literal$into an unquoted heredoc is a backslash:\\\/home/agentand\\\d29e4df6360fcd7ba12235bc6ab60589e50bc35f— these produce exactly${HOME}and${FORGE_TOKEN}in the generated file, which docker-compose then interpolates from the host environment atdocker compose uptime.Verdict
REQUEST_CHANGES — $
HOME in unquoted bash heredoc expands to the shell PID, not a literal, producing broken volume paths in the generated fileReviewed at
554998c| Previous:ca73bc2| AGENTS.mdAI Re-review (round 3): REQUEST_CHANGES — $
HOME in unquoted bash heredoc expands to the shell PID, not a literal, producing broken volume paths in the generated fileAI Re-review (round 4)
Previous Findings
$$PID expansion breaks volume paths → FIXED: changed$${HOME}to\$HOMEand$${FORGE_TOKEN}to\$FORGE_TOKEN. Bash processes\$as a literal$, so the generated file correctly contains$HOME/.claudeandFORGE_TOKEN_OVERRIDE: $FORGE_TOKEN— which docker-compose interpolates from the host environment atdocker compose uptime. ✓Notes
bin/disinto:2881:local compose_file="${FACTORY_ROOT}/docker-compose.yml"is declared but never used. Not a blocker, but can be removed.Verdict
APPROVE — all previous findings addressed; $HOME and $FORGE_TOKEN correctly produce docker-compose runtime references via backslash escape
Reviewed at
603dd92| Previous:554998c| AGENTS.mdAI Re-review (round 4): APPROVE — all previous findings addressed; $HOME and $FORGE_TOKEN correctly produce docker-compose runtime references via backslash escape