MSSQL spike: write RESULT.md, apply the gate, open the Stage 1 PR #318

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

Summary

Record the spike scores and dependency results in extensions/mssql/spike/RESULT.md, name a winner or record a stop, and open the Stage 1 PR.

Background

This is the Stage 1 gate. Pass rule: zero false accepts, then maximum accepts; no minimum accept rate. If neither candidate has zero false accepts, stop: do not start Stage 2, report to the repo owner, and the owner decides the next design (options named in the design: Microsoft ScriptDOM through a .NET helper, a custom tokenizer on the best parser, or another design). Stage 2 issues (milestones M4 to M8) are blocked until this gate passes. Zero false accepts on a finite corpus does not prove the parser is safe ([SECURITY RISK]); RESULT.md must say so.

Depends on: #317

Implementation Details

  1. Run node extensions/mssql/spike/run.mjs from a clean checkout and paste the scores (false accepts with labels, accepts, rejected-accepts) into extensions/mssql/spike/RESULT.md.
  2. Include the dependency check results (link to dependency-check.md) and the CI test coverage finding.
  3. State the winner, or STOP with the reason. Add a "Residual risk" paragraph: a finite corpus cannot prove safety; the parser is the only write block; recommend a read-only database login ([BEST PRACTICE]).
  4. Open the Stage 1 PR. Follow AGENTS.md: branch feature/issue-<N>/<slug>, commits issue-<N>: <summary>, PR title issue-<N>: <title>, body Closes #<N>. Do not merge: ask the repo owner. Do not register anything in the root package.json.
  5. If the result is STOP, comment on the Stage 2 issues (M4 to M8) and tell the owner; do not start them.

Acceptance Criteria

  • RESULT.md has scores for both candidates, with false-accept labels listed.
  • RESULT.md names a winner with zero false accepts, or records the STOP.
  • RESULT.md includes dependency check results and the residual-risk paragraph.
  • The runner runs from a clean checkout.
  • The Stage 1 PR is open, closes this issue, and is not merged by the agent.

Test Plan

Clone fresh, install the documented spike deps, run node extensions/mssql/spike/run.mjs, and confirm the numbers in RESULT.md match the output.

## Summary Record the spike scores and dependency results in `extensions/mssql/spike/RESULT.md`, name a winner or record a stop, and open the Stage 1 PR. ## Background This is the Stage 1 gate. Pass rule: zero false accepts, then maximum accepts; no minimum accept rate. **If neither candidate has zero false accepts, stop: do not start Stage 2, report to the repo owner, and the owner decides the next design** (options named in the design: Microsoft ScriptDOM through a .NET helper, a custom tokenizer on the best parser, or another design). Stage 2 issues (milestones M4 to M8) are blocked until this gate passes. Zero false accepts on a finite corpus does not prove the parser is safe ([SECURITY RISK]); `RESULT.md` must say so. **Depends on:** #317 ## Implementation Details 1. Run `node extensions/mssql/spike/run.mjs` from a clean checkout and paste the scores (false accepts with labels, accepts, rejected-accepts) into `extensions/mssql/spike/RESULT.md`. 2. Include the dependency check results (link to `dependency-check.md`) and the CI test coverage finding. 3. State the winner, or `STOP` with the reason. Add a "Residual risk" paragraph: a finite corpus cannot prove safety; the parser is the only write block; recommend a read-only database login ([BEST PRACTICE]). 4. Open the Stage 1 PR. Follow `AGENTS.md`: branch `feature/issue-<N>/<slug>`, commits `issue-<N>: <summary>`, PR title `issue-<N>: <title>`, body `Closes #<N>`. Do not merge: ask the repo owner. Do not register anything in the root `package.json`. 5. If the result is STOP, comment on the Stage 2 issues (M4 to M8) and tell the owner; do not start them. ## Acceptance Criteria - [ ] `RESULT.md` has scores for both candidates, with false-accept labels listed. - [ ] `RESULT.md` names a winner with zero false accepts, or records the STOP. - [ ] `RESULT.md` includes dependency check results and the residual-risk paragraph. - [ ] The runner runs from a clean checkout. - [ ] The Stage 1 PR is open, closes this issue, and is not merged by the agent. ## Test Plan Clone fresh, install the documented spike deps, run `node extensions/mssql/spike/run.mjs`, and confirm the numbers in `RESULT.md` match the output.
david closed this issue 2026-11-10 23:12:40 +00:00
Author
Owner

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

pi-loop opened and merged a pull request for this issue: https://git.excelera.net/david/pi-extensions-and-skills/pulls/340
Author
Owner

Outcome note: gate resolved as STOP, superseded by ADR 0002

Spike result: neither candidate reached zero false accepts, so the Stage 1 gate stopped the parser-based design. See extensions/mssql/spike/RESULT.md.

Candidate False accepts Accepts
A: node-sql-parser 5.4.0 3 55 / 60
B: ANTLR4 T-SQL grammar 2 60 / 60

Follow-up decision: docs/adr/0002-mssql-read-only-credentials-with-minimal-guard.md (merged in #341).

  • Read-only database credentials are the write control.
  • The guard is a minimal, dependency-free accident check. It is not a security boundary, and it adds no parser, Java or .NET dependency.
  • A startup check warns when the login appears to have write access. It never blocks.

Docs updated in #341: extensions/mssql/docs/DESIGN.md and extensions/mssql/docs/IMPLEMENTATION_PLAN.md.

Stage 2 tracker changes:

Stage 2 is unblocked. The spike directory stays as a record. Removing its generated grammar output is an open item in DESIGN.md.

## Outcome note: gate resolved as STOP, superseded by ADR 0002 **Spike result:** neither candidate reached zero false accepts, so the Stage 1 gate stopped the parser-based design. See `extensions/mssql/spike/RESULT.md`. | Candidate | False accepts | Accepts | | --- | --- | --- | | A: `node-sql-parser` 5.4.0 | 3 | 55 / 60 | | B: ANTLR4 T-SQL grammar | 2 | 60 / 60 | **Follow-up decision:** `docs/adr/0002-mssql-read-only-credentials-with-minimal-guard.md` (merged in #341). - Read-only database credentials are the write control. - The guard is a minimal, dependency-free accident check. It is not a security boundary, and it adds no parser, Java or .NET dependency. - A startup check warns when the login appears to have write access. It never blocks. **Docs updated in #341:** `extensions/mssql/docs/DESIGN.md` and `extensions/mssql/docs/IMPLEMENTATION_PLAN.md`. **Stage 2 tracker changes:** - New issue #342 covers the write-access check and warning. - Issues #319, #322, #323, #329 and #331 were rewritten to match the ADR. - Issues #320, #321, #324, #325, #326, #327, #328 and #330 have a comment saying the "blocked until the gate passes" note is superseded. Stage 2 is unblocked. The spike directory stays as a record. Removing its generated grammar output is an open item in `DESIGN.md`.
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#318
No description provided.