fix(docker): mount ~/.claude/projects so dashboard reasoning mining works#87
Open
acidkill wants to merge 1 commit into
Open
fix(docker): mount ~/.claude/projects so dashboard reasoning mining works#87acidkill wants to merge 1 commit into
acidkill wants to merge 1 commit into
Conversation
…ng mining The reasoning-training dashboard runs inside the surrealdb compose container (HOME=/home/appuser), but the miner scans $HOME/.claude/projects — which was empty in the container. Every dashboard Mine finished in <1s with 0 traces and no error, so it looked like nothing happened while the host's 3200+ transcripts sat unmounted. Add a read-only, projects-only bind mount (not the whole ~/.claude); overridable via HOST_CLAUDE_PROJECTS. Verified: a backfill mine now ingests 502 traces and distills 9 patterns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Enabling mining in the reasoning-training dashboard reported "mining enabled", but every Mine finished instantly (~0.6s) with
traces_ingested: 0,error: null— no progress, no log, no patterns. Looked broken.Root cause: the dashboard runs in the
docker-compose.surrealdb.ymlcontainer (HOME=/home/appuser), but the miner scansPath.home()/.claude/projects. That path was empty in the container — the host's 3200+ transcripts in~/.claude/projectswere never mounted. The mine correctly found nothing and returned quietly.Fix
Read-only, projects-only bind mount (not the whole
~/.claude, which also holds settings/credentials):- ${HOST_CLAUDE_PROJECTS:-${HOME}/.claude/projects}:/home/appuser/.claude/projects:roContainer user is
appuseruid 1000 (matches host), so the mount is readable. Overridable viaHOST_CLAUDE_PROJECTSin.env.Verification
After recreating the container:
POST /api/dashboard/reasoning/mine {backfill:true}→ 502 traces ingested, 9 patterns learned, no errorclaude-haiku-4-5; sample patterns:data-analysis(conf 0.75),research(0.63),verification(0.56)Docs-/infra-only (compose + CHANGELOG); no package/version change.