Skip to content

spec(type-compat): lift the oracle RAW(16) → lookup / master_detail pairing from lossy once the driver binds uuid through HEXTORAW #31592

Closed

Description

@objectstack-fleet

domain:server#4 · os-steve · session_01ADHkmP8JJo4zF2sjTBRwnX

carries item 3 of #31390; #31390 keeps items 1, 2 and 4 (the driver-sql oracle bind, the malformed-uuid refusal, the live pins).

Filing gate: a self-split of a queued domain:server card (execution-duties.md: a queued card holding another lane's item is split by the seat that finds it). Item 3 edits packages/spec/src/data/type-compat.ts, and the server lane makes no packages/spec edit beyond prose. ⛔ Not a claim. No domain:* label: triage routes it (expected domain:spec).
Ruling-ref: ADR-0015 §4.6 (as cited on #31390)
Blocked-by: #31390
Dedupe (open AND closed): "HEXTORAW", "RAW(16) lossy oracle lookup" → #31390 only.

维护者速读

Oracle 的 RAW(16)(SYS_GUID())主键现在在类型兼容表里对 lookup / master_detail 标为 lossy,因为驱动还不能按 uuid 字符串过滤或写入它。#31390 补上驱动绑定后,这里把这一对从 lossy 改为兼容,并更新对应 pin 与 demoteExact 注释。放宽接受面,需要契约复审。

Task

Clause-②: yes (widening) expected · Metadata-protocol: to be measured (a federation draft that carried a // REVIEW: marker no longer does).

Activity

  1. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: domain:spec · p3 · pm:blocked on #31390 · 2026-11-08T16:58Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    domain:specDomain lane — seat card indexed by label:pm:seat
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    on Nov 8, 2026
  3. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: unblocked · pm:blocked → pm:queue · 2026-11-09T02:13Z

    ⛔ Not a claim.


    Generated by Claude Code

  4. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    pm:queueReady for the PM dispatch loop
    on Nov 9, 2026
  5. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd

    Claim: PM loop round 1 · 2026-11-09T02:54Z
    Session: session_01QsR2jUe9c6YdtNkrzUnMUd (seat); dev = card thread session_01QsR2jULf9M1RFFq4dq9ioH
    Account: zhuangjianguo
    Branch: claude/project-thread-h15c0w (a project card thread can push only its assigned branch, a measured platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-31592
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/data/type-compat.ts + type-compat.test.ts; prose this card makes false: content/docs/data-modeling/external-datasources.mdx (the RAW(16) row L558 and the "not supported" bullet L576-580), docs/adr/0015-external-datasource-federation.md §4.6 L431-434 plus a dated Amended by entry; service-datasource test pins only where they hold today's 'lossy' answer; a changeset (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default tier — dispatch-gates --tier on origin/main 43fb4822 says MANDATORY claude-fable-5-1 (the docs/adr/** hit, no one-line exit); reason: the maintainer's standing rule 「后续不再派 fable 卡」 (2026-10-27) puts builds on the default tier; the review is owed at CONTRACT_REVIEW_TIER on an isolated sub-agent (rule 2026-11-08 16:12Z 「有 fable 车道就可以契约复审啊」), effort: xhigh
    Clause-②: yes (widening)
    Metadata-protocol: semantic
    Responsibility: n/a — not a defect card
    Thread-read: 6730608741
    Premise: holds (origin/main 43fb482: type-compat.ts L454 oracle: { uuid: { demoteExact: true } }, test L393-402 pins 'lossy'; #31390's bind landed as PR #31642, 836d408, HEXTORAW(?) for comparands, writes and by-id keys)
    Serial constraints cleared: none (no open PR touches type-compat.ts, external-datasources.mdx or ADR-0015; the seat's other card #31669 does not touch them).

    Tier H (docs/adr/**). Contract review owed at CONTRACT_REVIEW_TIER. ⛔ No driver-sql code change.

  6. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · zhuangjianguo · session_01QsR2jULf9M1RFFq4dq9ioH
    os-dev-report

    {
      "issue": 31592,
      "status": "done",
      "branch": "claude/project-thread-h15c0w",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/31786",
      "head": "e090be93",
      "session": "session_01QsR2jULf9M1RFFq4dq9ioH",
      "premise_still_valid": true,
      "summary": "Narrowed, not dropped: DialectLossyRule.demoteExact is now the list of exact pairings it demotes, and oracle/uuid names only 'text'. isCompatible('RAW(16)', lookup|master_detail|user, 'oracle') now answers true (was 'lossy'); text stays 'lossy' because #31390 binds comparison comparands, written values and by-id keys through HEXTORAW but pattern operators ($contains/$icontains/$startsWith/$like) still compile as a plain LIKE against the RAW, which Oracle converts to upper-case undashed hex (pinned by the #31390 control test). JSDoc, external-datasources.mdx (RAW(16) row + the 'not supported' bullet rewritten with the #31390 refusals + a pattern-operator bullet), ADR-0015 §4.6 and its Amended-by line, and a minor @objectstack/spec changeset.",
      "premise_readings": {
        "type_compat_main_43fb4822": "held: JSDoc L430-436, rule L454, test L393-402 (re-read at 9e1f1f90, unchanged)",
        "bind_coverage": "filter comparands (=,$eq,$ne,$in,$nin,ranges) bound; writes bound; by-id keys bound; lookup expand = { id: { $in } } (objectql engine-summaries-and-expansion.ts L593) = comparand path, bound. NOT bound: pattern operators (sql-driver-oracle-dialect.test.ts 'control: a pattern operator ... unjudged').",
        "demoteExact_member": "kept, narrowed to a FieldType list; oracle still uses it for text, so it is not dead. mssql/text addLossy unchanged.",
        "consumers": "service-datasource L957 draft REVIEW: unchanged (suggested type for RAW(16) is text, still lossy). L1113 lookup gate: unchanged for oracle (only OData navigationProperties reach it). L1339 validateObject: lookup/master_detail/user over oracle RAW(16) lose the type_mismatch warning; text keeps it. Pins holding 'lossy' in service-datasource: 0 (git grep), suite green unchanged."
      },
      "tests": "spec type-compat.test.ts 42/42; spec full `pnpm --filter @objectstack/spec test` 824 files / 26081 passed + 1 todo, VERDICT command-exit 0; spec typecheck VERDICT 0; consumer `pnpm --filter @objectstack/service-datasource test` 74 files / 1299 passed, VERDICT 0. Ablation 1 (flag reading restored in isCompatible): red 'lookup: expected lossy to be true', 1 failed/41; ablation 2 (oracle row demoteExact: []): red 'expected true to be lossy', 1 failed/41; both via ablation-replace.mjs, landed and restored by blob hash (src-imported suite, no dist preflight).",
      "gates": "dispatch-gates --commands: 108 derived; 107 exit 0; check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (full build) = NOT MEASURED, CI's. First-run exit 3 on check:doc-formula-expressions, check:doc-security-posture, check:skill-examples cleared by a locked turbo build of formula+lint+client-react, then exit 0. After merging main (f6474306) the five gates whose scripts moved re-ran exit 0 (ci-filter-parity, cross-package-test-inputs, pm-governed-merges, engine-double-contract, adr-anchors); spec build + check:generated exit 0 (14 artefacts up to date). --ran: 108 derived, 107 run, 1 NOT-MEASURED, 0 UNRUN. Body gates on the PR body: check-changeset-no-major exit 0 (LEVEL AXIS accepts yes (widening) + semantic with spec at minor), check-adr-0087-registration exit 0, check-closing-keyword-parity exit 0, check-partof-closing-keyword exit 0. PR check-runs: in_progress at report time.",
      "check_changeset_reading": "Metadata-protocol: semantic accepted with '@objectstack/spec': minor (LEVEL AXIS ✓). Not tried at patch.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "94 changed lines (+67/-27) over 5 files, under 3000",
      "files_changed": [".changeset/31592-oracle-raw16-reference-exact.md", "content/docs/data-modeling/external-datasources.mdx", "docs/adr/0015-external-datasource-federation.md", "packages/spec/src/data/type-compat.test.ts", "packages/spec/src/data/type-compat.ts"],
      "tier": "Tier H (docs/adr/**); built at the default tier per the standing no-Fable rule; the CONTRACT_REVIEW_TIER review is the seat's",
      "deviations": [
        "Narrowed instead of lifting every uuid exact pairing: text stays lossy on oracle RAW(16) (pattern operators unbound). The brief allows this ('lift only what is honoured and say which'); the card ruling allows 'or narrow it'.",
        "ADR-0015: besides L431-434 and Amended-by, the §4.6 DIALECT_LOSSY_RULES sentence ('oracle demotes the exact pairings of uuid') was corrected to 'the exact text pairing', because this change makes it false. Same file, same section.",
        "spec test:repo not run locally (CI Test Core).",
        "Live Oracle NOT MEASURED (no OS_TEST_ORACLE_URL)."
      ],
      "mcp_calls": "0 — no MCP GitHub calls",
      "api_writes": "2 — relay pr_create (#31786, run 42558565520, body read back identical 11459 bytes), this post-stamped comment on #31592; plus 2 git pushes",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed — base-row observation: CANONICAL_TO_FIELD.uuid keeps 'user' exact on every dialect, yet a platform user id (better-auth 32-char string / 16-char nanoid) is never a uuid, so any uuid column refuses a real platform user id on write. Same judgement on every dialect, not this card's."
      ]
    }

    Generated by Claude Code

  7. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd

    ACCEPT → PR #31786 comment 6732302802 (head e090be93463b7273a813ee3cdfcb2c7863d6619b; contract review PASS 6732289043). Tier H: waits under pm:awaiting-merge for a GOVERNED_APPROVERS approval, reviewers requested.

  8. objectstack-fleet commented on Nov 9, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd

    Landing note · 2026-11-09T05:56Z

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

Metadata

Metadata

Assignees

Labels

domain:specDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions