Skip to content

test(mcp): owner refusal tests red since graph-tool problems always render as refusals #2317

Description

@ScriptedAlchemy

Since 21552e3 ("fix(mcp): preserve parked route details", merged with #2293), settle_graph_tool_result returns every owner problem as an ApplicationRefusal. Owner-flattened argument errors used to come back as Err(TraceDecayError::Config); now they render as a problem tool result. Six mcp_suite tests that expect the error path fail on master:

cargo test -p tracedecay --features test-transport,test-helpers --test mcp_suite -- callers callees graph_query_test
test result: FAILED. 52 passed; 6 failed
mcp_handler_test::graph_analysis_test::diff_context_reports_changed_symbols_callers_and_refuses_invalid_input
mcp_handler_test::graph_query_test::test_grep_missing_pattern_errors
mcp_handler_test::graph_query_test::tracedecay_by_qualified_name_returns_the_symbol_at_that_exact_name
mcp_handler_test::graph_query_test::test_rank_invalid_direction
mcp_handler_test::graph_query_test::redundancy_reports_ranked_repository_exact_families_with_bounded_pages
mcp_handler_test::impact_behavior_test::impact_reports_callers_by_depth_and_refuses_invalid_requests

Example (tracedecay_by_qualified_name with a missing argument): the test expects JSON-RPC error -32603 tool execution failed: config error: invalid arguments for tracedecay_by_qualified_name: missing field qualified_name``. It now gets a successful result whose content is {"contract":{"schema_id":"schema.application.primitive.by-qualified-name.result",…},"problem":{…"code":"application.surface.invalid_request"…}}.

Either the tests move to the typed problem contract, or argument refusals keep their error path. Observed on a branch that only touches tracedecay-code-index-runtime, rebased on 5ad8106..f1d4e56.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions