Skip to content

feat(mcp,dashboard): add update_memory, wire redact_secrets, harden dashboard and concurrency - #92

Open
michael-denyer wants to merge 1 commit into
fix/retrieval-feedback-and-maintenancefrom
feat/mcp-ergonomics-and-safety
Open

michael-denyer wants to merge 1 commit into
fix/retrieval-feedback-and-maintenancefrom
feat/mcp-ergonomics-and-safety

Conversation

@michael-denyer

Copy link
Copy Markdown
Owner

Why

Close security, multi-process concurrency, dashboard isolation, and MCP editing gaps on top of the retrieval and maintenance fixes.

What changed

  • Add Storage.update_memory and the update_memory MCP tool to edit content, tags, category, or type in place while preserving counts, trust, hot status, and graph edges; reject duplicate content with ValidationError.
  • Wire redact_secrets into store_memory and update_memory (enabled by default via MEMORY_MCP_REDACT_SECRETS=true) and restrict its URL-credential regex to authority characters so URLs plus @ tokens stay intact.
  • Add Literal enum schemas on MCP tools, project/tag/category filters on list_memories, and default bootstrap_project to promote_to_hot=False with a root_path traversal guard.
  • Replace cached JSON hot_cache_metrics with atomic SQL counters incremented inside the caller transaction.
  • Make CachedEmbeddingProvider a locked OrderedDict, lock lazy model and classifier init, and guard provider=None in ml_classification.
  • Harden dashboard/app.py: pass read_only=True to recall, read storage.db_path, reject cross-origin mutating requests with HTTP 403, run sync routes on the threadpool, return 404 on missing IDs, and move raw SQL onto Storage.

Scope

Config, redaction, embeddings, ML classifier, storage hot cache/CRUD/search/relationships/sessions/injection tracking, MCP tools, FastAPI dashboard, and tests.

Tradeoffs

  • verify_same_origin_for_mutations checks Origin/Referer host and port when present while allowing headerless requests so local CLI tools and TestClient keep working.

Blast Radius

MCP tool surface expands from 16 to 17 tools (update_memory). bootstrap_project no longer auto-promotes chunks unless promote_to_hot=True.

Verification

  • pytest -q: 476 passed, 1 skipped (0 warnings at stack tip), including new tests in TestPR2MCPErgonomicsAndSafety and TestDashboardHardening.
  • ruff check src/ tests/ and ruff format --check src/ tests/: passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant