Commit c2f76aa
feat: Adopt parallel branch's test suites and MCP ergonomics
Integrates the valuable work from the parallel rollback on origin/main:
the executable MCP user-flow test suite, in-process MCP tests, CI
workflow, and parity/testing docs — adapted to this implementation.
MCP ergonomics (from the remote branch's parity work):
- Accept docs-prefixed tool names (mcp_tinybrain-mcp-server_<tool>)
- Notifications identified by method prefix, not missing id; explicit
"id": null still receives a response
- tags/categories accepted as JSON arrays or JSON array strings
- create_relationship accepts source_entry_id/target_entry_id (docs
names) alongside source_memory_id/target_memory_id
- create_context_snapshot accepts context_data as object or string
- update_task_progress accepts task_id (docs) or session_id+task_name
- reverse_engineering and malware_analysis session task types
- mcp.Server.HandleRequest exported for in-process testing
Fixes found by the adopted tests:
- BatchUpdateMemoryEntries deadlocked: it queried via the pool (sized
to one connection) while its own transaction held that connection;
updated entries are now fetched after commit
- FTS5 multi-word queries were phrase matches that returned nothing
for natural queries; terms are now individually quoted and OR-ed
go build/vet and the full test suite pass, including the executable
MCP user-flow test that drives the built binary end-to-end.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 37389f3 commit c2f76aa
9 files changed
Lines changed: 1060 additions & 71 deletions
File tree
- .github/workflows
- cmd/server
- docs
- internal
- app
- database
- mcp
- repository
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
0 commit comments