Skip to content

mcp-provider-messages - #935

Merged
jeffreyaven merged 2 commits into
mainfrom
mcp-provider-messages
Nov 18, 2026
Merged

jeffreyaven merged 2 commits into
mainfrom
mcp-provider-messages

Conversation

@jeffreyaven

Copy link
Copy Markdown
Member

Description

Adds per-statement engine messages to native-backend run_select_query results. The MCP backend captures the existing diagnostic writer on its per-statement context clone, bounds captured message count and length, and returns messages beside rows in structured content and a labelled text block. Statements without messages retain their current result shape and rendering. The reverse-proxy backend returns rows only because its database/sql interface does not expose a per-statement message channel. No engine, OmniSDK, srv, exec, or shell behavior was changed.

Type of change

  • Bug fix (non-breaking change to fix a bug).
  • Feature (non-breaking change to add functionality).
  • Breaking change.
  • Other (eg: documentation change). Please explain.

Issues referenced.

None known.

Evidence

  • go build ./...: passed.
  • go test ./pkg/mcp_server/... ./internal/stackql/mcpbackend/...: passed.
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 run: passed, 0 issues.
  • Targeted Robot scenarios for not-found structured output, not-found rendered text, and partial results: passed, 4/4 including the existing MCP query scenario. Captured results contained an empty rows array plus the provider 404 message; partial results retained rows and the message.
  • CLI both-streams 404 regression scenarios: passed, 5/5, asserting exec stdout and stderr.
  • Full mcp.robot: 85/91 passed. The 6 failures require psql, which is not installed; the MCP outputs for the concurrent query cases were correct.
  • go test -timeout 1200s ./...: two packages had pre-existing Windows symlink-privilege failures (handler and intrinsic). The same failures reproduced on main; other packages passed.

Checklist:

  • A full round of testing has been completed, and there are no test failures as a result of these changes.
  • The changes are covered with functional and/or integration robot testing.
  • The changes work on all supported platforms.
  • Unit tests pass locally, as per the developer guide.
  • Robot tests pass locally, as per the developer guide.
  • Linter passes locally, as per the developer guide.

Variations

The full Robot and Go suites could not be fully green in this Windows environment because psql is unavailable and Go tests requiring symlink creation lack the required privilege. These failures are environmental; the affected Go package failures were reproduced on main. Targeted behavior tests, the MCP query subset, and CLI stderr regression tests passed. CI should confirm the full suites and supported platforms.

Tech Debt

No new technical debt identified. Reverse-proxy message availability is documented as a limitation of the current database/sql message channel.

jeffreyaven and others added 2 commits November 18, 2026 15:00
…ool results

Per-statement OutErrFile capture in the MCP backend (bounded, teed, attributed
via the per-statement handler context clone), surfaced as QueryResultDTO.Messages
and a labelled messages block in rendered text. Reverse-proxy backend returns
rows only (no message channel over database/sql). No engine, srv or CLI change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Robot scenarios: not-found lookup carries the provider 404 message in the
structured payload and rendered text; partial result carries the message
alongside resolved rows. 06-errors.md and run_select_query.md now say where
messages appear per backend.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jeffreyaven
jeffreyaven merged commit 1a8ab9d into main Nov 18, 2026
39 checks passed
@jeffreyaven
jeffreyaven deleted the mcp-provider-messages branch November 18, 2026 05:16
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