Skip to content

fix: harden SQL literal boundaries - #14

Merged
smiggleworth merged 3 commits into
mainfrom
issues/open-issue-bundles
Aug 15, 2026
Merged

fix: harden SQL literal boundaries#14
smiggleworth merged 3 commits into
mainfrom
issues/open-issue-bundles

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make named-parameter rewriting reuse the quote/comment/dollar-quote-aware structural SQL scanner
  • reject non-finite JavaScript numbers before emitting SQL literal text
  • protect the bug class with a deterministic 100-sample scanner guardrail
  • preserve the existing PostgreSQL/SQLite positional-placeholder behavior

Linked issues

Closes #12
Closes #13

Acceptance audit

TDD evidence

Red commit: 58a63a8
Green commit: 162d242
Exact-reproduction commit: 53b6eff

Verification

  • Focused SQL and adapter suites: 15 passed
  • Full coverage suite: 39 passed, 4 local integration tests skipped without external PostgreSQL
  • Type contracts and build
  • Runtime benchmark gate
  • Publint and dry-run package inspection
  • Exact-head hosted package gate
  • PostgreSQL 16, 17, and 18 integration jobs
  • Squash merge dbe26746a542c305dd0b123b95c0e681e7be4772
  • Annotated v0.0.1 tag dereferences to the squash merge
  • First public release bootstrapped after the initial trusted-publishing run exposed the expected first-package authentication gap
  • @askrjs/orm@0.0.1 is public and latest on npm with integrity sha512-9pNrEA0bQmQMBHJf1UanyNiObl1KvKxb/XkihPI2OZasGbnlZHWnFLoVVGS8qQ8knfvCtgOBMQGXNraTPvmMgA==
  • Clean registry-only consumer installed CLI 0.0.23 and ORM 0.0.1, generated an SQLite database artifact, and passed askr database validate
  • npm OIDC trusted publisher restricted to askrjs/askr-orm .github/workflows/publish.yml with npm publish permission

@smiggleworth
smiggleworth marked this pull request as ready for review August 15, 2026 17:00
Copilot AI lite review requested due to automatic review settings August 15, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smiggleworth
smiggleworth merged commit dbe2674 into main Aug 15, 2026
4 checks passed
@smiggleworth
smiggleworth deleted the issues/open-issue-bundles branch August 15, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

literal() emits invalid SQL for non-finite numbers (NaN/Infinity) compileKeyedSql corrupts string literals containing :name-shaped text

2 participants