MSSQL: register extension, add tests to root test script, add root README entry #330

Closed
opened 2026-11-10 08:22:02 +00:00 by david · 2 comments
Owner

Summary

Register the extension in the root package.json, add the mssql test files to the root test script, and add an entry to the root README.md extension list.

Background

The root package.json has pi.extensions (a list of entry files such as extensions/postgres/index.ts) and a single test script that runs node --test over explicit file paths; the postgres tests are not in it today, so mssql tests will only run in CI if listed there. The root README.md has an extensions table (a row like | postgres | Postgres client tools (...) |), a requirements list, a per-extension notes list and a directory tree. Blocked until the Stage 1 gate (#318) passes. Do not run live SQL Server tests (none exist).

Depends on: #329

Implementation Details

  1. Add "extensions/mssql/index.ts" to pi.extensions in package.json.
  2. Append the mssql test globs to the test script, e.g. extensions/mssql/*.test.ts, keeping the existing entries unchanged.
  3. Root README.md: add a table row (mssql | read-only SQL Server tools (mssql, T-SQL parser guard)), a requirements bullet (a reachable SQL Server and MSSQL_URL in .env), a notes bullet linking extensions/mssql/README.md, and the mssql/ line in the directory tree.
  4. Run npm test and confirm the mssql tests run and pass alongside the existing ones.

Acceptance Criteria

  • extensions/mssql/index.ts is in pi.extensions.
  • The root test script includes the mssql test files and existing entries are unchanged.
  • Root README.md lists mssql in the table, requirements, notes and directory tree.
  • npm test runs all mssql tests and passes.
  • No other extension's configuration is changed.

Test Plan

Run npm test and check the output lists the mssql test files and all pass. Run node -e "console.log(require('./package.json').pi.extensions.includes('extensions/mssql/index.ts'))" and expect true.

## Summary Register the extension in the root `package.json`, add the mssql test files to the root `test` script, and add an entry to the root `README.md` extension list. ## Background The root `package.json` has `pi.extensions` (a list of entry files such as `extensions/postgres/index.ts`) and a single `test` script that runs `node --test` over explicit file paths; the postgres tests are not in it today, so mssql tests will only run in CI if listed there. The root `README.md` has an extensions table (a row like `| postgres | Postgres client tools (...) |`), a requirements list, a per-extension notes list and a directory tree. **Blocked until the Stage 1 gate (#318) passes.** Do not run live SQL Server tests (none exist). **Depends on:** #329 ## Implementation Details 1. Add `"extensions/mssql/index.ts"` to `pi.extensions` in `package.json`. 2. Append the mssql test globs to the `test` script, e.g. `extensions/mssql/*.test.ts`, keeping the existing entries unchanged. 3. Root `README.md`: add a table row (`mssql` | read-only SQL Server tools (`mssql`, T-SQL parser guard)), a requirements bullet (a reachable SQL Server and `MSSQL_URL` in `.env`), a notes bullet linking `extensions/mssql/README.md`, and the `mssql/` line in the directory tree. 4. Run `npm test` and confirm the mssql tests run and pass alongside the existing ones. ## Acceptance Criteria - [ ] `extensions/mssql/index.ts` is in `pi.extensions`. - [ ] The root `test` script includes the mssql test files and existing entries are unchanged. - [ ] Root `README.md` lists mssql in the table, requirements, notes and directory tree. - [ ] `npm test` runs all mssql tests and passes. - [ ] No other extension's configuration is changed. ## Test Plan Run `npm test` and check the output lists the mssql test files and all pass. Run `node -e "console.log(require('./package.json').pi.extensions.includes('extensions/mssql/index.ts'))"` and expect `true`.
Author
Owner

Update: the "Blocked until the Stage 1 gate (#318) passes" note is superseded. The gate resolved as STOP, and docs/adr/0002-mssql-read-only-credentials-with-minimal-guard.md replaced the parser design with read-only credentials, a minimal guard and a write-access warning. Stage 2 is unblocked. Scope is unchanged. Add the new test files from this stage (guard, permissions, audit and others) to the root test script, including permissions.test.ts from #342. Describe the extension in the root README as querying SQL Server and expecting a read-only login, not as read-only by itself.

Update: the "Blocked until the Stage 1 gate (#318) passes" note is superseded. The gate resolved as STOP, and `docs/adr/0002-mssql-read-only-credentials-with-minimal-guard.md` replaced the parser design with read-only credentials, a minimal guard and a write-access warning. Stage 2 is unblocked. Scope is unchanged. Add the new test files from this stage (guard, permissions, audit and others) to the root `test` script, including `permissions.test.ts` from #342. Describe the extension in the root README as querying SQL Server and expecting a read-only login, not as read-only by itself.
david closed this issue 2026-11-11 00:44:11 +00:00
Author
Owner

pi-loop opened and merged a pull request for this issue: #354

pi-loop opened and merged a pull request for this issue: https://git.excelera.net/david/pi-extensions-and-skills/pulls/354
Sign in to join this conversation.
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#330
No description provided.