fix: docker-compose.yml: switch .claude mounts to shared CLAUDE_CONFIG_DIR (#642) #655

Merged
dev-qwen merged 1 commit from fix/issue-642 into main 2026-04-10 20:42:54 +00:00
Collaborator

Fixes #642

Changes

Fixes #642 ## Changes
dev-qwen added 1 commit 2026-04-10 20:32:21 +00:00
fix: docker-compose.yml: switch .claude mounts to shared CLAUDE_CONFIG_DIR (#642)
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
4b6cc4afde
Collaborator

AI Review

Summary

This PR completes the #642 fix by switching all container mounts from to the shared path (mounted at the same host path inside each container). This ensures 's atomic-mkdir lock works across containers — each container sees the same absolute filesystem path.

Findings

  • info .env.example:97: CLAUDE_CONFIG_DIR=${CLAUDE_SHARED_DIR}/config uses variable expansion syntax that Docker Compose does not expand within .env files. If a user copies .env.example to .env and changes CLAUDE_SHARED_DIR to a custom path, CLAUDE_CONFIG_DIR will be the literal string ${CLAUDE_SHARED_DIR}/config rather than the derived path. The fallback in docker-compose.yml (:-/var/lib/disinto/claude-shared/config) won't kick in because the var is set (to the wrong value). Mitigation: lib/env.sh re-derives this correctly at container startup via bash expansion — but only if the value isn't already polluted. For the common case (user keeps default path or sets both vars explicitly), this is a non-issue. Consider hardcoding both lines in .env.example to avoid confusion.

Correctness checks

  • Mount strategy ${CLAUDE_SHARED_DIR}:${CLAUDE_SHARED_DIR} (identity mount) is the correct approach — all containers resolve to the same absolute path, satisfying the cross-container locking requirement.
  • CLAUDE_CONFIG_DIR defaults in generators.sh are hardcoded correctly (/var/lib/disinto/claude-shared/config), so fresh installs with no .env overrides work correctly.
  • lib/env.sh exports CLAUDE_SHARED_DIR and derives CLAUDE_CONFIG_DIR via bash :- operator, which correctly handles variable expansion at runtime.
  • lib/claude-config.sh (introduced in #641) creates the directory on the host during disinto init — prerequisite is already satisfied.
  • runner and edge containers now consistently receive CLAUDE_CONFIG_DIR and the shared mount — previously absent, now aligned.
  • CLAUDE_CREDENTIALS_DIR derivation from CLAUDE_CONFIG_DIR in local-model services is valid Docker Compose variable interpolation syntax.

Verdict

APPROVE — Mount strategy is correct, defaults are hardcoded properly, lib/env.sh handles runtime derivation — change achieves its goal.


Reviewed at 4b6cc4a | AGENTS.md

## AI Review <!-- reviewed: 4b6cc4afdebcc2d73d0ad30ee7f3e7e5c7756948 --> ### Summary This PR completes the #642 fix by switching all container mounts from to the shared path (mounted at the same host path inside each container). This ensures 's atomic-mkdir lock works across containers — each container sees the same absolute filesystem path. ### Findings - **info** `.env.example:97`: `CLAUDE_CONFIG_DIR=${CLAUDE_SHARED_DIR}/config` uses variable expansion syntax that Docker Compose does **not** expand within `.env` files. If a user copies `.env.example` to `.env` and changes `CLAUDE_SHARED_DIR` to a custom path, `CLAUDE_CONFIG_DIR` will be the literal string `${CLAUDE_SHARED_DIR}/config` rather than the derived path. The fallback in `docker-compose.yml` (`:-/var/lib/disinto/claude-shared/config`) won't kick in because the var *is* set (to the wrong value). **Mitigation:** `lib/env.sh` re-derives this correctly at container startup via bash expansion — but only if the value isn't already polluted. For the common case (user keeps default path or sets both vars explicitly), this is a non-issue. Consider hardcoding both lines in `.env.example` to avoid confusion. ### Correctness checks - Mount strategy `${CLAUDE_SHARED_DIR}:${CLAUDE_SHARED_DIR}` (identity mount) is the correct approach — all containers resolve to the same absolute path, satisfying the cross-container locking requirement. - `CLAUDE_CONFIG_DIR` defaults in `generators.sh` are hardcoded correctly (`/var/lib/disinto/claude-shared/config`), so fresh installs with no `.env` overrides work correctly. - `lib/env.sh` exports `CLAUDE_SHARED_DIR` and derives `CLAUDE_CONFIG_DIR` via bash `:-` operator, which correctly handles variable expansion at runtime. - `lib/claude-config.sh` (introduced in #641) creates the directory on the host during `disinto init` — prerequisite is already satisfied. - runner and edge containers now consistently receive `CLAUDE_CONFIG_DIR` and the shared mount — previously absent, now aligned. - `CLAUDE_CREDENTIALS_DIR` derivation from `CLAUDE_CONFIG_DIR` in local-model services is valid Docker Compose variable interpolation syntax. ### Verdict **APPROVE** — Mount strategy is correct, defaults are hardcoded properly, lib/env.sh handles runtime derivation — change achieves its goal. --- *Reviewed at `4b6cc4a` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-10 20:42:37 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Mount strategy is correct, defaults are hardcoded properly, lib/env.sh handles runtime derivation — change achieves its goal.

AI Review: **APPROVE** — Mount strategy is correct, defaults are hardcoded properly, lib/env.sh handles runtime derivation — change achieves its goal.
dev-qwen merged commit 6443149000 into main 2026-04-10 20:42:54 +00:00
dev-qwen deleted branch fix/issue-642 2026-04-10 20:42:55 +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#655
No description provided.