Skip to content

driver-sql: the share-grant subquery on Oracle for a RAW(16) uuid key (ADR-0155 O2, ruling A applied to Oracle) #35952

Description

@objectstack-fleet

repo:objectstack#7 · os-tesla · session_01L9qibyXo4gSy8DJPNz4ANz

Filing gate: ④ an execution card of an accepted cross-layer ADR and a maintainer ruling · Source: fleet (#35906 dev report, open_questions[0]; seat 7's routing, 2026-11-20T22:56Z). Part of #33787.

维护者速读

  • 问题:共享子查询在 Oracle 上,主键用十六字节二进制(RAW(16))存 uuid 的外部表,按代码推断会直接报错(ORA-01465);今天按名单读能返回被共享的记录。
  • 这一步做什么:按你在 [Decision] ADR-0155 O2: the share-grant subquery on PostgreSQL for an object whose id is not text (integer, uuid) #35906 裁的 A(按主键类型比较、结果同今天)补到 Oracle:子查询里把授权 id 转成和名单一样的二进制形式,并在测试包自带的 Oracle 实例上实测。
  • 不做会怎样:第 6 步切换后,这类 Oracle 表上被共享的人读记录会报错。
  • 要你做的:无(A 已裁)。

Why (business)

Inherits #33787 and ruling 7051669729 on #35906: 「A 按主键类型比较」. Seat 7 read that ruling as covering every dialect driver-sql ships: "compare by the key's type, same rows". The alternatives (keep the capped list for that class, or accept a failure) are the options the ruling declined.

What is known

Scope

  • In the inner read, when the outer column is a known RAW(16) uuid: HEXTORAW(REPLACE(record_id, '-', '')), or the shape that measures equal to the list's binding. Reuse the existing Oracle prime; restate nothing.
  • A live pin on the testkit's Oracle cell (ORACLE_CELL, gvenzl/oracle-free): the same rows as the list for a RAW(16) uuid key, one NUMBER key, a blank grant, and a malformed grant, each against the list's answer.
  • D-0 holds: if a case cannot keep the same rows, stop and report it; ⛔ never refuse or narrow it on the driver's own say.
  • ⛔ No producer writes the leaf (step 6). ⛔ No docs/adr/** edit.

Order

After #35906's PR lands (it adds the per-dialect cast seam this card extends). Before step 6 (#33787 gains Blocked-by: this card).

Dedupe

repo:objectstack-ai/objectstack is:issue is:open RAW(16) oracle and "ADR-0155" oracle → #35906 only (the PostgreSQL case). No Oracle card exists.

Grade: p2, the grade of the card it unblocks (#33787, p2). Type: Task.

Activity

  1. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu

    Claim: PM loop round 4 · card thread d7-D · 2026-11-20T23:02Z
    Ordered by: seat 7, 2026-11-20T22:59Z: take this card on d7-D's free branch; it is in the ADR-0155 chain the maintainer counted as work in hand (2026-11-20T18:06Z), so the p1-only word does not stop it
    Area: d7-D
    Session: session_01L9qibvMi1U7R2kBd3JbTPu
    Account: os-tesla
    Branch: claude/project-thread-dr6px1, restarted from main. The build stacks locally on #35906's commit(s) from the c-35872 thread (its per-dialect cast seam), and the PR opens only after #35906 merges, rebased onto main.
    Worktree: objectstack-issue-35952
    Domain: domain:server
    Seat: repo:objectstack#7
    File surface: packages/drivers/driver-sql/src/**: the Oracle arm of the fixed-read leaf's inner read (sql-driver-internal-helpers.ts#fixedReadLeafSubquery or the per-dialect seam #35906 adds, sql-driver-filter-helpers.ts where the leaf is compiled, sql-driver-oracle-dialect.ts beside oracleUuidRawBinding), reusing the existing oracleRawUuidFieldsByObject prime, with tests beside each and a live pin on the testkit ORACLE_CELL; scripts/adr-anchors/ (new anchor files only); one new changeset .changeset/35952-*.md. ⛔ Not #35906's PostgreSQL arm. ⛔ No producer writes the leaf (step 6). No docs/adr/**, skills/** or ui/**. Stop on breach and report.
    Container & model: M, mode:subagent, model: default, effort: high (seat 7's word, 2026-11-20T22:59Z); contract (L2) review at CONTRACT_REVIEW_TIER, Fable
    Clause-②: yes
    Clause-② basis: the compiled share-grant subquery changes its SQL on Oracle for a RAW(16) uuid key, keeping D-0's same rows (ruled A, 7051669729).
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (ruling A carried to Oracle)
    Thread-read: none
    Premise: holds on origin/main 09f6d457bb: fixedReadLeafSubquery compares record_id (text) to the outer id with no Oracle conversion, while the id list binds HEXTORAW over the undashed hex for a known RAW(16) uuid column (sql-driver-oracle-dialect.ts#oracleUuidRawBinding). Measured live: the testkit Oracle cell runs in this container (gvenzl/oracle-free:slim, OS_TEST_ORACLE_URL), so this card ships measured, not by reading.
    Serial constraints cleared: stacks on #35906 (claim 7051709812, not yet pushed; c-35872 thread). overlap-check runs before the push, against main and #35906's head.
    Pre-claim lane: area:data seat 7 (#35557)
    Pre-claim deps: #35872 (step 3) merged 643fe3b; #35906 ruled A (7051669729), build in hand
    Scope-review: exempt — a ruled route (maintainer ruling 7051669729, option A)
    Prior rulings read: ruling 7051669729 (A); seat note 7048341758 (Oracle RAW(16) owed); ADR-0155 D-0, O2, D2 (no EXISTS, no correlated form, no join); #35906 claim 7051709812

  2. added
    pm:dispatched
    on Nov 20, 2026
  3. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: pm:dispatched to seat 7 (as set); rationale: area:data · Task · ADR-0155 O2 on Oracle: the share-grant subquery against a RAW(16) uuid key would raise ORA-01465 (read from code), so after the switch shared readers of such tables would get an error; applies the maintainer's ruling A on #35906 (compare by key type) to Oracle, measured on the test pack's Oracle instance; part of #33787 → p2 (the parent's grade) · size S.

  4. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu

    Close-out: #35952 shipped in PR #36001 · 2026-11-21T07:26Z

    Merged 2026-11-21 07:20:48Z as 907b378 (landing record 7058929172 on #36001).

    What changed on Oracle: for a uuid key the RAW(16) prime names, the share-grant inner read now converts record_id the way the list binds it (HEXTORAW over the undashed hex), behind a REGEXP_LIKE gate derived from UUID_TEXT. A grant the list admits returns the list's rows. A grant the list refuses fails the statement with 500 ORA-01465 on find and on negation, where it used to be a silent miss. That remaining difference from the list (400 vs 500) is the D-0 class-1 envelope seat 7 accepted. NUMBER keys, unprimed keys and the other dialects compile as before.

    Measured on live Oracle Free 23ai: 27 pins (11 refused forms, 5 admitted, RAW and NUMBER blocks, compile pins). No CI lane runs the live Oracle cell, so these stay a local measurement.

    Reviews: L1 ACCEPT 7058114575, delta ACCEPT 7058632429 · L2 FAIL 7058145514 (M1), delta PASS 7058642638.

    Left open: #35960 (pre-existing, found on the way). Nits carried without cards: L1 N1 (derive the pattern lazily), L2 N3 (pin that filtering happens before projection). Step 6 (#33787) no longer waits on this card.

  5. removed
    pm:dispatched
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:datapriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions