Repository navigation
fix(lint): the object_extension publish door refuses an extension field under a label its target already shows, or another field of the same extension shows (field-label-duplicate) - #34132
Conversation
…bel rule An extension published at runtime can add a field under a label the object it extends already shows (owner_id included). The rule now runs on the object_extension door too: it folds the written entry onto its target as served, among the target's other packages' extensions by priority, and the gate's differential charges the write only with the clash its entry creates. Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE Co-authored-by: Claude <noreply@anthropic.com>
…nd docs for the extension door Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 3 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 173 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 6951bcdb2154c3fb7fa0fa3ef4d0883782ee6b37 && git checkout 6951bcdb2154c3fb7fa0fa3ef4d0883782ee6b37
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2 69c48313fdd44af818e43e763d239fd6b92bf608 && git checkout -B drift-repro dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2 && git merge --no-ff 69c48313fdd44af818e43e763d239fd6b92bf608
node scripts/docs-audit/affected-docs.mjs --json dfb8ed3570b3be1cfbc3758ff791ace7c31fa1a2
|
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Contract-review-claim: session_01ADHkmQjrEpxMVxEiDUJHqC · head 315696e · 2026-11-15T20:44Z |
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Contract reviewServed-tier: Inputs: card #33644 body and its four comments (os-dev-report 6901067491), PR #34132 body and file list (12 files), the net diff Check-runs on the head, read 2026-11-15T20:49Z: 65 runs, 23 success, 10 skipped, 0 failed, 32 in progress. Green so far: Check Changeset, Governed Surface Queue Guard, PR-body guards, Spec property liveness, Check PR Size, Check Documentation Links, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Dogfood Regression Gate, the plan and filter jobs, and the Lint and Type Check leaves that finished between two readings. STILL IN PROGRESS: Test Core 1/8 to 8/8, Test UI 1/16 to 16/16, Build Core, Build and E2E UI, Live E2E UI, Type Check UI, Type Check · workspace, Type Check · debt ledger, Type Check · consumer gates, Lint and Repo Gates. This verdict does not stand in for any of them: it is a reading of the diff, and the landing needs each of them green. ① Derived judgmentsAccept-set changes, read off the tree:
The half-corrected premise. The dev's reading is TRUE at the lint gate: on an ② Semver level
③ Boundary flagsDev deviations (five), each answered:
Changed pins (five files), each judged:
Escalated to the dispatching seat, uncarried (the report's
④ Design judgmentThe narrowing against the published spec on Attempts to break the differential, by reading:
Per scope file:
S1 (should-fix) — an entry that SHRINKS a clash the target already carries is refused, against the card's "charge an extension write only for a clash it creates" and the PR's own "one the target already carried is not". The differential cancels by message, and the message names every member of the group. Take a target serving N1 (nit) — the registration comment in N2 (nit) — the entry's N3 (nit) — the case "the target's own object save is not blamed for a clash an extension write was refused for" gates the save against a target with no extension field, so it would pass on No must-fix. One should-fix (S1), three nits. Implemented-by: VERDICT: PASS |
…ash it shrank The door's differential compares whole messages, which name every member of a label group, so an entry that took a member out of a clash the target already served read as a new clash. On an object_extension write the rule now leaves out a group every member of which already shared the label on the target without the entry. Pins the shrink cases and the stored-extension target save; corrects the first-party count and the translation remedy. Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE Co-authored-by: Claude <noreply@anthropic.com>
…label of its own The extension door now refuses an entry that serves two visible fields under one label, so the fixtures that shared the helper's label F would be refused for that before the cycle they pin. Each field gets its own label; the assertions are unchanged. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer-limited fable quota, 2026-11-15T21:55Z) · head 98cb74a Delta review of round 1 (record 6901169669: S1 + N1–N3), plus the forced runtime fixture change for the Test Core (3/8) regression at c51fcc1. Author report: issuecomment-6901973935. |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 98cb74a · 2026-11-15T21:58Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-15T22:27Z. Delta review of this head against PASS 6901169669 at 315696e; claim: comment 6902031253; lane request 6902018464 on mailbox #33873 (the lane's at-tier reviewer was unavailable). Independence: implemented in an os-steve project thread, dispatched by domain:spec#2 (os-steve); reviewed by os-tesla. Inputs: card #33644 body and comments (author reports 6901067491 and 6901973935), PR #34132 body and comments (prior record 6901169669, hand-off 6902008434), the net diff from merge base ① Derived judgmentsThe prior record's ids, each judged by id against this head:
Accept-set at this head, re-derived:
The fixture change in ② Semver level
③ Boundary flagsRound-2 deviations, each answered:
Changed pins since Escalated to the dispatching seat, not graded here:
Security: no security gap found in the diff; nothing was written to the security notes. ④ Design judgmentThe narrowing against the published spec on "Not charged for what is left of a clash it shrank" is the right rule and the right place for it. The card's instruction is that a write answers only for a clash it creates; a fingerprint over a message that names every member cannot express that for a shrinking group, so the question has to be asked on the groups themselves, and it is asked where the groups are known. The implementation holds on reading: Per scope file:
S1 (should-fix) — new this round. An entry whose OWN fields share a label with each other, on a target that shows that label nowhere, is refused, and that arm is neither named nor pinned. It is the arm the PR's own CI found ( S2 (should-fix) — continues prior N2. The finding's N1 (nit) — new. On an extension write the rule now computes the clash passes twice for every object of the snapshot, in the baseline pass and in the candidate pass, though only an object some entry targets can differ between No must-fix. Two should-fix (S1, S2), one nit. Implemented-by: VERDICT: PASS |
…o translation bundle An extension whose own two fields share a label the target does not show is refused too; the semantic entry, changeset and docs now say so, and a door case pins it. On the extension door the hint drops the translation bundle remedy, since the door reads no bundle. The before-write snapshot is read only for the objects the written entry extends; verdicts are unchanged. Claude-Session: https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE Co-authored-by: Claude <noreply@anthropic.com>
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer-limited fable quota, 2026-11-15T23:51Z) · head 4fa9c1c Delta review of r2 (record 6902412653: S1 self-duplicate arm, S2 hint bundle parenthesis, N1 before-snapshot scope). Author report: issuecomment-6903448080. PR body and title replaced for this round. |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 4fa9c1c · 2026-11-15T23:53Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-15T23:57Z. Delta review of this head against PASS 6902412653 at 98cb74a; claim: comment 6903496904; lane request 6903482956 on mailbox #33873. Independence: implemented in an os-steve project thread, dispatched by domain:spec#2 (os-steve); reviewed by os-tesla. Inputs: card #33644 body and comments (author report 6903448080, round 3), PR #34132 body and comments (prior record 6902412653, the hand-off for this head), the one commit ① Derived judgmentsThe prior record's ids, each judged by id against this head:
Accept-set at this head: unchanged from the prior record's ①.1 to ①.6. The commit moves no verdict: the rule's only verdict-bearing edit is the Adversarial readings of the fix, each answered:
② Semver level
③ Boundary flagsThe author's one declared deviation: the Changed pins in this commit: none moved or weakened. Escalated to the dispatching seat, not graded here (carried from the prior record, unchanged by this commit):
Security: no security gap found in the diff; nothing was written to the security notes. ④ Design judgmentThe narrowing against the published spec on Per scope file, this commit:
No must-fix, no should-fix. N1 (nit) — new; the twin of prior S2 at the door this PR does not move. N2 (nit) — new. Two small pin gaps. (a) After the prior-N1 edit an unextended object's stored clash on an extension write is cancelled by the gate's differential, no longer dropped by the rule, and no door case holds a clashing object beside the target; one case (a second object with a clash in N3 (nit) — new. Cosmetic: the edits left over-long unwrapped lines in the module note, the entry comment, the Implemented-by: VERDICT: PASS |
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Contract-review-handoff: review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer-limited fable quota, 2026-11-16T01:11Z) · head 69c4831 Merge-of-main review: origin/main 121017b merged into the reviewed head 4fa9c1c (r3 PASS 6903533262) under the K ≥ 15 landing rule. Per the card thread: no conflicts, the regen produced no changes, |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 69c4831 · 2026-11-16T01:14Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-16T01:43Z. Merge delta review of this head against PASS 6903533262 at 4fa9c1c; claim: comment 6904617898; lane request 6904570800 on mailbox #33873. Independence: implemented in an os-steve project thread, dispatched by domain:spec#2 (os-steve); reviewed by os-tesla. Inputs: card #33644 body and comments, PR #34132 body and comments (prior record 6903533262; the lane's hand-off 6904564479 for this head), the merge commit ① Derived judgmentsThe merge, verified:
What
Accept-set at this head: unchanged from the record at Prior ids, each by id:
Adversarial readings of the merge, each answered:
② Semver level
③ Boundary flagsNo declared deviation in this head: the hand-off states a conflict-free merge with no regenerated file, and the tree confirms both. The hand-off 6904564479 names the tier as unavailable to the implementing lane; that is why the review was handed to this seat, which served it at the tier on this record's header line. Escalated to the dispatching seat, not graded here (carried unchanged):
Security: no security gap found in the merge or in what ④ Design judgmentThe narrowing against the published spec on Per scope file: every file of the scope is byte-identical to the file judged at No must-fix, no should-fix. N1 (nit) — continues prior N1, unchanged. On an N2 (nit) — continues prior N2, unchanged. (a) No door case holds a clashing object beside the extended target, so the path where the gate's differential cancels an unextended object's stored clash is unpinned. (b) In the same-entry LIT case N3 (nit) — continues prior N3, unchanged. Over-long unwrapped lines in the module note, the entry comment, the Implemented-by: VERDICT: PASS |
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC ACCEPT · PR #34132 (#33644) · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43788211187 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Requeue · PR #34132 · head
|
|
domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC Requeue · PR #34132 · head
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43789922361 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #33644
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none owed — this PR edits
content/docs/deployment/validating-metadata.mdx(the object extension door paragraph names the rule);os explain field-label-duplicatenames the door;skills/objectstack-datateachesdefineObjectExtension({ extend, fields })and reusingowner_idinstead of a second owner field without saying the runtime door is exempt, so the door now gives the verdict the build already gives.维护者速读
/meta写入、MCP/AI 作者)时,也检查"同一对象出现两个同名标签的可见字段";扩展新加的字段若和目标对象已有字段(含平台的owner_id)同名标签,或同一扩展里两个字段同名标签,发布被拒(422)。object写入,扩展写入不拦,于是扩展可以在别人的对象上加出第二个"负责人"列,列表、卡片、表单里两列同名分不清。packages/lint/src/lint-duplicate-field-labels.ts(duplicateFieldLabelFindings的两项门输入);packages/lint/src/authoring-rules.ts(lintDuplicateFieldLabels条目加object_extension);packages/lint/src/runtime-gate.object-writes.test.ts(新 describe 的十一条用例)。pnpm --filter @objectstack/lint exec vitest run src/runtime-gate.object-writes.test.ts -t "object_extension door refuses",预期 11 条全绿。What changes
lintDuplicateFieldLabels(field-label-duplicate) joins theobject_extensionpublish door (runtimeTypes: ['object', 'object_extension']).ctx.storedObjectExtensions, the build's fold, so a field two packages tie on is left out as at the build), and reads the served objects back to their authored shape (stripInjectedSystemColumns, keyed onctx.runtimeWriteType === 'object_extension', the argumentvalidateStackExpressionsgives for the same input), soowner_idis named as the platform's column exactly as the build names it.lintDuplicateFieldLabels(stack)is unchanged; the door inputs go through the module-internalduplicateFieldLabelFindings(stack, options), which is not on any package entry.runtime-gate.ts). On this door the rule also drops a candidate clash whose fields are a subset of a clash the target already serves before the write: an entry that takes a member out of a three-member clash (relabel, hide, or a priority tie) changes the group's message, so the fingerprint differential alone would charge it for what is left.replacement, changeset Migration line, docs) is to give the field a label of its own or reuse the platform column, and on this door the finding's hint drops the build's "(in the translation bundle too …)" clause;os build/os validatejudge a bundle that translates the label apart.os explain field-label-duplicateandcontent/docs/deployment/validating-metadata.mdxname the door.object-extension-door-field-label-duplicate-refused(registered), changeset.changeset/33644-object-extension-door-label-duplicate.md(lint + spec minor).Premise reading: the card's "the TARGET's next
objectsave is refused for a clash the extension created" holds atos build(the stack's extensions fold onto a declared target), not at the publish door: anobjectwrite judges the body it sends, which carries no extension fields. The door pin below reads it.Tests
New top-level describe in
runtime-gate.object-writes.test.ts(the rule's door harness), each a real reading throughrunRuntimeAuthoringRules:owner_idis REFUSED:whereobject "xl_ticket", wire pathobjects.xl_ticket.fields, message names both fields, the label and locale zh-CN, and is byte-identical to the build's finding over the same entry; an extension field labelled like a target field (Subject) is refused in the authored pass.Escalation Level;assigneelabelled 处理人;assigneelabelled 负责人 withhidden: true) are not charged.objectsave after a refused extension write is clean (lintDuplicateFieldLabelsran, zero errors).phone/mobilebothPhone, the build reports it) is not charged to an unrelated extension write; an entry that joins the clash is charged ('fax', 'mobile' and 'phone').storedObjectExtensions); without the stated extensions the door would refuse it; a higher priority (210) is refused.phone/mobile/faxallPhone; the entry relabels or hidesfaxat priority 210, or ties it at 200) is not charged; a swap that takesfaxout and putsheadlineunderPhoneis charged.objectsave then has zero errors, and the build reports the clash onobject "xl_ticket".a__candb__care both labelledRegion, on a target that shows noRegion, is refused; the message names both fields and equals the build's; the same fields under labels of their own publish.Forced test edits (each because the rule now runs on this door):
runtime-gate.object-formula-writes.test.ts(2 exact roster pins) andvalidate-security-posture.runtime-surface.test.ts(3 exact roster pins):lintDuplicateFieldLabelsinserted in registry order.lint-duplicate-field-labels.test.ts: the entry'sruntimeTypespin reads['object', 'object_extension'].runtime-gate.object-formula-cycle.test.ts"the target's own stored cycle…": the extension field took the helper's shared labelF, joining the target'sf_x/f_ygroup (a clash this door now charges); it gets its own labelE, so the test still asserts zero errors and still means what it meant.packages/runtime/src/domains/meta-object-extension-item.test.ts([A formula field an object extension adds that reads itself, or two that read each other, is refused at neither the publish door nor os build #33153] / [object_extension door: the gate's served snapshot carries a sibling package's extension field with no priority, so the door's formula-cycle verdict differs from os build on ties and outranked entries #33494] formula-door describes): theformula()helper labelled every fieldF, so the CONTROL entry (a__c,b__c) served two visible fields under one label and the door refused it (CI Test Core 3/8 onc51fcc1d). The helper takes a label; the fields that share an entry or a target get their own (A,B,S). Assertions unchanged. Restoring the old fixture reds the CONTROL case only (1 of 50).Acceptance notes
Verification
All readings at head
4fa9c1cd(branch pointf81e4b6c).Package tests
pnpm --filter @objectstack/lint test: Test Files 212 passed (212), Tests 9037 passed (9037).pnpm --filter @objectstack/lint typecheck: exit 0.pnpm --filter @objectstack/spec exec vitest run src/migrations: Test Files 5 passed, Tests 198 passed.pnpm --filter @objectstack/metadata-protocol test(the door's host): Test Files 342 passed, 9 skipped (351); Tests 22926 passed, 45 skipped.packages/lintthat publishes or folds anobjectExtensionsentry): runtime 6 files / 135 tests, rest 5 / 55, objectql 8 / 343, cloud-connection 1 / 5, clipackage-export1 / 6, all passed. The dogfood files of that kind run in the battery below.pnpm --filter @objectstack/cli exec vitest run --project unit(at315696ed; round 2 touches no cli input): 421/423 files on the first run; the two reds werepublished-subpath-console.pinandpublished-subpath-hook-body.pinrefusing an unbuiltpackages/cli/dist(prerequisite); after the build both pass (2 files, 29 tests). Integration layer declared to CI.(narrowing)arm),pnpm --filter @objectstack/dogfood testunder the lock: VERDICT command-exit 0, Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004).Ablations (one-off, through scripts/ablation-replace.mjs, restored to the HEAD blob each time)
runtimeTypesback to['object']: all 7 round-1 cases of the new describe red.objectsAsServed(stack, [])): only the priority-fold case reds.servedObjectsbranch disabled): only the owner_id case reds (the finding stops namingowner_idas the platform's column, so it no longer equals the build's message).continueremoved): only the shrink case (7) reds.authored || extensionWriteback toauthored): only the hint case (10) reds, 1 of 55 in the file.First-party exposure
examples/app-showcaseentry onshowcase_account(three fields): build over object + entry + the showcase translation bundle 0 findings; door 0; a planted 负责人userfield on the same target is refused (1).packages/plugins/plugin-authentry onsys_sso_provider(oidc_client_secret): build 0, door 0; a planted field under the target'sIDlabel is refused (1).objectExtensionsentry underexamples/**orpackages/**(tooling and tests aside). HotCRM: not measured.Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 114 commands. All 114 exit 0.dispatch-gates --ran: 114 derived, 114 run, 0 NOT-MEASURED, 0 UNRUN.check-changeset-no-major --base origin/main --eventover this body: exit 0 (level axis:no (narrowing)+narrowed, no package graded patch).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran;eslint --no-inline-configover the ten changed.tsfiles exits 0; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (One migration entry;check:spec-changes,check:upgrade-guideand the generated-artifact gates exit 0, nothing to commit.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmTKdZ14pCk23CyRWjE