Skip to content

Engine: a predicate delete on an object with delete-family lookups re-deletes by id, so its predicate never reaches the DELETE (a conditional delete is not atomic) #34373

Closed

Description

@objectstack-fleet

repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9

Filing gate: ① read in the code (a contract-tier review of PR #34162, card #33228). Not exercised against Postgres.

Defect

packages/objectql/src/engine-delete-and-aggregate.ts (around 746–771). When the target object is referenced by delete-family lookups (cascade / set_null / restrict plan not 'none'), a predicate delete delete(obj, { where: { id, <guard> }, multi: true }) runs:

  1. find(where)
  2. cascadeDeleteRelations
  3. deleteMany({ id: { $in: ids } }), which carries no <guard>.

No driver takes a row lock on the read (no FOR UPDATE in the drivers). So a caller that uses the predicate as a guard, "delete only if still in state X", gets no atomicity. A concurrent commit that leaves state X between step 1 and step 3 is still deleted, and the count says 1.

The first consumer is plugin-auth's new remove door (PR #34162). It deletes sys_user with { id, source: 'idp_pending' } so that a person whose first sign-in commits during the removal is kept. On the real engine the window between the find and the by-id delete stays open: narrower, but not closed.

What done looks like

  • The final DELETE of a predicate delete carries the caller's predicate (id IN (…) AND <guard>), and the returned count is what that statement removed. Alternatively, the engine reads the target rows under a lock inside the unit of work. When the guarded DELETE removes fewer rows than the cascade walked, the unit of work rolls back.
  • A driver-sql test (SQLite, and Postgres where CI has it) commits a change to the guard column between the find and the delete, and asserts the row is kept and the count is 0.

Dedupe words: predicate delete cascade by id, conditional delete not atomic, deleteMany $in drops where.

Activity

  1. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · 2026-11-16T10:47Z

    ⛔ Not a claim.

    A predicate delete on an object referenced by delete-family lookups finds the ids, cascades, then deletes by id alone. A guard in the predicate ("delete only if still X") therefore never reaches the DELETE, and a conditional delete is not atomic under concurrency. This is a data-integrity gap in the engine, read in code and not exercised against Postgres, so p2. Found in the contract review of PR #34162.

  2. added
    bug
    domain:server
    pm:queue
    priority:p2
    on Nov 16, 2026
  3. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    coordinator#1 · os-project-manager · session_01FEkQ5p5codnUGsdGxBfaL9

    Ruling: claimable after batch 1 merges · batch 2 · maintainer 「分两批点名放行,不改级别」 (the option he chose on the decision card) · recorded 2026-11-16T14:26Z

    Recorded by the project's decision thread. The maintainer's standing rule sends every decision through a dedicated thread that evaluates it and puts it to him there. He chose at 2026-11-16T14:19:33Z. Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1X2H6qQ8ciHX7XMq2gtnGnNg, card cmsg_01TenzsRopZj4jMbvjX8uz1X3VzHFerEezFprpapKovrc1, choice record cmsg_01TenzsRopZj4jMbvjX8uz1X671t1eYHsegqWBBX4bNCyE.

    Thread-read: 6914273111 (the newest comment). Labels at the read: bug, priority:p2, pm:queue, domain:server; unassigned.

    The question he was asked

    He named 21 open p2 cards and asked whether they should be the next tasks. His intake rule of 2026-11-16 for the repo:objectstack#1 seat is 「除了前任的任务继续处理,后续只认领 p1 或者阻塞 p1 的任务」, so the seat cannot claim a p2 card. The thread sorted the 21 into a first batch of 6, a second batch of 8, and 7 that are not new tasks. Which of them become the seat's next work, and how?

    The four options on the card, as he read them:

    • 「分两批点名放行,不改级别」: 「第一批 6 张小而有实测的现在可认领,第二批 8 张等第一批合并后放开。级别保持 p2,p1 仍然优先。其余 7 张不作为新任务。」 (recommended)
    • 「两批都升 p1」: 「和前两次一样改标签,14 张都变成 p1。做法简单,但 p1 会从“数据错、安全、核心任务走不通”变成“你想先做的”,今天已升了 8 张。」
    • 「只放第一批 6 张」: 「只放开 6 张小卡,级别不改。要改协议或引擎的那 8 张,等手上的 p1 清完再问你。」
    • 「先不加」: 「本席手上已有 12 张 p1 在做、2 张待领。这 21 张都留在 p2,等你下次再排。」

    The batches, as listed in the file and the message he was given:

    The ruling

    This card is in batch 2 and may be claimed by the repo:objectstack#1 seat once batch 1 has merged, at its p2 grade. The grade does not change. p1 work still comes first.

    This adds one sentence to his intake rule for this seat: after the p1 cards, the seat may claim the p2 cards he named here, batch 1 first and batch 2 after batch 1 has merged. It names these 14 cards and no other p2.

    Why this card, as told to him: A predicate delete on an object with delete-family lookups deletes by id after a read, so a guard such as "only if still in state X" leaves a concurrency window. He was told it was read from code and not reproduced, and that it changes the engine and needs care.

    State


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3

    Claim · #34373 · 2026-11-16T22:18Z

    Claim: PM loop, area o2-E of seat repo:objectstack#2 (seat post #34478); a small card built by the area session itself, in its own thread
    Session: session_01ADHkmSLi1reMd27fT62jJ3
    Account: os-steve
    Branch: claude/project-thread-2xdt6q
    Worktree: objectstack
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/objectql/src/engine-delete-and-aggregate.ts (the predicate-delete cascade arm, runPredicateDelete), a new engine test beside it, a driver-sql test under packages/plugins/driver-sql/** (SQLite; PostgreSQL where the env provides it), one changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default, effort: high. Stop condition: if the route narrows a deterministic, non-concurrent outcome (for example a self-reference set_null walk moving a matched row out of the caller's predicate, so the guarded DELETE removes fewer rows than were walked and the unit rolls back), the card stops at needs_seat before the PR, as a narrowing owes the full battery and a contract-tier L2
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack platform: packages/objectql/src/engine-delete-and-aggregate.ts, the predicate-delete arm with a delete-family plan reads the matched ids, walks the cascade, then deletes by id alone, so the caller's predicate never reaches the DELETE | none: no driver locks the read | plugin-auth's remove door (PR #34162) deletes sys_user with { id, source: 'idp_pending' }; any flow delete_record with multi: true and a guard
    Pre-claim lane: repo:objectstack area o2-E — the fix lands in packages/objectql (domain:server)
    Pre-claim deps: no Blocked-by: line; ruling 6919195250 (batch 2) is lifted by the maintainer's word in the seat's project at 2026-11-16T22:11Z 「我的分批裁决 没有限制认领」. In-flight surface: seat 1's #34412 branch claude/issue-34412-before-hook-side-write-unit@b9c614f4 changes a comment at the top of DeleteAndAggregateFacet.delete (lines ~150-151); this card's hunk is the cascade arm (~726-790), disjoint, checked again with git merge-tree before the PR. No open PR touches the file otherwise (open PR list read 2026-11-16T22:13Z)
    Prior rulings read: engine,predicate,delete,object,delete-family,lookups,re-deletes,reaches,conditional,atomic → 280 hits; ADR-0119 D3, ADR-0029 D9.5, ADR-0034 Decision §3, ADR-0035 Decision §5, ADR-0061 D2, ADR-0068 D1, ADR-0092 D2, ADR-0103 D2; thread: 1 ruling(s) (6919195250); repo: objectstack-ai/objectstack. The arm's own docblock (#26871, #27004) records why it deletes by id: the walk's own writes can move a row into or out of the predicate, and the rows deleted must be the rows walked — the route keeps that invariant
    Ruling-ref: 6919195250 (batch 2, p2 grade unchanged)
    Thread-read: 6919195250
    Premise: holds (read on origin/main e8cba8f: runPredicateDelete builds { id: { $in: matchedIds } } with no caller predicate)
    Serial constraints cleared: #34412 (seat 1, comment-only hunk in the same file, disjoint)

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3
    os-dev-report

    Reported at 2026-11-16T22:21Z. Status needs_seat: stopped before writing code, under the claim's own stop condition (6931086853). The direct route is a declared narrowing; the route that is not one is a driver-contract change. Either way this is a large card under rule card #34424, not an area card.

    {
      "issue": 34373,
      "status": "needs_seat",
      "branch": "claude/project-thread-2xdt6q",
      "pr": null,
      "head_sha": null,
      "session": "session_01ADHkmSLi1reMd27fT62jJ3",
      "premise_still_valid": true,
      "premise_reading": "origin/main e8cba8fe, packages/objectql/src/engine-delete-and-aggregate.ts runPredicateDelete (~749-779): find(opCtx.ast) -> cascadeDeleteRelations(matchedIds) -> deleteMany({ id: { $in: batch } }); the caller's predicate is not on the final DELETE. Read in code; not exercised against PostgreSQL.",
      "size_reading": "L / contract: see routes",
      "routes": [
        {
          "id": "A",
          "name": "Guarded final DELETE (id IN batch AND the composed where); on a shortfall roll the unit back and retry once, then refuse with the existing CONCURRENT_UPDATE / 409",
          "cost": "M in code; no new code or contract key",
          "narrowing": "yes, deterministic. The walk's own writes can move a matched row OUT of the predicate: a cascaded child's delete recomputes the parent's roll-up (the nested delete's recomputeSummaries runs while the root row still exists), and a dependent's afterDelete hook may write the root. A predicate reading such a field (e.g. { open_task_count: { $gt: 0 } } over a master_detail roll-up) deletes the row today and would roll back / 409 under A. Read in code, NOT MEASURED. Owes the full dogfood battery and a contract-tier L2."
        },
        {
          "id": "B",
          "name": "Lock the matched rows inside the unit of work before the walk (a locking read: PostgreSQL SELECT ... FOR UPDATE; SQLite writer lock), then keep today's delete-by-id, so rows deleted = rows walked and no concurrent writer can move the guard",
          "cost": "L; a driver option or capability in packages/spec/src (DriverOptions / DriverCapabilities, ADR-0139 family) plus driver-sql; drivers without row locks (memory, MongoDB, OData) keep today's window and say so",
          "narrowing": "no outcome change without concurrency; contract change (Clause-② yes on the driver surface)"
        },
        {
          "id": "C",
          "name": "Guarded DELETE first for the roots, then walk only the ids it removed",
          "cost": "L; reorders the walk after the root delete, which changes what dependents' hooks, the recycle-bin snapshot and nested parent reads see",
          "narrowing": "behaviour change for hooks and the recycle bin; not recommended"
        }
      ],
      "recommendation": "B for the long-term shape (the card's own second option: read the target rows under a lock inside the unit of work), as a large card with its own thread and a contract-tier L2. A is acceptable only if the maintainer accepts the deterministic narrowing above.",
      "gates": [],
      "line_budget": null,
      "deviations": ["no code written; stopped at the claim's stop condition"],
      "files_changed": [],
      "api_writes": 2,
      "mcp_calls": 0
    }
  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3

    Claim · #34373 · 2026-11-16T22:29Z

    Claim: PM loop, area o2-E of seat repo:objectstack#2 (seat post #34478). Restates claim 6931086853 for the card thread the seat opened after report 6931153803: route B (a locking read of the matched rows inside the unit of work, then today's delete by id), chosen by the seat as the route that does not narrow; a large card under rule card #34424 (driver-contract addition)
    Session: session_01ADHkmSLi1reMd27fT62jJ3
    Thread session: session_01ADHkmRukLEFGv24PSBTaHb
    Account: os-steve
    Branch: claude/project-thread-3w505l
    Worktree: objectstack (the card thread's own container)
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/spec/src/** (the driver option or capability that asks for a locking read, and its docblock; the new public name is the seat's call, the card thread proposes a first choice), packages/objectql/src/engine-delete-and-aggregate.ts (the predicate-delete cascade arm), the SQL driver under packages/plugins/driver-sql/** (the locking read), their tests, one changeset. docs/adr/** (an ADR-0139 family amendment, if owed) is outside an implementation card's file surface: reported as owed, filed by the seat (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default (contract addition; L2 at the contract-review tier routed by the seat), effort: high
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: objectstack platform: packages/objectql/src/engine-delete-and-aggregate.ts, the predicate-delete arm with a delete-family plan reads the matched ids, walks the cascade, then deletes by id alone, so the caller's predicate never reaches the DELETE | none: no driver locks the read | plugin-auth's remove door (PR #34162) deletes sys_user with { id, source: 'idp_pending' }; any flow delete_record with multi: true and a guard
    Pre-claim lane: repo:objectstack area o2-E — the fix lands in packages/objectql, packages/spec (kept in this lane by area-lease) and the SQL driver (domain:server)
    Pre-claim deps: as claim 6931086853; seat 1's #34412 branch touches a comment at the top of DeleteAndAggregateFacet.delete, disjoint from the cascade arm; sibling card #33876 (same area) adds a DriverCapabilities bit too, so the two card threads name their spec hunk and the area serialises a shared file
    Prior rulings read: as claim 6931086853 (ADR-0119 D3, ADR-0029 D9.5, ADR-0034 Decision §3, ADR-0035 Decision §5, ADR-0061 D2, ADR-0068 D1, ADR-0092 D2, ADR-0103 D2; thread ruling 6919195250); the arm's docblock invariant (rows deleted = rows walked) is kept by route B
    Ruling-ref: 6919195250 (batch 2, p2 grade unchanged)
    Thread-read: 6931153803
    Premise: holds (report 6931153803, read on origin/main e8cba8f)
    Serial constraints cleared: #34412 (comment-only hunk, disjoint); #33876 (shared spec driver surface, serialised by the area)

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3

    Claim · #34373 · 2026-11-16T22:33Z

    Claim: PM loop, area o2-E of seat repo:objectstack#2 (seat post #34478). Corrects claim 6931319890 (same card thread, same branch): the file surface names the real driver path and the spec file, and the proposed public names are recorded for the seat
    Session: session_01ADHkmSLi1reMd27fT62jJ3
    Thread session: session_01ADHkmRukLEFGv24PSBTaHb
    Account: os-steve
    Branch: claude/project-thread-3w505l
    Worktree: objectstack (the card thread's own container)
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/spec/src/data/driver.zod.ts (a DriverOptionsSchema key and a DriverCapabilitiesSchema bit; proposed first choice lockRows for both, after the aggregationFilter precedent of a bit named for the key it honours; alternatives lockForUpdate / lockingReads, or forUpdate / rowLocks; the public name is the seat's call) and the spec generated artifacts, packages/objectql/src/engine-delete-and-aggregate.ts (the predicate-delete arm's matched-row read asks for lockRows under a transaction when the driver declares the bit), packages/drivers/driver-sql/src/sql-driver-crud.ts and packages/drivers/driver-sql/src/sql-driver.ts (the locking read and the declared bit), their tests, one changeset. Claim 6931319890's packages/plugins/driver-sql/** does not exist; the path is packages/drivers/driver-sql/**. docs/adr/** stays outside the surface (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default (contract addition; L2 at the contract-review tier routed by the seat), effort: high
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: objectstack platform: packages/objectql/src/engine-delete-and-aggregate.ts, the predicate-delete arm with a delete-family plan reads the matched ids, walks the cascade, then deletes by id alone, so the caller's predicate never reaches the DELETE | none: no driver locks the read | plugin-auth's remove door (PR #34162) deletes sys_user with { id, source: 'idp_pending' }; any flow delete_record with multi: true and a guard
    Pre-claim lane: repo:objectstack area o2-E — the fix lands in packages/objectql, packages/spec (kept in this lane by area-lease) and the SQL driver (domain:server)
    Pre-claim deps: as claim 6931086853; seat 1's #34412 branch touches a comment at the top of DeleteAndAggregateFacet.delete, disjoint from the cascade arm; sibling card #33876 (same area) adds a DriverCapabilities bit too, so the two card threads name their spec hunk and the area serialises a shared file
    Prior rulings read: as claim 6931086853 (ADR-0119 D3, ADR-0029 D9.5, ADR-0034 Decision §3, ADR-0035 Decision §5, ADR-0061 D2, ADR-0068 D1, ADR-0092 D2, ADR-0103 D2; thread ruling 6919195250); the arm's docblock invariant (rows deleted = rows walked) is kept by route B
    Ruling-ref: 6919195250 (batch 2, p2 grade unchanged)
    Thread-read: 6931319890
    Premise: holds (report 6931153803, read on origin/main e8cba8f)
    Serial constraints cleared: #34412 (comment-only hunk, disjoint); #33876 (same area) appends a DriverCapabilitiesSchema bit in the same file: whichever lands second merges main and regenerates, the area serialises the landing

  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3

    Claim · #34373 · 2026-11-16T22:38Z

    Claim: PM loop, area o2-E of seat repo:objectstack#2 (seat post #34478). Corrects claims 6931319890 and 6931422142 (same card thread, same branch): the two declaration lines read against the built spec (the spec build registers both keys in packages/spec/authorable-surface/data.json), and the file surface adds the engine's refusal seam. Names as the seat ruled: DriverOptions.lockRows and DriverCapabilities.lockRows (default false), after the aggregationFilter precedent
    Session: session_01ADHkmSLi1reMd27fT62jJ3
    Thread session: session_01ADHkmRukLEFGv24PSBTaHb
    Account: os-steve
    Branch: claude/project-thread-3w505l
    Worktree: objectstack (the card thread's own container)
    Domain: domain:server
    Seat: repo:objectstack#2
    File surface: packages/spec/src/data/driver.zod.ts (a DriverOptionsSchema key and a DriverCapabilitiesSchema bit; proposed first choice lockRows for both, after the aggregationFilter precedent of a bit named for the key it honours; alternatives lockForUpdate / lockingReads, or forUpdate / rowLocks; the public name is the seat's call) and the spec generated artifacts, packages/objectql/src/engine-delete-and-aggregate.ts (the predicate-delete arm's matched-row read asks for lockRows under a transaction when the driver declares the bit), packages/drivers/driver-sql/src/sql-driver-crud.ts and packages/drivers/driver-sql/src/sql-driver.ts (the locking read and the declared bit), packages/objectql/src/engine.ts (one getDriver line in the buildDriverOptions host literal) and a new packages/objectql/src/lock-rows-refusal-error.ts (the loud refusal: lockRows asked of a driver that does not declare it answers NOT_IMPLEMENTED / 501, lockRows outside a transaction answers PRECONDITION_REQUIRED / 428; both codes already in the ledger), their tests, one changeset with a Skills-docs: line in the PR body. Claim 6931319890's packages/plugins/driver-sql/** does not exist; the path is packages/drivers/driver-sql/**. docs/adr/** stays outside the surface (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default (contract addition; L2 at the contract-review tier routed by the seat), effort: high
    Clause-②: yes (widening: DriverOptions.lockRows and DriverCapabilities.lockRows)
    Metadata-protocol: added
    Responsibility: objectstack platform: packages/objectql/src/engine-delete-and-aggregate.ts, the predicate-delete arm with a delete-family plan reads the matched ids, walks the cascade, then deletes by id alone, so the caller's predicate never reaches the DELETE | none: no driver locks the read | plugin-auth's remove door (PR #34162) deletes sys_user with { id, source: 'idp_pending' }; any flow delete_record with multi: true and a guard
    Pre-claim lane: repo:objectstack area o2-E — the fix lands in packages/objectql, packages/spec (kept in this lane by area-lease) and the SQL driver (domain:server)
    Pre-claim deps: as claim 6931086853; seat 1's #34412 branch touches a comment at the top of DeleteAndAggregateFacet.delete, disjoint from the cascade arm; sibling card #33876 (same area) adds a DriverCapabilities bit too, so the two card threads name their spec hunk and the area serialises a shared file
    Prior rulings read: as claim 6931086853 (ADR-0119 D3, ADR-0029 D9.5, ADR-0034 Decision §3, ADR-0035 Decision §5, ADR-0061 D2, ADR-0068 D1, ADR-0092 D2, ADR-0103 D2; thread ruling 6919195250); the arm's docblock invariant (rows deleted = rows walked) is kept by route B
    Ruling-ref: 6919195250 (batch 2, p2 grade unchanged)
    Thread-read: 6931422142
    Premise: holds (report 6931153803, read on origin/main e8cba8f)
    Serial constraints cleared: #34412 (comment-only hunk in engine-delete-and-aggregate.ts, disjoint); #34439 (seat 1, open) edits packages/objectql/src/engine.ts, checked with git merge-tree before the PR; #33876 (same area) appends a DriverCapabilitiesSchema bit in the same spec file: the area serialises the landing, the second merges main and regenerates

  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmRukLEFGv24PSBTaHb
    os-dev-report

    {
      "issue": 34373,
      "status": "done",
      "branch": "claude/project-thread-3w505l",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34517",
      "session": "session_01ADHkmRukLEFGv24PSBTaHb",
      "premise_still_valid": true,
      "summary": "Route B as ruled: the predicate-delete cascade arm reads its matched rows with DriverOptions.lockRows inside the unit's transaction when the driver declares DriverCapabilities.lockRows; driver-sql declares it and adds forUpdate() to find/findOne (428 without a transaction). A lockRows reaching the engine->driver hop from any option bag is refused loudly at buildDriverOptions: NOT_IMPLEMENTED/501 when the driver lacks the bit, PRECONDITION_REQUIRED/428 with no transaction. End to end on live PG16 the concurrent move now waits behind the lock; with the lock stripped the moved row is deleted (the card's defect).",
      "tests": "spec vitest 937 files / 28629 passed; objectql vitest 605 files / 13516 passed; driver-sql vitest 267 passed 4 skipped files / 5459 passed 128 skipped (live PG16 + SQLite; MySQL/MSSQL NOT RUN); tsc --noEmit spec/objectql/driver-sql clean; spec check:generated 14/14 current. Ablations A1-A4 each red then restored (PR body Verification). Engine refusal pins assert code+status (501, 428).",
      "gates": "dispatch-gates --commands at head 7148349e: 120 commands each run with < /dev/null, all exit 0; --ran reconciliation: 120 derived, 120 run, 0 NOT-MEASURED, 0 UNRUN (DERIVED zero). File: /mnt/project-files/objectstack-seat2/34373-gates-ran.txt. CI at hand-back: 64/66 check runs complete, all success or skipped; Test Core (8/8) and Test UI (10/16) in progress. Temporal Conformance (live PG + MySQL) skipped on this PR.",
      "line_budget": "15 files, +590/-10 (source 177+, tests 371+, changeset 21, generated docs/surface 7)",
      "deviations": [
        "packages/objectql/src/engine-driver-options.ts edited (refusal guard in buildDriverOptions) — not named in claim 6931526435's file surface",
        "ablation runs A1-A4 used vitest directly, not under os-verify-lock",
        "first gate pass ran before the last commit (7148349e, test-only casts); the whole 120-command list was re-run at 7148349e and that pass is the recorded one",
        "spec check:test-typecheck needed NODE_OPTIONS=--max-old-space-size=6144 locally (default heap OOM)"
      ],
      "files_changed": [
        ".changeset/34373-predicate-delete-lock-rows.md",
        "content/docs/references/data/driver-nosql.mdx",
        "content/docs/references/data/driver-sql.mdx",
        "content/docs/references/data/driver.mdx",
        "packages/drivers/driver-sql/src/sql-driver-34373-lock-rows.test.ts",
        "packages/drivers/driver-sql/src/sql-driver-crud.ts",
        "packages/drivers/driver-sql/src/sql-driver.ts",
        "packages/objectql/src/engine-cascade-delete-atomic.test.ts",
        "packages/objectql/src/engine-delete-and-aggregate.ts",
        "packages/objectql/src/engine-driver-options.ts",
        "packages/objectql/src/engine.ts",
        "packages/objectql/src/lock-rows-refusal-error.ts",
        "packages/spec/authorable-surface/data.json",
        "packages/spec/src/data/driver.test.ts",
        "packages/spec/src/data/driver.zod.ts"
      ],
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "4 — mcp__github__issue_read x3, mcp__github__pull_request_read x1 (get_check_runs); no write tools",
      "api_writes": "2 — fleet relay pr_create (#34517), fleet relay comment on #34373 (this report)",
      "open_questions": [
        {
          "question": "需契约复审 — Clause-② widening (DriverOptions.lockRows, DriverCapabilities.lockRows) at head 7148349e",
          "options": [
            "A route to the L2 review seat",
            "B land without"
          ],
          "recommendation": "A, a new driver contract bit"
        },
        {
          "question": "Memory, MongoDB and OData drivers ignore lockRows on a direct driver call (the engine never sends it to them). Refuse 501 there as well?",
          "options": [
            "A leave as is: the engine is the guard",
            "B add a 501 refusal in each driver"
          ],
          "recommendation": "A for this card; B as a follow-up if direct driver callers exist"
        },
        {
          "question": "Turso remote inherits supports.lockRows from SqlDriver; the engine only sends lockRows inside a transaction, which Turso remote does not open. MySQL, SQL Server and Oracle forUpdate paths are not measured live.",
          "options": [
            "A accept, CI MySQL cell covers MySQL when it runs",
            "B measure before landing"
          ],
          "recommendation": "A"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Stamped 2026-11-17T00:15Z.

  11. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmSLi1reMd27fT62jJ3

    File surface amended · #34373 · 2026-11-17T01:09Z

    File surface amended: claim 6931526435 adds packages/objectql/src/engine-driver-options.ts, the file that holds the body of buildDriverOptions, where the loud refusal (NOT_IMPLEMENTED / 501, PRECONDITION_REQUIRED / 428) lives. It is part of this card's fix, named by the dev's report as a deviation and accepted by L1 (6934544391) and L2 (6933706748). PR #34517.

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

Metadata

Metadata

Assignees

Labels

bugdomain:serverpm:dispatchedpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions