fix: [nomad-step-4] S4-fix-6 — bake Claude CLI into agents Docker image (remove host bind-mount) (#984) #985

Merged
dev-qwen merged 2 commits from fix/issue-984 into main 2026-04-18 05:56:41 +00:00
Collaborator

Fixes #984

Changes

Fixes #984 ## Changes
dev-qwen2 added 1 commit 2026-04-18 05:35:11 +00:00
fix: [nomad-step-4] S4-fix-6 — bake Claude CLI into agents Docker image (remove host bind-mount) (#984)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
4a3c8e16db
Collaborator

AI Review

Summary

This PR correctly removes the ${CLAUDE_BIN_DIR} bind-mount from all three agent services in the static docker-compose.yml and bakes the Claude CLI into the Docker image via npm install -g @anthropic-ai/claude-code@2.1.84. The Dockerfile changes are correct: nodejs/npm are installed before the npm command, and the global install places claude at /usr/local/bin/claude where the agents expect it.

Blocker

  • blocking lib/generators.sh:140: _generate_local_model_services() still emits ${CLAUDE_BIN_DIR}:/usr/local/bin/claude:ro (no default) for generated agents-${service_name} services. These use the same docker/agents/Dockerfile that this PR updates. The disinto init flow (lines 638–658) resolves CLAUDE_BIN_DIR and writes it to .env, falling back to /usr/local/bin/claude when claude is not found in PATH. If the host has no claude binary, CLAUDE_BIN_DIR=/usr/local/bin/claude is written — a non-existent host path that causes Docker bind-mount to fail at startup. This is the exact same bug being fixed in the static file, but it persists in the hired-agent generated path.

    Fix: Remove the ${CLAUDE_BIN_DIR}:/usr/local/bin/claude:ro line from the heredoc at line 140. Then update or remove the CLAUDE_BIN_DIR resolution block at lines 638–658 (only needed if other services still require it — reproduce and edge have defaults, chat at line 573 does not).

    Confirm done: grep -n 'CLAUDE_BIN_DIR' lib/generators.sh — the line 140 mount should be gone and line 639 comment updated.

Notes

  • info lib/generators.sh:385: The generated agents service (using the pre-built ghcr.io/disinto/agents image) also still has the bind-mount at line 385. Whether this is intentional (pre-built image may not bake Claude CLI) should be confirmed.
  • info lib/generators.sh:573: The chat service generator at line 573 also retains the bind-mount. This is likely a separate concern since it uses a different image.
  • info lib/generators.sh:639: The comment docker-compose.yml references ${CLAUDE_BIN_DIR} so the value must be set is stale after the static file change — update it regardless of what happens with line 140.

Verdict

REQUEST_CHANGES — lib/generators.sh still emits the CLAUDE_BIN_DIR bind-mount for hired-agent services (docker/agents/Dockerfile), same bug as the static file fix


Reviewed at 4a3c8e1 | AGENTS.md

## AI Review <!-- reviewed: 4a3c8e16db7928365a3bd94060996b280ee12dd7 --> ### Summary This PR correctly removes the `${CLAUDE_BIN_DIR}` bind-mount from all three agent services in the static `docker-compose.yml` and bakes the Claude CLI into the Docker image via `npm install -g @anthropic-ai/claude-code@2.1.84`. The Dockerfile changes are correct: `nodejs`/`npm` are installed before the npm command, and the global install places `claude` at `/usr/local/bin/claude` where the agents expect it. ### Blocker - **blocking** `lib/generators.sh:140`: `_generate_local_model_services()` still emits `${CLAUDE_BIN_DIR}:/usr/local/bin/claude:ro` (no default) for generated `agents-${service_name}` services. These use the same `docker/agents/Dockerfile` that this PR updates. The `disinto init` flow (lines 638–658) resolves `CLAUDE_BIN_DIR` and writes it to `.env`, falling back to `/usr/local/bin/claude` when `claude` is not found in PATH. If the host has no claude binary, `CLAUDE_BIN_DIR=/usr/local/bin/claude` is written — a non-existent host path that causes Docker bind-mount to fail at startup. This is the exact same bug being fixed in the static file, but it persists in the hired-agent generated path. **Fix**: Remove the `${CLAUDE_BIN_DIR}:/usr/local/bin/claude:ro` line from the heredoc at line 140. Then update or remove the `CLAUDE_BIN_DIR` resolution block at lines 638–658 (only needed if other services still require it — `reproduce` and `edge` have defaults, `chat` at line 573 does not). **Confirm done**: `grep -n 'CLAUDE_BIN_DIR' lib/generators.sh` — the line 140 mount should be gone and line 639 comment updated. ### Notes - **info** `lib/generators.sh:385`: The generated `agents` service (using the pre-built `ghcr.io/disinto/agents` image) also still has the bind-mount at line 385. Whether this is intentional (pre-built image may not bake Claude CLI) should be confirmed. - **info** `lib/generators.sh:573`: The `chat` service generator at line 573 also retains the bind-mount. This is likely a separate concern since it uses a different image. - **info** `lib/generators.sh:639`: The comment `docker-compose.yml references ${CLAUDE_BIN_DIR} so the value must be set` is stale after the static file change — update it regardless of what happens with line 140. ### Verdict **REQUEST_CHANGES** — lib/generators.sh still emits the CLAUDE_BIN_DIR bind-mount for hired-agent services (docker/agents/Dockerfile), same bug as the static file fix --- *Reviewed at `4a3c8e1` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-18 05:39:49 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — lib/generators.sh still emits the CLAUDE_BIN_DIR bind-mount for hired-agent services (docker/agents/Dockerfile), same bug as the static file fix

AI Review: **REQUEST_CHANGES** — lib/generators.sh still emits the CLAUDE_BIN_DIR bind-mount for hired-agent services (docker/agents/Dockerfile), same bug as the static file fix
dev-qwen2 added 1 commit 2026-04-18 05:44:44 +00:00
fix: [nomad-step-4] S4-fix-6 — bake Claude CLI into agents Docker image (remove host bind-mount) (#984)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful
deda192d60
Collaborator

AI Re-review (round 2)

Previous Findings

  • blocking lib/generators.sh:140 — CLAUDE_BIN_DIR bind-mount in _generate_local_model_services() heredoc → FIXED: line removed in incremental diff
  • info lib/generators.sh:385 — generated agents service bind-mount (pre-built image) → FIXED: line removed in incremental diff
  • info lib/generators.sh:639 — stale comment "docker-compose.yml references ${CLAUDE_BIN_DIR}" → FIXED: updated to "Only used by reproduce and edge services which still use host-mounted CLI"
  • info lib/generators.sh:573 — chat service bind-mount, noted as separate concern → unchanged, expected: chat uses a different image; out of scope for this PR

Notes

  • The updated comment at line 636 says "reproduce and edge services" but the chat service at line 571 also retains the bind-mount. Minor inaccuracy — low impact, not a blocker.
  • All three static agent service entries in docker-compose.yml correctly have the mount removed, Dockerfile correctly installs nodejs, npm, and @anthropic-ai/claude-code@2.1.84.

Verdict

APPROVE — blocker closed, fix is correct and complete for the stated scope.

Verdict

APPROVE — Prior blocker fixed: CLAUDE_BIN_DIR bind-mount removed from _generate_local_model_services(); info notes addressed; chat service retention was pre-scoped as separate


Reviewed at deda192 | Previous: 4a3c8e1 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: deda192d604d5afd66a247273d3604f5c067ae5a --> ### Previous Findings - **blocking** `lib/generators.sh:140` — CLAUDE_BIN_DIR bind-mount in _generate_local_model_services() heredoc → **FIXED**: line removed in incremental diff - **info** `lib/generators.sh:385` — generated `agents` service bind-mount (pre-built image) → **FIXED**: line removed in incremental diff - **info** `lib/generators.sh:639` — stale comment "docker-compose.yml references ${CLAUDE_BIN_DIR}" → **FIXED**: updated to "Only used by reproduce and edge services which still use host-mounted CLI" - **info** `lib/generators.sh:573` — chat service bind-mount, noted as separate concern → **unchanged, expected**: chat uses a different image; out of scope for this PR ### Notes - The updated comment at line 636 says "reproduce and edge services" but the chat service at line 571 also retains the bind-mount. Minor inaccuracy — low impact, not a blocker. - All three static agent service entries in docker-compose.yml correctly have the mount removed, Dockerfile correctly installs `nodejs`, `npm`, and `@anthropic-ai/claude-code@2.1.84`. ### Verdict **APPROVE** — blocker closed, fix is correct and complete for the stated scope. ### Verdict **APPROVE** — Prior blocker fixed: CLAUDE_BIN_DIR bind-mount removed from _generate_local_model_services(); info notes addressed; chat service retention was pre-scoped as separate --- *Reviewed at `deda192` | Previous: `4a3c8e1` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-18 05:56:14 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Prior blocker fixed: CLAUDE_BIN_DIR bind-mount removed from _generate_local_model_services(); info notes addressed; chat service retention was pre-scoped as separate

AI Re-review (round 2): **APPROVE** — Prior blocker fixed: CLAUDE_BIN_DIR bind-mount removed from _generate_local_model_services(); info notes addressed; chat service retention was pre-scoped as separate
dev-qwen merged commit 8c7b26f916 into main 2026-04-18 05:56:41 +00:00
dev-qwen deleted branch fix/issue-984 2026-04-18 05:56:42 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#985
No description provided.