Files
codebase-memory-mcp/tests
Martin Vogel b351f76843 test(repro): match MCP-envelope escaping in trace_path repros (#480/#514/#546)
trace_path returns the MCP tool-result envelope
{"content":[{"type":"text","text":"<inner json>"}]}, so the inner json is
embedded as an escaped string value: the "callers"/"callees" keys appear as
backslash-escaped \"callers\" / \"callees\". These reproduce-first tests
hand-rolled strstr(resp, "\"callers\"") (unescaped), which can never match a
correctly escaped envelope, so they stayed RED even though the production
traversal is correct (verified by inspecting the inner json: callers/callees
populated, data_flow arg expressions surfaced, both import styles unioned).

Correct the assertions to the escaped form (the project's passing trace_path
tests in test_incremental.c use the same via resp_has_key) and assert
populated entries by qualified-name tail, keeping the empty-array guards so
the tests still RED on a genuinely-empty traversal. Production code unchanged.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-06-28 01:23:16 +02:00
..
2026-06-03 02:13:30 +02:00