From 027d5c3e7370b727c5a8b8029c4dfafd11574ac9 Mon Sep 17 00:00:00 2001 From: Toni Nowak Date: Sat, 18 Jul 2026 10:46:03 +0200 Subject: [PATCH] fix(docker): mount host ~/.claude/projects into dashboard for reasoning mining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- CHANGELOG.md | 9 +++++++++ docker-compose.surrealdb.yml | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f862fe8b..9caaefd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- **Docker: reasoning mining found zero traces.** `docker-compose.surrealdb.yml` + now mounts the host's `~/.claude/projects` read-only into the dashboard + container at `/home/appuser/.claude/projects`. Without it the in-container miner + scanned an empty `~/.claude` and every dashboard "Mine" finished instantly with + 0 traces (no error) — looking like nothing happened. Projects-only, read-only + mount (not the whole `~/.claude`); override via `HOST_CLAUDE_PROJECTS` in `.env`. + ## [2.12.1] — Release pipeline: npm packages actually ship again Patch release. No runtime changes — it exists to fix the release pipeline and diff --git a/docker-compose.surrealdb.yml b/docker-compose.surrealdb.yml index 4a926014..d831ef10 100755 --- a/docker-compose.surrealdb.yml +++ b/docker-compose.surrealdb.yml @@ -101,6 +101,13 @@ services: condition: service_healthy volumes: - nm_data:/data + # Reasoning-training mining reads the host's Claude transcripts from + # ~/.claude/projects/*/*.jsonl. Mounted READ-ONLY and projects-only (not the + # whole ~/.claude, which also holds settings/credentials). Without this the + # dashboard "Mine" runs in-container against an empty ~/.claude and silently + # finds zero traces. Container user is appuser (uid 1000); override the host + # path via HOST_CLAUDE_PROJECTS in .env if your home differs. + - ${HOST_CLAUDE_PROJECTS:-${HOME}/.claude/projects}:/home/appuser/.claude/projects:ro restart: unless-stopped volumes: