mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-06-12 00:19:20 +00:00
a81482d06a
MCP server (5 fixes):
- Move semaphore acquisition inside goroutine so main loop stays
responsive when all slots are taken
- Add 10s write timeout to sendResponse to prevent pipe deadlock
when Claude Code pauses reading stdout
- Send fallback JSON-RPC error when json.Marshal fails instead of
silently swallowing the error and leaving caller waiting forever
- Silence unknown notification methods (req.ID == nil) instead of
sending unsolicited error responses that may desync the host
- Return MCP isError content for tool failures instead of top-level
JSON-RPC error, matching the MCP specification
Vector/embedding (3 fixes):
- Move EmbedBatchWithContext call before writeMu.Lock in AddDocuments
so ONNX inference runs outside the write lock
- Replace singleflight.Do with DoChan + ctx select in both
getOrComputeEmbedding and UnifiedSearch so callers can bail out
independently when their context expires
- Add activeQueries atomic counter; skip cache warming when user
queries are in-flight; reduce warming timeout from 5s to 2s
Hooks (4 fixes):
- Cap EnsureWorkerRunning to 15s hard deadline with context; reduce
StartupTimeout from 30s to 10s; reduce port-in-use retries
- Fix nil dereference panic in user-prompt hook when initResult is
nil (non-JSON worker response); use comma-ok assertions
- Use package-level hookClient/healthClient with DisableKeepAlives
to prevent FD leaks in short-lived hook processes
- Set SysProcAttr{Setpgid: true} to detach worker from hook process
group, preventing kill-cascade from Claude Code
Worker/DB (3 fixes):
- Replace os.Exit(0) in MCP config watcher with context cancellation
for clean protocol shutdown
- Add 60s context.WithTimeout around ProcessObservation calls in
processAllSessions to prevent hung CLI subprocesses from blocking
the queue processor forever
- Set explicit PRAGMA wal_autocheckpoint=1000 and add PASSIVE WAL
checkpoint to Optimize() to prevent checkpoint stalls
Adds 20+ regression tests across all fix areas.
92 lines
1010 B
Plaintext
92 lines
1010 B
Plaintext
# Binaries
|
|
bin/
|
|
/mcp
|
|
/worker
|
|
*.exe
|
|
*.exe~
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Go
|
|
*.test
|
|
*.out
|
|
coverage.out
|
|
coverage.html
|
|
*.prof
|
|
|
|
# Vendor (if not committing)
|
|
# vendor/
|
|
|
|
# IDE
|
|
.idea/
|
|
.vscode/
|
|
.claude/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.DS_Store
|
|
|
|
# Node.js / Vue
|
|
ui/node_modules/
|
|
ui/dist/
|
|
ui/.vite/
|
|
ui/package.json
|
|
docs/node_modules/
|
|
docs/dist/
|
|
*.log
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Build artifacts
|
|
dist/
|
|
build/
|
|
*.tar.gz
|
|
*.zip
|
|
|
|
# Embedded static files (built from ui/dist)
|
|
internal/worker/static/*
|
|
!internal/worker/static/placeholder.html
|
|
|
|
# Environment and secrets
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
*.pem
|
|
*.key
|
|
credentials.json
|
|
|
|
# Local development
|
|
*.local
|
|
.claude-mnemonic/
|
|
tmp/
|
|
temp/
|
|
|
|
# Test artifacts
|
|
__debug_bin*
|
|
.test/
|
|
|
|
# OS generated
|
|
Thumbs.db
|
|
ehthumbs.db
|
|
Desktop.ini
|
|
|
|
# Logs
|
|
logs/
|
|
*.log
|
|
|
|
# Database files (local dev)
|
|
*.db
|
|
*.db-wal
|
|
*.db-shm
|
|
|
|
# goreleaser
|
|
dist/
|
|
docs/dist
|
|
|
|
# Non-template plugin configs (keep only .tpl files in plugin/ dir)
|
|
plugin/.claude-plugin/plugin.json
|
|
plugin/.claude-plugin/marketplace.json
|
|
user-prompt
|