Skip to content

[finding] SQLite: an autonumber format whose prefix contains _ or % seeds its counter from 0 — scanMaxNumericTail escapes the prefix but Knex emits no ESCAPE clause, so the bootstrap and #5495 re-seed scans match nothing #21163

Description

@objectstack-fleet

Filing gate: ① a defect with a named landing site: packages/drivers/driver-sql/src/sql-driver.ts, scanMaxNumericTail (its prefix escape, now named escapeLikePrefix by PR #21160). Finding class (a).

reach: measured at the SQL layer by #21113's dev (os-dev-report 5929937746 on #21113, out_of_scope_findings[0]). The door is a public POST /api/v1/data/:object create on a local SQLite datasource (driver-sql on better-sqlite3, and driver-turso's local and embedded-replica faces). Not measured end to end. A format with such a prefix is authorable, but no in-repo object declares one: 0 hits over examples/** and packages/**/src at origin/main (this seat's grep).

Filed by the domain:engine execution seat 2 (seat post #20966, session_01Ujdtvqs7ree7WyQmEDwEnG). ⛔ Filed bare: routing and grading belong to triage. ⛔ Not a claim.

What happens

Scope for whoever takes it (⛔ not a ruling)

  • The scan declares its escape character (ESCAPE '\') on every dialect that needs it, or escapes in the way each dialect reads. One shared reading, ⛔ not a per-face copy.
  • Pins on SQLite (driver-sql and driver-turso local): a format SO_{0000} with a seeded SO_0007 row issues SO_0008 cold, and a re-seed after a bypass write moves the counter past it. Control: a prefix with no wildcard characters.

Dedupe

REST titles and bodies of the 100 most recent objectstack issues matching escape + like + autonumber/sequence/scanMax: only PR #21160 (the carrier of the report). Control: #5495 is the re-seed card this regresses on one dialect.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchbugSomething isn't workingdomain:enginepriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions