342: MSSQL: write-access check and startup warning (never blocks) #356
No reviewers
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills!356
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/issue-342/mssql-write-access-check-and-startup-warning-never"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
342: MSSQL: write-access check and startup warning (never blocks)
Implements 342.
Generated in 1m 05s.
Review findings
Review Findings — 342
Summary
I fixed both Medium findings.
WriteAccessResultis a discriminated union again, and the catch branch inindex.tsnow auditspermission_warningwithreason: "unverified"andrights: []. A new assertion in the existing throwing-check test covers that audit entry.node --testinextensions/mssqlpassed (211 passed, 0 failed). I left both Low findings unresolved. The README already documents the warning at "Write-access warning". It does not name theok/write-access/unverifiedstatuses, and I judged that unnecessary.Critical
High
Medium
WriteAccessResultis now a flat interface, so the type no longer tiesstatustorights. For example,{status: "ok", rights: ["INSERT"]}type-checks. The earlier discriminated union enforced that relationship. Suggested fix: restore a discriminated union, e.g.{status:"ok"; rights: []} | {status:"write-access"; rights: string[]} | {status:"unverified"; rights: []}. This keeps the uniformrightsaccess inindex.ts.checkWriteAccessprints a warning but never writes an audit entry. A normal "unverified" result is audited. The injected dependency is the only way to reach this branch, but the two paths should behave the same. Suggested fix: auditpermission_warningwithreason: "unverified"andrights: []in the catch branch, and add a test for it.Low
Number(row[right]) === 1with unexpected values such as"1"ortrue. Suggested fix: optionally add a case that pins the intended behaviour.ok/write-access/unverified). Suggested fix: confirm the README describes the startup warning, and add a short note if it doesn't.