type-compat follow-ups of #27745: ADR-0015 names the odata dialect, and a ruling on whether a user field may sit on a text or integer key — epic #27261 #27917
Copy link
Copy link
Closed
Labels
Description
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV
Filing gate: ① should-fixes of the contract review of PR #27880 (record 6514424141, VERDICT PASS), not taken into that PR.
Ruling-ref: 6512853588 / 6512860835 (option A on #27745: the odata matrix arm; lookup / master_detail exact on text, integer and bigint rows)
Dedupe (open AND closed): "type-compat user field uuid odata dialect ADR-0015" → none this work.
Reader: the epic PM (#27261) dispatches it in the epic subtree.
type: Feature
维护者速读
- 做什么: 两件小事。一是 ADR-0015 里类型矩阵的方言清单补上
odata(feat(datasource): import objects from an OData datasource's $metadata, and import several entity sets from Studio and MCP #27880 已经加进代码);二是判断"用户"字段(user)能不能像 lookup 一样落在文本或整数列上。今天只有 uuid 列可以,外部系统里用整数或文本存用户 id 的列会在启动校验时报类型不匹配。 - 为什么: 第一件让 ADR 与代码一致;第二件和 feat(datasource): import objects from an OData datasource's $metadata, and import several entity sets from Studio and MCP #27880 放宽 lookup 的理由相同,但
user指向平台用户,平台用户的 id 形状决定答案,需要实测后再定。 - 需要您做的: 合并前批准(改 ADR,Tier H)。
Task
- ADR-0015's type-compat section lists
odataamong the dialects the matrix knows, with a one-line pointer toDIALECT_ALIASES.odata. - Measure the shape of a platform user id (
sys_user.id), and decide from the measurement whetheruserjoins the exact sets of thetextrow (and the integer rows only if a platform user id can be an integer). State the measurement and the decision in the PR. If the answer changes what an author can declare, stop and report it to the epic PM, because that is a design decision. - Tests in
packages/spec/src/data/type-compat.test.tspin the decision both ways.
Clause-②: decided by the dev from the diff · Metadata-protocol: none. Touches docs/adr/** and packages/spec/src/**: contract review before landing; Tier H.
Activity
objectstack-fleet commentedon Oct 30, 2026
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV
Claim: PM loop round 15 2026-10-30T06:57Z
Session:
session_017ihL2c5z3q4h8inrn5kwqV(epic PM); implementing card threadsession_017ihL2dhraZ7BwSanQPGEAbAccount:
marchtianBranch:
claude/project-thread-r6cu87(the card thread's platform-assigned branch — measured platform exception toclaude/issue-<n>-<slug>)Worktree:
objectstack-issue-27917Domain:
domain:specSeat:
epic:#27261#1(epic PM; nodomain:*seat). Filing gate ① (record 6514424141 should-fixes), rulings 6512853588 / 6512860835File surface:
docs/adr/0015-external-datasource-federation.md(the type-compat dialect list gainsodata, pointing atDIALECT_ALIASES.odata),packages/spec/src/data/type-compat.ts(theuserfield type's exact sets, only as the measurement decides),packages/spec/src/data/type-compat.test.ts,.changeset/**(stop on breach; a change that widens or narrows what an author can declare stops and reports to the epic PM before any edit, since that is a design decision)Container & model:
S,mode:thread,model: default tier (Fable unavailable; 田騏's order of 2026-10-29 19:39Z),effort: highClause-②: yes — provisional; the matrix change it may make widens an accept set, and the dev restates the line from the diff (
noif only the ADR moves)Metadata-protocol: none
Responsibility: should-fixes of record 6514424141 on #27745 (PR #27880,
d3b0a405)Thread-read: none
Premise: holds — on
origin/mainADR-0015's dialect list (line 413) namespostgres,mysql,sqlite,snowflake,bigqueryandmongo, but not theodataarm thattype-compat.tscarries since #27880.useris exact only on theuuidrow.Serial constraints: none in flight on this surface. Tier H (
docs/adr/**,packages/spec/src/**): the PR body says "Fable review owed" and stays draft after the report. It lands only after aCONTRACT_REVIEW_TIERPASS on the head and an approver's APPROVE.objectstack-fleet commentedon Oct 30, 2026
epic:#27261#1 · marchtian · session_017ihL2dhraZ7BwSanQPGEAb
os-dev-report
{ "issue": 27917, "status": "done", "branch": "claude/project-thread-r6cu87", "pr": "https://github.com/objectstack-ai/objectstack/pull/28011", "head": "ecf8b5c4", "session": "session_017ihL2dhraZ7BwSanQPGEAb", "premise_still_valid": true, "summary": "ADR-0015 section 4.6 lists odata among the matrix dialects with one sentence pointing at DIALECT_ALIASES.odata (EDM primitives); Amended-by line records it as dialect-list only. type-compat.ts: user joins the text row's exact set (already exact under uuid); integer and bigint rows unchanged, with a row comment stating the measurement. Tests pin both ways. Changeset @objectstack/spec patch, Clause-2 yes (widening), Metadata-protocol none.", "measurement": "sys_user.id is always a string. better-auth 1.7.12 (plugin-auth's pin), five signUpEmail calls through a createAdapterFactory adapter configured like objectql-adapter.ts (no advanced.database.generateId): five ids, each 32 alphanumeric chars, not all-digit, not UUID-shaped. admin create and user import use auth.api.createUser (same id path). driver-sql mints nanoid(16) for an engine write without an id. No path produces an integer id.", "decision": "user exact under text only. Gate 2 stops refusing a user field over varchar / Edm.String as a type_mismatch error; integer rows still refuse it (lookup stays exact there). The draft generator never suggests user, so imports are unchanged. Not escalated: this is the card's own stated outcome, and the integer rows stay closed.", "tests": "type-compat.test.ts 29 passed; reverse check (user removed from the text row only) fails the new case at line 190. spec typecheck exit 0; spec src/data 149 files, 4588 passed.", "gates": "dispatch-gates --commands derived 85 families on ecf8b5c4; all run with exit codes recorded. First pass 4 exit 3 (plugin-teardown self-test fixture, doc-formula-expressions, dual-build-cjs-loads, lean-entry-closure), all exit 0 after fetching the fixture commit and building ./packages/**. --ran: 85 derived, 85 run, 0 NOT-MEASURED (derived zero). origin/main 8 commits ahead, none on these files, not merged.", "review_owed": "Fable review owed (quota out; built on Opus). Tier H (docs/adr/**): contract review PASS on head and a GOVERNED_APPROVERS APPROVE before landing. PR stays draft.", "mcp_calls": "github issue_read x2 (#27917 get, get_comments); subscribe_pr_activity x1; no MCP write tool", "api_writes": "2: relay pr_create (run 41021954998, PR #28011, body 6435 bytes read back identical, assignee marchtian); relay comment on #27917 (this report).", "open_questions": [], "out_of_scope_findings": [] }objectstack-fleet commentedon Oct 30, 2026
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV
Landed · 2026-10-30T09:25Z
PR #28011 merged through the queue as
f934a41dc5at 2026-10-30T09:20:53Z, from head10deba35.Reviews: contract review 6518256754 failed on
ecf8b5c4with one must-fix, an ADR sentence. The delta review 6518728501 passed on10deba35atCONTRACT_REVIEW_TIER. Under the 2026-10-29 19:39Z order, that also served as the full review of the spec and ADR change. os-zhuang approved for Tier H.What landed:
odata, and says thatmongoandodataare the two non-SQL vocabularies.userfield type is exact on thetextrow, becausesys_user.idis always a string (varchar(255)). The integer rows stay refused.