Repository navigation
spec(data): the name-only reference value a refused reader is served has a named schema, and referenceNameVisible says which name it carries - #29623
Conversation
… name it carries
The referenceNameVisible describe now names the ADR-0079 display name the
engine resolves (nameField, else displayNameField, else the derived title
field) and every case objectql serves the Record # floor in. The served
{ id, name, readRefused: true } gets a closed ReferenceNameOnlyValueSchema,
joined into the expanded lookup value union, and the engine's
ReferenceNameOnlyValue type now derives from it.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
…lueSchema; changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
📓 Docs Drift CheckThis PR changes 2 package(s): 11 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 170 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5b2dbcc768333bcc62c672144fcf0feb694495ca && git checkout 5b2dbcc768333bcc62c672144fcf0feb694495ca
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 33ee9aa1a0f5273ea9f4d51bfface58d3885ec4f 70dd701ebef21d4308a049722739980ab66f8d23 && git checkout -B drift-repro 33ee9aa1a0f5273ea9f4d51bfface58d3885ec4f && git merge --no-ff 70dd701ebef21d4308a049722739980ab66f8d23
node scripts/docs-audit/affected-docs.mjs --json 33ee9aa1a0f5273ea9f4d51bfface58d3885ec4f
|
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Contract reviewServed-tier: Inputs read: card #29579 body + its 3 comments (triage 6587041711, claim 6588872858, dev report 6589979343); PR #29623 body, 19-file list, net diff against merge base ① Derived judgments
② Semver levelWrong as declared, and the gate says so: What the gate requires on THIS diff, read from
That pair is also the honest one, not merely the one that greens. The dev measured
③ Boundary flags
④ Design judgment
Findings
Implemented-by: VERDICT: FAIL Generated by Claude Code |
…e describe, name the displayNameField alias Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Contract review — deltaServed-tier: Closure
New findingsNone. The delta is declaration lines, one clause of the shipped describe, test pins and regenerated prose; it introduces no schema, export, accept-set or behaviour change, and nothing in it is false against the code read for the prior record. The prior ① and ④ judgments stand on this head unchanged. Check-runs reading (at review time)
Implemented-by: VERDICT: PASS Generated by Claude Code |
…r totals Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir 维护者速读
席位核对ACCEPT ·
Generated by Claude Code |
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Maintainer approval · 2026-11-03T00:11ZWarren approved this PR's open item at 2026-11-03T00:08Z in the project thread "Decide pending spec name approvals". The card asked 「六个命名/措辞全部按推荐批准吗?」 and he picked 「全部批准」. The post above that card listed this PR's item as follows.
With this, the gate the seat ACCEPT named is met. The head is unchanged since the ACCEPT. The seat now readies this PR and arms auto-merge, and Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract-review-claim: session_01AavokzJ5DndAwitDXvKy4U · head 43a7db6 · 2026-11-03T00:23Z Taken under (c): the spec lane's seats have stood down, and the head has waited 75 min after the lane's PASS (6590344726) on an earlier head. A delta review. Generated by Claude Code |
|
triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U Contract reviewServed-tier: Inputs read:
Taken by triage under (c): ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentNaming the shape turns an engine-private interface into the one contract both sides read, and its closedness is the guarantee the ruling needs. Security, rule level: a reader refused the target is served exactly the referencing row's id, the target's display name (or its floor) and the refusal marker. Nothing else of the target is served. The served object is built with exactly those three keys, the schema is closed, and a field-level rule on the name field still yields the floor. Tried to break it:
Must-fix: none. Should-fix: none new. VERDICT: PASS Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 41555445786 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
… export Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir 席位核对ACCEPT ·
Generated by Claude Code |
…-z15khz # Conflicts: # packages/spec/dropped-refinements.baseline.json
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir 席位核对ACCEPT ·
Generated by Claude Code |
Requested by Warren · project thread
Fixes #29579
Clause-②: yes (widening)
Metadata-protocol: added
维护者速读
referenceNameVisible的说明改为写明下发的名字是 ADR-0079 显示名(nameField,否则displayNameField,否则推导的标题字段),并列全五种下发Record #兜底的情形;下发值{ id, name, readRefused: true }有了具名 schema,并入展开后 lookup 值的联合;引擎的类型改为从它派生。nameField、只列了三种兜底,下发形状在 spec 里没有名字。packages/spec/src/data/field-value.zod.ts(新 schema 与联合);packages/spec/src/data/field.zod.ts(说明文字);packages/objectql/src/engine-reference-name-visible.ts(类型派生)。pnpm --filter @objectstack/spec exec vitest run src/data/field-value.test.ts,预期全绿,含新用例「a reader refused the target of a referenceNameVisible field reads the NAMED name-only value」。ReferenceNameOnlyValueSchema/ReferenceNameOnlyValue,以及readRefused作为声明的键(triage 6587041711 要求合并前获维护者批准)。What changes
packages/spec/src/data/field-value.zod.ts. New closedReferenceNameOnlyValueSchema(strictObject):id(aReferenceIdValueSchemarecord id),name(non-empty string),readRefused: true. TypeReferenceNameOnlyValueis itsz.inputtype.valueSchemaFor(def, 'expanded')for the reference types is nowReferenceIdValueSchema | ReferenceNameOnlyValueSchema | z.record(z.string(), z.unknown()). It is a read form only; the stored form staysReferenceIdValueSchema.packages/spec/src/data/field.zod.ts. ThereferenceNameVisibleJSDoc and.describe():resolveRecordDisplayNameanswers (nameField, elsedisplayNameField, else the derived title field), no longer "the target object'snameFieldvalue";Record #floor cases are now all five that objectql'sservableNameFieldserves (field-level security,maskingRule, formula hop, an explicit pointer (or itsdisplayNameFieldalias) at a column neither title-typed nor autonumber, no usable field-level answer), plus the ADR-0079 floor every reader gets (no resolvable or no non-empty name);ReferenceNameOnlyValueSchema.packages/objectql/src/engine-reference-name-visible.ts. The hand-writtenReferenceNameOnlyValueinterface is gone; the module imports the type from@objectstack/spec/data(the module already imported@objectstack/spec/dataat run time, so the edge exists). No behaviour change.content/docs/references/**(field.mdx,object.mdx,system/migration.mdxcarry the field describe;field-value.mdxgains the section;index.mdxcounts 1604 → 1605),api-surface,export-origins,declaration-map,json-schema.manifest,authorable-surface/data.json, and the strictness-ledger counts.dropped-refinements.baseline.jsongainsdata/ReferenceNameOnlyValuesiteid(the build named it: theReferenceIdValueSchemarefine does not project, the same as thedata/ReferenceIdValuerow);type-alias-convention.pin.test.ts818 → 819 isomorphic pins;strictness-ledger.test.tsfield-value sites 4 → 5.@objectstack/specminor.@objectstack/objectqlcarries none: builtdist/holds 0 hits for the new import comment against 1 for a sibling string (positive control); the type is erased and the module is not re-exported.Declarations, measured
ReferenceNameOnlyValueSchema,ReferenceNameOnlyValue) and three authorable-surface rows, which is a widening of the published surface (precedentFileRefusedValueSchema, 02d9f69). No value's parse verdict moves: the expanded reference union already heldz.record(z.string(), z.unknown()), which accepts{ id, name, readRefused: true }.packages/spec/authorable-surface/data.json:data/ReferenceNameOnlyValue:id,:name,:readRefused. That is the claim's measurement and its stated arm. The value is served, never written: the stored form refuses it (testbad({ type: 'lookup' }, { id, name, readRefused: true })).Tests
All at head
0d181d41, against a specdist/rebuilt from this tree.pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/field-value.test.ts src/data/field-reference-name-visible.test.ts src/type-alias-convention.pin.test.ts scripts/strictness-ledger.test.ts→Test Files 4 passed (4),Tests 69 passed (69).pnpm --filter @objectstack/spec typecheck,pnpm --filter @objectstack/objectql typecheck→ exit 0.pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2→Test Files 541 passed (541),Tests 10493 passed (10493).pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/data-reference-name-visible.test.ts(the served-value end-to-end suite of PR feat(objectql): a referenceNameVisible lookup or user field names a target the reader is refused, on $expand (#29460) #29576) →Tests 23 passed (23).Reverse verification: the engine type follows the spec schema
One-shot, not kept.
node scripts/ablation-replace.mjschanged the spec schema'sname: z.string().min(1)toname: z.number()(anchor 1 → 0, blobe91212ba468a→e122c5983b7e), then rebuilt spec and type-checked objectql:Line 147 is the
served.set(id, { id, name: resolveRecordDisplayName(...), readRefused: true })call, so the engine reads the type from the rebuilt spec.d.ts. Restored (blob hash equals HEAD,git diff HEADempty), spec rebuilt, objectql typecheck exit 0,check:generatedall 14 current.Acceptance notes
packages/objectql/src/engine.ts(the privateserveReferenceNamesdocblock, ~L13860) still says the floor is served "when field-level security keeps that field from the caller", one case of five. It is a private method's comment that does not ship (0 hits in objectqldist/index.d.ts), and the module header ofengine-reference-name-visible.tsalready lists all of them. Not in this claim's file surface; left as is.Verification
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat0d181d41(19 paths vs merge base81cd9eb0e).--ranreconciliation:✓ dispatch-gates --ran: 107 derived famil(ies) accounted for — 106 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).pnpm check:dual-build-cjs-loads(exit 3, PREREQUISITE NOT MET: it needs every package built). Left to CI.node scripts/check-plugin-teardown-shape.mjs --self-testfirst exited 3 (shallow clone could not read its pinned positive control); aftergit fetch origin 621a4876…it exits 0 (48 cases pass).pnpm --filter @objectstack/spec check:generated→✓ All 14 generated artifacts are up to date.node scripts/check-platform-checklist.mjs --changed-from origin/main(an exported interface left a module) →OK — 2 anchored file(s) in the change set, 9 anchor(s) judged, 0 lost.origin/mainat5bd615effmerges cleanly (git merge-treeexit 0); none of its commits since the base touch this diff's files.Test Core, type-check lanes) are CI's run on this PR.Human Minimum
packages/specholds no runtime logic.pnpm lintis CI's run.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Maintainer approval
Warren approved the new public names
ReferenceNameOnlyValueSchema,ReferenceNameOnlyValueandreadRefusedas named, withMetadata-protocol: addedkept: 「全部批准」 on the decision card 「六个命名/措辞全部按推荐批准吗?」 in the project thread "Decide pending spec name approvals", 2026-11-03 00:08Z. Recorded on this PR in seat comment 6591825483.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbahxR9HAJnTs7UKhmn
Generated by Claude Code