Skip to content

test: prove the SQL Server MCP read path against a local SQL Server container #9878

Closed

Description

@kyle-sexton

Refs #5940. Slice 3 of 7. Blocked by #9849 (slice 2, the server). Runs in parallel with slice 4.

Problem

#5940's acceptance list requires tests that prove the safety requirements against a real SQL Server. Unit tests in slice 2 cannot.

Fix

Add an integration test script in the plugin that starts a local SQL Server Linux container (mcr.microsoft.com/mssql/server, Developer edition, no cost), creates a read-only principal and a second database, starts the server, and proves:

  • S1/S2: every write, DDL and session-state attempt through the read tool is refused, on every call;
  • S7: tools/list is identical before and after every tool call in the run;
  • S5: a registration confined to one database cannot reach the second;
  • S6: no secret appears in the plugin or registration config (scan the files the test wrote).

The script skips with a clear message and exit 0 when Docker is absent, and fails when Docker is present and a check fails.

Done when

  • On a Linux host with Docker, the integration script named in the plugin README exits 0 and prints one PASS line each for S1/S2, S5, S6 and S7
  • Without Docker, it exits 0 and prints a single SKIP: docker not available line
  • ci-status is green on the PR head

Activity

  1. added
    needs-triage
    on Oct 24, 2026
  2. github-actions commented on Oct 24, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision recorded. #11703 added the integration script, but its PR body says "The script was never executed", because the lane had no Docker and could not run node. The two run checks remain: both need node, and the first also needs Docker, so they are host work.

    • On a Linux host with Docker, the integration script named in the plugin README exits 0 and prints one PASS line each for S1/S2, S5, S6 and S7
    • Without Docker, it exits 0 and prints a single SKIP: docker not available line

    Source: #9878 (comment)

    This decision settles the open questions. The script exists, and the two remaining run checks need a host with node, plus Docker for the first. Those are host-run work, so I've asked nothing further. Neither #9849 nor #5940 is in the open-issue list, so I've listed no blocker.

    Automated triage, applied by the lanes App.

  3. added
    needs-human
    on Oct 24, 2026
  4. melodic-automation-lanes commented on Oct 24, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: confirmed; its comment says why.

  5. added
    needs-owner-decision
    and removed
    needs-triage
    on Oct 24, 2026
  6. removed
    needs-owner-decision
    needs-human
    on Oct 25, 2026
  7. kyle-sexton commented on Oct 25, 2026

    @kyle-sexton
    MemberAuthor

    Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.

    To hold this issue again, add needs-human (or status: needs-decision) and say why in a comment.

  8. added
    needs-triage
    on Oct 25, 2026
  9. 21 remaining items

  10. added
    status: confirmed
    and removed
    status: ready
    on Nov 1, 2026
  11. added
    host-run
    on Nov 1, 2026
  12. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. #11703 added the integration script, but its PR body says "The script was never executed", because the lane had no Docker and could not run node. The two run checks remain: both need node, and the first also needs Docker, so they are host work.

    • On a Linux host with Docker, the integration script named in the plugin README exits 0 and prints one PASS line each for S1/S2, S5, S6 and S7
    • Without Docker, it exits 0 and prints a single SKIP: docker not available line
  13. added
    needs-triage
    and removed
    status: confirmed
    needs-triage
    on Nov 1, 2026
  14. added
    status: ready
    status: confirmed
    and removed
    status: ready
    on Nov 1, 2026
  15. self-assigned this
    on Nov 1, 2026
  16. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor
    No description provided.
  17. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Claimed by host-run Lane 5 (melo-lap-001 WSL, Docker 29.9.2, node v24.21.0), 2026-11-01T14:49Z, on the hub's assignment. Running plugins/sql-server/integration/read-path.mjs at main bbdfcce with Docker, then without it, for the two remaining checks.

  18. kyle-sexton commented on Nov 1, 2026

    @kyle-sexton
    MemberAuthor

    Host run, Lane 5 (melo-lap-001 WSL, Docker 29.9.2, node v24.21.0), main bbdfcce. Both remaining checks from the decision record are met.

    With Docker: npm ci --prefix plugins/sql-server then node plugins/sql-server/integration/read-path.mjs. It exited 0 in 69 s (image pull included) and printed one PASS line each:

    • PASS: S1/S2 27 write, DDL and session-state attempts through query were each refused on both rounds (52 by the reject list, 2 by a permission refusal). Each of 18 writes sent past the reject list met a permission refusal. Data and schema are unchanged, every call ran with READ COMMITTED, XACT_ABORT ON and LOCK_TIMEOUT 4321, and no plugin session held a transaction between calls.
    • PASS: S5 the registration confined to app was refused the second database by the allow-list on every tool, and by the read-only login on three-part names.
    • PASS: S6 no password appears in the 39 plugin, config and registration files or in the server's output.
    • PASS: S7 tools/list returned the same tools (query, list_objects, describe_object) before and after each of 115 tool calls, with listChanged false.

    Without Docker: both cases printed the single line SKIP: docker not available and exited 0:

    • daemon unreachable (DOCKER_HOST pointed at a missing socket)
    • no docker binary on PATH

    The third done-when item, ci-status green on the PR head, was met when #11703 merged. Closing.

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

Metadata

Metadata

Assignees

Labels

host-runstatus: confirmed

Type

Fields

No fields configured for Task.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions