327: MSSQL: mssql_list_tables tool #351

Merged
david merged 2 commits from feature/issue-327/mssql-mssql-list-tables-tool into main 2026-11-11 00:21:13 +00:00
Owner

327: MSSQL: mssql_list_tables tool

Implements 327.

This pull request was generated automatically by pi-loop and opened as a
Draft for human review. Do not merge without reviewing the changes.

Generated in 49s.

Review findings

Apply edits, including the formatRows helper.# Review Findings — 327

Summary

I fixed the two Medium findings and two of the three Low findings. The LIST_TABLES_SQL export finding is left unresolved because the review allows keeping it as a deliberate regression pin. The MSSQL tests pass (146 tests, 145 pass, 0 fail, 1 todo). No build or lint gate exists, so none was run.

Critical

High

Medium

  • extensions/mssql/tools.test.ts:46 — The test name registers_bothTools is stale now that three tools are registered. Suggested fix: rename it to registers_allTools.
  • extensions/mssql/tools.ts:29 — The doc comment says guardedQuery is "the single guard → runner → audit path shared by both tools". That is now wrong, because there are three tools and mssql_list_tables uses runAndAudit and bypasses the guard. Suggested fix: reword the comment to say guardedQuery is the guarded path for user-supplied SQL and runAndAudit is the shared runner/audit path.

Low

  • extensions/mssql/tools.ts:73 — LIST_TABLES_SQL is exported but only the tests use it, and the test duplicates the literal SQL string. Suggested fix: keep the literal in the test as a deliberate regression pin, or drop the export if nothing else needs it.
  • extensions/mssql/tools.ts:123 — The truncation-note and JSON-formatting block duplicates the mssql_query handler. Suggested fix: extract a small formatRows(outcome, maxRows) helper.
  • extensions/mssql/README.md:3 — The README still says "Tools are not yet implemented". Suggested fix: update the status line to list the implemented tools, while noting that the extension is still unregistered in the manifest.
## 327: MSSQL: mssql_list_tables tool Implements [327](https://git.excelera.net/david/pi-extensions-and-skills/issues/327). > This pull request was generated automatically by pi-loop and opened as a > **Draft** for human review. Do not merge without reviewing the changes. Generated in 49s. ## Review findings Apply edits, including the formatRows helper.# Review Findings — 327 ## Summary I fixed the two Medium findings and two of the three Low findings. The `LIST_TABLES_SQL` export finding is left unresolved because the review allows keeping it as a deliberate regression pin. The MSSQL tests pass (146 tests, 145 pass, 0 fail, 1 todo). No build or lint gate exists, so none was run. ## Critical ## High ## Medium - [x] extensions/mssql/tools.test.ts:46 — The test name `registers_bothTools` is stale now that three tools are registered. Suggested fix: rename it to `registers_allTools`. - [x] extensions/mssql/tools.ts:29 — The doc comment says `guardedQuery` is "the single guard → runner → audit path shared by both tools". That is now wrong, because there are three tools and `mssql_list_tables` uses `runAndAudit` and bypasses the guard. Suggested fix: reword the comment to say `guardedQuery` is the guarded path for user-supplied SQL and `runAndAudit` is the shared runner/audit path. ## Low - [ ] extensions/mssql/tools.ts:73 — `LIST_TABLES_SQL` is exported but only the tests use it, and the test duplicates the literal SQL string. Suggested fix: keep the literal in the test as a deliberate regression pin, or drop the `export` if nothing else needs it. - [x] extensions/mssql/tools.ts:123 — The truncation-note and JSON-formatting block duplicates the `mssql_query` handler. Suggested fix: extract a small `formatRows(outcome, maxRows)` helper. - [x] extensions/mssql/README.md:3 — The README still says "Tools are not yet implemented". Suggested fix: update the status line to list the implemented tools, while noting that the extension is still unregistered in the manifest.
david merged commit b818b32c48 into main 2026-11-11 00:21:13 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
david/pi-extensions-and-skills!351
No description provided.