fix(ui): allow graph schema through UI RPC - #1817
Conversation
Fixes DeusData#1663 Signed-off-by: astandrik <astandrik@yandex-team.ru>
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to an explicit allowlist addition with corresponding regression coverage for both allowed and blocked RPC methods.
Pull request overview
This PR fixes the Graph UI’s failure to fetch per-project graph schema over the loopback JSON-RPC endpoint by expanding the UI RPC allowlist to include get_graph_schema, and updates the HTTPD regression test to validate the expanded allowlist while keeping mutation/search tools blocked.
Changes:
- Allow
get_graph_schemathrough the UI/rpcallowlist alongsidelist_projectsandget_code_snippet. - Expand the existing HTTPD regression test to assert all allowed tools return HTTP 200 and selected blocked tools still return HTTP 403.
- Add
search_graphto the blocked-tool coverage to ensure graph query capabilities remain disallowed via the UI RPC route.
File summaries
| File | Description |
|---|---|
| tests/test_httpd.c | Expands the UI RPC allowlist/denylist regression test to cover get_graph_schema and additional blocked tools. |
| src/ui/http_server.c | Adds get_graph_schema to the UI RPC allowlist check in rpc_is_allowed_for_ui. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What does this PR do?
The Graph UI already calls
get_graph_schemawhile loading projects, but the loopback UI RPC allowlist rejected that call with HTTP 403.This adds only
get_graph_schemato the existinglist_projects/get_code_snippetallowlist. The regression test now covers all three allowed tools and keepssearch_graph,delete_project,manage_adr,ingest_traces, andindex_repositoryblocked. The existinginitializeand duplicateparams.namechecks remain unchanged.Fixes #1663
Verification
scripts/test.sh --suites httpdscripts/test.shscripts/lint.sh --ciscripts/build.sh --with-ui BUILD_DIR=build/issue1663-ui CC=gcc CXX=g++SMOKE_REQUIRE_UI=1 scripts/smoke-local.sh build/issue1663-ui/codebase-memory-mcp uimake -j32 -f Makefile.cbm security BUILD_DIR=build/issue1663-securityThe full Linux gate passed on the remote builder against the exact commit tree. Windows runtime behavior remains for CI to confirm.
Checklist
git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)scripts/test.sh)scripts/lint.sh --ci)