Local dev setup; fix mirror volume ownership and a test footgun
Adds docker-compose.override.yml (local-only: publishes the server on 127.0.0.1:8080 and Postgres on 127.0.0.1:55432, crawls on demand) and docs/LOCAL.md covering the stack, Claude Code registration over both transports, the CLI, and the test suites. Two bugs that only running the real container could find: The mirror volume was root-owned while the container runs as node, so every file write failed with EACCES. Docker initialises a named volume from the image directory including its ownership, so the fix is to create /data/mirror owned by node in the image. This was easy to miss because the indexer records a per-file failure rather than crashing — the crawl "succeeded" with 4 skipped. Earlier direct-node testing missed it entirely by writing to a scratch dir owned by the developer. The store tests TRUNCATE, and pointing TEST_DATABASE_URL at the dev database put their fixtures into real data. They now refuse any database whose name does not contain "test". Verified against the rebuilt container: 4 files mirrored, image-only PDF detection firing in the real pipeline, both transports showing ✔ Connected in `claude mcp list`, and a whoami tool call driven end to end through `claude -p`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,9 @@ npm run keepalive-status # is the deployed container holding its session?
|
||||
npm run session-diagnose # ~2.5h: measure what actually ends the session
|
||||
```
|
||||
|
||||
`docker-compose.override.yml` is local-only and publishes the server on
|
||||
`127.0.0.1:8080` and Postgres on `127.0.0.1:55432`; see `docs/LOCAL.md`.
|
||||
|
||||
`probe` and `smoke` hit the live Schulcloud and need a valid `.env`. Both are
|
||||
read-only with respect to Schulcloud. Run `smoke` after touching `src/core/`,
|
||||
`src/mcp/` or `src/http/` — the unit tests cover only pure functions.
|
||||
@@ -39,7 +42,9 @@ fallback nobody exercises.
|
||||
Store tests need a database and skip without one:
|
||||
`TEST_DATABASE_URL=postgresql://… npm test`. They use a real Postgres on
|
||||
purpose — the generation/diff semantics are entirely SQL, so a mock would test
|
||||
nothing.
|
||||
nothing. **They `TRUNCATE`**, and refuse to run unless the database name
|
||||
contains "test"; that guard exists because pointing them at the dev database
|
||||
once put fixtures into real data.
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
Reference in New Issue
Block a user