Skip to content

fix(objectql, lint): synced objects are told to drop write verbs, not to open userActions - #33517

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-88rfao
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-88rfao

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

domain:spec#1 · os-project-manager · session_01FEkQ5p6qE7Nt8wpjSGLqiC

Fixes #32134

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:managedBy: 'synced' 对象上,注册时剥除写动词的告警和 lint 规则 object/managed-api-method-unaffordable 的报错/修复行,不再让作者去 userActions 打开写权限,改为:列出要从 enable.apiMethods 删掉的动词,写入走声明的 action(ADR-0153 D5)。os explain 多一段说明。其他 bucket 的文字逐字不变。
  • 为什么改:feat(spec)!: one-way sync-in, the spec half — datasource source, paging and delete policy keys, the pull refusals, and the synced bucket (ADR-0153) #32118 之后,synced 对象上 userActions 打开写动词会在 parse 时被拒(ADR-0153 D4)。旧文案让作者去改 userActions,改完构建又报错,两条信息互相矛盾,作者无路可走。
  • 风险与回滚:只改文案,剥除行为、规则判定、规则 id/严重度/path、schema 都不变。回滚即还原本 PR。
  • 先看:packages/lint/src/validate-managed-api-methods.ts 的 writeLocked 分支;packages/objectql/src/registry.ts reconcileManagedApiMethods 的 remedy。
  • 两分钟验证:pnpm --filter @objectstack/lint exec vitest run src/validate-managed-api-methods.test.ts,预期 15 条全绿(含 synced 的两条新钉子)。
  • 需要你做的:无,席位落地。

What changes

Both sentences branch on MANAGED_BY_WRITE_LOCKED_BUCKETS (@objectstack/spec/data, today synced alone), the same set the parse refusal (refuseWriteLockedUserActions), resolveCrudAffordances and the core /me/permissions clamp already read, so the remedy text and the refusal can never disagree about which bucket is locked.

  • packages/objectql/src/registry.ts reconcileManagedApiMethods. On a write-locked bucket the warning's remedy reads: "userActions cannot open a write on this bucket (ADR-0153 D4): remove [VERBS] from enable.apiMethods and send writes through a declared action (ADR-0153 D5)." Every other bucket keeps "Declare userActions to open a verb the object legitimately takes from a user context." The rest of the line (object, bucket, stripped and kept verbs, the lint rule id) and the strip are unchanged.
  • packages/lint/src/validate-managed-api-methods.ts (object/managed-api-method-unaffordable). On a write-locked bucket the verdict reads "enable.apiMethods advertises [VERBS], which managedBy: 'synced' refuses, and userActions cannot open a write there, so the registry strips them", and the fix line reads "Remove [VERBS] from enable.apiMethods, and send writes through a declared action". Every other bucket keeps "(needs userActions …)" and both ways out. Rule id, severity, where, path and the verdict itself are unchanged.
  • packages/lint/src/rule-explanations.ts. os explain object/managed-api-method-unaffordable gains one paragraph: on synced userActions cannot open a write (ADR-0153 D4), so the fix line offers only the removal, and a write goes through a declared action (ADR-0153 D5).
  • .changeset/32134-synced-remedy-text.md: @objectstack/objectql patch, @objectstack/lint patch. Both packages ship dist/ (files: [dist, README.md, CHANGELOG.md]); the new text is in packages/objectql/dist/index.js and packages/lint/dist/index.js after build.

File surface. The order named managed-api-affordance.ts's describeManagedApiMethodConflicts as the lint sentence's source. Measured on origin/main f068cde8: the lint rule no longer reads it (it builds its own message and hint, validate-managed-api-methods.ts L110-114, and its CHANGELOG records the switch), and the helper has no production caller, only its own test. The seat amended the claim's surface to the lint rule, its test and the explain paragraph, and ruled the spec helper out of this PR (no parameter added to an export nobody calls). No packages/spec file moves, so there is no spec changeset.

Tests

  • packages/objectql/src/registry.test.ts: a synced fixture pins the whole warning line; a control on engine-owned pins today's line byte for byte.
  • packages/lint/src/validate-managed-api-methods.test.ts: a synced fixture pins the whole verdict, and one with every write verb pins the whole fix line (and that it never says userActions); the existing exact pins on platform (verdict) and better-auth (fix line) are the controls and are unchanged. The explanation's fact list gains ADR-0153 D4 and ADR-0153 D5. Both synced cases are recorded by the file's one-line, at-most-200-characters checks.
Ablation: each synced branch forced off, red, restored (head f127667)

Both suites import the subject from src/ (./registry, ./validate-managed-api-methods); MANAGED_BY_WRITE_LOCKED_BUCKETS comes from spec's built dist/ and was not mutated, so no rebuild sits in either leg.

registry.ts: "const remedy = MANAGED_BY_WRITE_LOCKED_BUCKETS.has(managedBy)" -> "const remedy = false"
  anchor x1 -> x0, replacement x0 -> x1, blob eb3b6f1d1036 -> 856148d4ab92
  x on a synced object, the warning names the verbs to drop and a declared action, never userActions
  Tests 1 failed | 106 passed (107)
  ok restored: blob == HEAD (eb3b6f1d1036) and `git diff HEAD` is empty

validate-managed-api-methods.ts: "const writeLocked = MANAGED_BY_WRITE_LOCKED_BUCKETS.has(bucket);" -> "const writeLocked = false;"
  blob 682b98ae055e -> 6f513b203589
  x on a synced object, the verdict says userActions cannot open a write, never "needs userActions"
  x on a synced object, the fix line offers only the removal and a declared action
  Tests 2 failed | 13 passed (15)
  ok restored: blob == HEAD (682b98ae055e) and `git diff HEAD` is empty

Control leg on the base: registry.ts at f068cde8 with this PR's test file, -t reconcileManagedApiMethods: only the synced pin fails (Tests 1 failed | 17 passed | 89 skipped), so the engine-owned control pins the line main prints today. Restored, git diff HEAD empty.

Acceptance notes

  • The spec helper still says "(needs userActions …)". describeManagedApiMethodConflicts (packages/spec/src/data/managed-api-affordance.ts L142-150) takes only the conflicts, which carry no bucket, and nothing in the platform calls it any more. Left as it is by the seat's ruling; reported to the seat to card.
  • No generated reference or skill renders either sentence. git grep for the rule id and for "Declare userActions" over skills/, content/ and docs/ answers nothing, so nothing is regenerated.

Verification

On head f127667d (branch claude/project-thread-88rfao, merge base origin/main f068cde8), each exit code captured before any pipe:

  • pnpm --filter @objectstack/objectql --filter @objectstack/lint test (under the verify lock): exit 0; lint Test Files 210 passed (210), Tests 8973 passed (8973); objectql Test Files 595 passed (595), Tests 13013 passed (13013).

  • pnpm --filter @objectstack/objectql --filter @objectstack/lint typecheck (tsc --noEmit plus check:test-typecheck over tsconfig.test.json): exit 0, no new pinned signature ("39 file(s) / 233 error(s) / 64 pinned signature(s) held" for objectql, "2 file(s) / 6 error(s) / 2 pinned signature(s) held" for lint).

  • eslint --no-inline-config on the five changed source and test files: exit 0.

  • Derived gates (node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, 73 families): 72 exit 0; pnpm check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (needs every package's dist/), NOT MEASURED, CI runs it. --ran: "73 derived famil(ies) accounted for — 72 run, 1 NOT-MEASURED".

  • dispatch-gates --tier: no path-derived mandate; 121 changed lines, under the 3000 threshold; no governed surface.

  • origin/main moved to e40cd1e2 after the run; none of its commits touches the changed files or object.zod.ts.

  • CI families are read from this PR's check-runs, not re-run here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEkQ5p6qE7Nt8wpjSGLqiC

… to open userActions

On a managedBy 'synced' object the parse refuses a userActions entry that
opens a write (ADR-0153 D4), yet the registry's stripped-apiMethods warning
and the object/managed-api-method-unaffordable finding both prescribed
exactly that. Both now branch on MANAGED_BY_WRITE_LOCKED_BUCKETS: on synced
they name the verbs to remove from enable.apiMethods and point writes at a
declared action (ADR-0153 D5). Every other bucket keeps today's sentence.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5p6qE7Nt8wpjSGLqiC
@objectstack-fleet objectstack-fleet Bot added the domain:spec Domain lane — seat card indexed by label:pm:seat label Nov 14, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/lint, @objectstack/objectql, touching 2 documentable anchor(s).

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/data-modeling/objects.mdx (via reconcileManagedApiMethods (symbol, a top-level function))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v16.mdx (via reconcileManagedApiMethods (symbol, a top-level function))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 25 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json e40cd1e28dd79e60e7f4be0db06f071f3f962574 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1640779d9bbd5f950225b89b2923b76e87625103 — the merge of head f127667d57f892250715fef4164103bc13274403 into base e40cd1e28dd79e60e7f4be0db06f071f3f962574, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1640779d9bbd5f950225b89b2923b76e87625103 && git checkout 1640779d9bbd5f950225b89b2923b76e87625103
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e40cd1e28dd79e60e7f4be0db06f071f3f962574 f127667d57f892250715fef4164103bc13274403 && git checkout -B drift-repro e40cd1e28dd79e60e7f4be0db06f071f3f962574 && git merge --no-ff f127667d57f892250715fef4164103bc13274403

node scripts/docs-audit/affected-docs.mjs --json e40cd1e28dd79e60e7f4be0db06f071f3f962574

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs e40cd1e28dd79e60e7f4be0db06f071f3f962574 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

ACCEPT · PR #33517 (#32134) · head f127667d57f892250715fef4164103bc13274403 · 2026-11-14T23:53Z

席位核对

  • 形态: 6 files (read from the PR's file list, not the report): the reconcileManagedApiMethods warning in packages/objectql/src/registry.ts (+11/−4) and the object/managed-api-method-unaffordable message and hint in packages/lint/src/validate-managed-api-methods.ts (+16/−7) branch on MANAGED_BY_WRITE_LOCKED_BUCKETS; one os explain paragraph in rule-explanations.ts; tests beside each; one changeset (@objectstack/objectql patch, @objectstack/lint patch). No governed path, no packages/spec path (record-recognisers: no face; the changeset's Clause-②: no gives the declaration face, TIER_DEFAULT), under 3000 lines: Tier S, the seat's own ACCEPT.
  • 前提实测: the seat read the diff: on synced the warning and the finding now say userActions cannot open a write there (ADR-0153 D4, the parse refusal of PR feat(spec)!: one-way sync-in, the spec half — datasource source, paging and delete policy keys, the pull refusals, and the synced bucket (ADR-0153) #32118) and point at removal plus a declared action (D5); every other bucket keeps today's sentence byte for byte (the else arms are the old text). The strip and the rule's id, severity, path and verdict are untouched. Surface per the seat's amendment 6885418970 (the lint rule builds its own text; the spec helper has no production caller and is left alone).
  • 门禁 check-runs: latest attempt on this head 71 runs: 56 success, 15 skipped, 0 failed.
  • 契约复审: not required: no hits path, Clause-②: no. Seat ACCEPT at TIER_DEFAULT.
  • 接受的偏差: none beyond the amended surface. check:dual-build-cjs-loads not measured locally (needs every dist); CI's build and type-check runs answer it. Clause-②: no / Metadata-protocol: none.
  • 范围外去向: describeManagedApiMethodConflicts (a zero-caller published export whose sentence still names userActions) → spec: describeManagedApiMethodConflicts is a published export with no production caller, and its sentence still prescribes userActions on a synced object #33522 (p3, taken by spec seat 4).
  • 落地条款: ready + auto-merge now under the maintainer's standing order 「按照 pm-dispatch 规则复核过的都授权」 (2026-10-25T11:35Z) and 「你应该使用 pm-dispatch 技能审核和落地pr」 (2026-11-07T16:59Z). K = 3 commits on main past this head's affected-set base e40cd1e2 (< 15, no merge of main needed).

@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 43665114269 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (4/8) — 失败步骤: Run this shard's tests

    @objectstack/plugin-approvals:test:  FAIL  src/action-page-member.integration.test.ts > [#22578] handleActionPage — the ADR-0043 action page from a Request > GET renders the confirm page for a live to
      ↳ 失败原因: @objectstack/plugin-approvals:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 24 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

重排一次:队列弹出原因是 @objectstack/plugin-approvals src/action-page-member.integration.test.ts 5000ms 超时(triage 6887787718,汇总 #33508),与本 PR 无关;修复 PR #33543 已合入 main。head 未变,原 ACCEPT 仍有效。

Merged via the queue into main with commit 1cf2a5a Nov 15, 2026
72 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-88rfao branch November 15, 2026 03:23
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…s export (objectstack-ai#33583)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XHSuUAe6PB52bB1kZjsbxu6)_

Fixes objectstack-ai#33522

Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill, doc or example names
`describeManagedApiMethodConflicts` (`git grep` over `skills/`,
`content/docs/`, `docs/`, `examples/` and `ui/` at `e3f0cfd4`: 0 hits);
nothing an author writes changes.

Route: Retire, per the seat's claim 6886195399 (Ruling-ref 「开放 p3卡认领」).
Card source: objectstack-ai#32134 / PR objectstack-ai#33517 (untouched here; it edits lint and
objectql files this PR does not).

## 维护者速读

- **改了什么**:从 `@objectstack/spec/data` 删掉导出函数
`describeManagedApiMethodConflicts`
及其测试块,并重新生成两份导出快照(`api-surface`、`export-origins` 各少一行)。判定函数
`checkManagedApiMethodAffordances`、类型 `ManagedApiMethodConflict`、动词表
`MANAGED_WRITE_VERB_AFFORDANCE` 都不动。
- **为什么改**:这个函数已经没有调用方:lint 规则 `object/managed-api-method-unaffordable`
和 objectql 注册时的剥离都自己拼消息。它的句子还对所有 `managedBy` 桶都建议“打开 userActions”,在
`synced` 对象上是错的(解析会拒绝打开写的 `userActions`)。已发布却零消费的能力,创业阶段直接退役,不设过渡期。
- **风险与回滚**:只有从 `@objectstack/spec/data` 导入这个函数的 TypeScript
代码会编译报错(TS2305)。本仓(含 `ui/`、`examples/`)、hotcrm、gallery
和组织代码搜索都没有调用方;cloud 仓读不到,若有导入会在升级时编译期响亮报错,不会静默出错。运行时行为不变。回滚即 revert。
-
**先看**:`packages/spec/src/data/managed-api-affordance.ts`(删掉的函数,文件头里“两个消费方”说的是判定函数,仍然成立)、`.changeset/33522-retire-describe-managed-api-method-conflicts.md`(BREAKING
说明与 ADR-0087 处置)。
- **两分钟验证**:`git grep -n describeManagedApiMethodConflicts -- .
':!*CHANGELOG.md' ':!.changeset'`,预期零命中。
- **需要你做的**:无,席位落地。

## What changes

- **`packages/spec/src/data/managed-api-affordance.ts`**:
`describeManagedApiMethodConflicts` and its docblock are removed. The
file header's "exactly two consumers" describes
`checkManagedApiMethodAffordances` (objectql's
`reconcileManagedApiMethods` and lint's `validateManagedApiMethods` both
call it), so it stays true and is unchanged. Nothing else in the file
named the removed function.
- **`packages/spec/src/data/managed-api-affordance.test.ts`**: the
`describe('describeManagedApiMethodConflicts')` block (4 cases) and its
import are removed; every other case is kept.
- **`packages/spec/api-surface/data.json`**,
**`packages/spec/export-origins/data.json`**: regenerated with
`gen:api-surface` and `gen:export-origins` against a real spec build
(`.d.ts` emitted, no `OS_SKIP_DTS`); each loses exactly the one line for
the function.
-
**`.changeset/33522-retire-describe-managed-api-method-conflicts.md`**:
`@objectstack/spec` `patch`, both declaration lines, a `**BREAKING**`
banner, the caller's one-line fix and the ADR-0087 disposition (below).

### Changeset level and ADR-0087 disposition (the rule applied)

AGENTS.md Post-Task Checklist step 3: "a non-protocol change, widening
or breaking, ships `patch` and keeps its BREAKING banner and ADR-0087
disposition". `Metadata-protocol: none` (no authorable key, value or
type moves), so `patch`, with the banner and one marker.

The marker is `not-required (no-migration-prescription)`. Measured, not
assumed:

- `runtime-export-retired
@objectstack/spec#describeManagedApiMethodConflicts` (with a FROM/TO
line) is **refused** on `main`'s gate at predicate 1,
`retired-from-entry`: "`describeManagedApiMethodConflicts` is not
exported by packages/spec/src/index.ts at the merge base". The function
is reachable only from the `./data` subpath, and the gate on `main`
reads a package's root entry only (its header: "a retirement from a
subpath names no operand this category can verify").
- Under PR objectstack-ai#33520's gate (head `27e5e2e8`, "runtime-export-retired reads
literal subpath keys", open), the subpath operand
`@objectstack/spec/data#describeManagedApiMethodConflicts` **verifies**:
"verified: @objectstack/spec/data#describeManagedApiMethodConflicts
(export, packages/spec/src/data/managed-api-affordance.ts)".
- So on `main` today the one admissible disposition is
`no-migration-prescription`, and the changeset carries no FROM/TO block
(that category refuses one); the caller's fix is given in a sentence.
Both probes ran on a throwaway commit, restored and verified (blob hash
and HEAD equal, `git diff HEAD` empty).

## Tests

Head `12a6f2e1` (this branch merged with `origin/main` `8e63ed87`, which
moved `packages/spec`; spec rebuilt with real `.d.ts` after the merge).

- `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2`
(under the verify lock): exit 0, `Test Files 931 passed (931)`, `Tests
28421 passed | 1 todo (28422)`. `managed-api-affordance.test.ts` keeps
every `checkManagedApiMethodAffordances` and verb-table case; only the 4
cases of the removed function's block are gone.
- `pnpm --filter @objectstack/spec typecheck`: exit 0.
`check:test-typecheck`: OK (52 files / 240 errors / 131 pinned
signatures held; the removed block named no ledger signature).
- `pnpm --filter @objectstack/spec check:generated` after the merge:
exit 0 (every artifact current, `api-surface/` and `export-origins/`
included).
- `git grep -n describeManagedApiMethodConflicts -- . ':!*CHANGELOG.md'
':!.changeset'`: no hit (exit 1). Built
`packages/spec/dist/data/index.d.mts`: 0 occurrences.
- No ablation: no tested behaviour changes (a removal of an uncalled
function and its own tests).
- Full dogfood battery (owed by the `(narrowing)` arm): runs on this
head after the gate loop; its VERDICT line and counts are in the
`os-dev-report` comment on the card.

## Acceptance notes

- `packages/lint/CHANGELOG.md` (two released entries) still names "the
spec's `describeManagedApiMethodConflicts` sentence" as what the lint
rule stopped appending. That is release-owned history and true of its
release; not edited.
- If PR objectstack-ai#33520 lands before this PR merges, the seat may switch the
marker to `not-required (runtime-export-retired
@objectstack/spec/data#describeManagedApiMethodConflicts)` with a
matching FROM/TO line (measured green under that gate, above).

## Verification

Local subset, head `12a6f2e1`: the 82 commands `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derives for this diff, each run with its
exit code captured before any pipe: **82 exit 0**. Reconciliation: "Run
reconciliation — 82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN." Also
`node scripts/check-platform-checklist.mjs --changed-from origin/main`:
exit 0 (no anchored file in the change set). Full log:
`pm-orders/spec/33522-gates-ran.txt` in the project files.

<details><summary>ADR-0087 gate on the committed changeset</summary>

`pnpm check:adr-0087-registration`: exit 0, "1 declared-breaking
changeset(s), each carrying an ADR-0087 disposition",
`[BREAKING+bang+clause-②-narrowing] not-required
(no-migration-prescription)`.

</details>

The first pass at `5516b681` (before the merge) was 81 exit 0 and
`check:dual-build-cjs-loads` exit 3 (prerequisite not met: packages
without `dist/`); on the merged head, after the wider build, it answers
exit 0. CI runs every family on the PR; its check-runs are the record.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5mqr24gy2eNyrmiqJd)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
… label (objectstack-ai#33639)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XU2xTyPNgEy5xtAJUJL1GdG)_

Fixes objectstack-ai#33545
Part of objectstack-ai#33506

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — the authoring half (an AI builder reusing `owner_id`
rather than adding a second owner field) is the skills lane's on the
parent card; `os explain field-label-duplicate` carries the rule's full
text, and four CLI transcripts in `content/docs` move their author-time
rule count from 67 to 68 (claim amendment 6887617666).

Severity ruling: error at the author door, installed apps unaffected at
load (claim 6887573651, Ruling-ref 「开放 p3卡认领」). Measured: no boot or
registration path runs the author-time rules, so no fork.

## 维护者速读

- **改了什么**:`@objectstack/lint` 新增一条门禁规则
`field-label-duplicate`:同一对象上两个及以上可见字段(含平台注入的
`owner_id`、创建/修改时间与人)在作者写的标签或任一语言下显示为同一个标签,就报错。`os build` / `os
validate` / `os lint` 和元数据发布门(对象写入)都执行它。示例应用里三处中文标签撞了 `owner_id`
的「负责人」,已改名(showcase 的任务「处理人」、团队「组长」,todo 的任务「处理人」),并登记了 ADR-0087 迁移条目。
- **为什么改**:staging 上 AI 搭的工单对象有 `owner_id`(中文「负责人」)和新加的
`assignee`(也叫「负责人」),表格出两列「负责人」、看板卡片显示两次,用户分不清改的是哪个。构建时就拦下,比上线后再发现好。
-
**风险与回滚**:今天能构建的元数据如果有同名可见字段会构建失败(这是有意的收紧);已安装的应用启动不受影响。发布门上,已存储对象若带同名字段,再次保存该对象会被拒直到改名;保存别的对象不受影响。回滚即
revert。
-
**先看**:`packages/lint/src/lint-duplicate-field-labels.ts`(比较哪些字段、哪些语言),`packages/lint/src/authoring-rules.ts`(新登记项,门禁
+ 对象发布门),`examples/app-showcase/src/system/translations/index.ts`(示例改名)。
- **两分钟验证**:`pnpm --filter @objectstack/lint exec vitest run
--maxWorkers=2 src/lint-duplicate-field-labels.test.ts`,预期 9
个用例全绿;其中第一个就是 staging 的 `owner_id` + `assignee`「负责人」。
- **需要你做的**:无,席位落地。

## What changes

- **`packages/lint/src/lint-duplicate-field-labels.ts`** (new):
`lintDuplicateFieldLabels(stack)`, rule id `FIELD_LABEL_DUPLICATE` =
`field-label-duplicate`, `error`. Per object it compares the fields the
object SERVES: its own fields with every `objectExtensions` field of the
stack folded in (`objectsAsServed`, tied fields left out, as
`lintAutonumberFormats` does), plus the columns the registry injects on
it (`injectedColumnDefsFor`, the spec tables `applySystemFields`
spreads; an authored field of the same name replaces the injected one).
`hidden: true` fields are skipped; the injected `organization_id`,
`owning_business_unit_id` and `queue` are hidden by their own
definitions, so `owner_id` and the four audit columns are compared.
Labels are compared trimmed, once as authored and once per locale,
through the spec's own read-exit translator `translateObject` (no second
copy of its ladder). Locales: every locale a `translations` bundle of
the stack carries plus `BUILTIN_SYSTEM_FIELD_LABEL_LOCALES` (`en`,
`zh-CN`, `ja-JP`, `es-ES`), the locales a `/meta` read translates the
injected columns into with no bundle at all. That second set is what
catches the objectstack-ai#33506 case: the author's `assignee` keeps 负责人 while
`owner_id` is served 负责人 to a `zh-CN` reader. One finding per group of
fields sharing a label; it names every field, the label, the locale(s)
when only some clash, and the injected column(s) involved; the hint says
rename, `hidden: true`, or drop the duplicate and use the platform
column.
- **`packages/lint/src/authoring-rules.ts`**: one entry, `tier:
'gating'`, `input: 'parsed'`, all three commands, `surfaces:
CLI_AND_RUNTIME`, `runtimeTypes: ['object']` (the `lintSummaryRollups`
shape). **`index.ts`**: barrel export of the function, the id constant
and the finding type.
- **`packages/lint/src/rule-explanations.ts`**: `os explain
field-label-duplicate` entry (additive, appended after the last entry
and at the end of the table; in-flight PR objectstack-ai#33517 also edits this file).
- **User text:** none. The family's `*.user-text.ts` catalogs hold
sentences for door ADVISORIES only
(`lint-autonumber-formats.user-text.ts`: "The two errors … refuse the
write and have no sentence here"); this rule is an error.
- **Tests:** `lint-duplicate-field-labels.test.ts` (new, 9 cases: the
objectstack-ai#33506 pair red, hidden duplicate clean, distinct labels clean,
`ownership: 'none'` clean, a clash only one translated locale creates
naming that locale, an authored clash named once with no locale, an
authored `owner_id` with its own label replacing the injected one, the
registry entry on all three commands, and the explanation naming exactly
the built-in locales); `runtime-gate.object-writes.test.ts` (the door
roster and `rulesRun` pins gain the entry; a new describe: the write
that adds the clash is refused with a name-keyed path, the hidden and
relabelled controls publish, a sibling write is not charged with a
stored object's clash, and a re-save of the clashing object is judged on
its body).
- **Shipped metadata the narrowing bit, relabelled (zh-CN bundle
only):** `example-showcase` `showcase_task.assignee` 负责人 → 处理人 and
`showcase_team.lead` 负责人 → 组长 (plus the `p_assignee` action-param label
and its comment, which said it matches `showcase_task.assignee`);
`example-todo` `todo_task.owner` 负责人 → 处理人 (and the
`todo_tasks_by_owner` report label/description that names the same
field). Each of the three was served 负责人 beside `owner_id` to a `zh-CN`
reader.
- **ADR-0087:**
`packages/spec/src/migrations/entries/semantic/18.object-field-label-duplicate-refused.ts`
(a structured TODO: which field keeps the label is the author's choice,
so no D2 conversion); the changeset carries `registered
object-field-label-duplicate-refused`.
- **Fixtures the door now refuses, relabelled (claim amendment
6887847864, no assertion changed):** two metadata-protocol test files,
both about other rules at the publish door.
`protocol.runtime-authoring-gate.test.ts`: four fixture objects declare
`owner: { type: 'text', label: 'Owner' }`, which the door now reads as
one label with the injected `owner_id` ("Owner"); relabelled `'Owner
Name'` (lines 413, 703, 714, 791).
`protocol.unknown-picklist-binding-refusal.test.ts`: the `object()`
helper gives every bound select field the label `'Tier'`, so a fixture
binding `t` and `tier` showed two "Tier" columns; the label is now ``
`Tier (${field})` `` (line 187). Neither test is about labels or
`owner_id`; 266 of 266 metadata-protocol tests green after the relabel.
No other fixture in the swept suites or the dogfood battery was refused.
- **Docs:** the four CLI transcripts' `Running author-time rules (67)` →
`(68)` (claim amendment 6887617666).
- **`.changeset/33545-duplicate-field-labels.md`**: `@objectstack/lint`
and `@objectstack/spec` `minor` (`narrowed`), BREAKING banner with FROM
→ TO lines and fixes.

### Where the rule runs, measured

- `os build` / `os validate` / `os lint` and `os verify`'s author-time
step: the registry (`authoringRulesFor`). Scaffold validation runs it
too (`scaffold-validate.ts`).
- The publish door: `saveMetaItem` with `state: 'active'` and the
draft→active promotion, through `judgeRuntimeAuthoringRules` /
`runtimeAuthoringRulesFor('object')`. Studio, REST `/meta` and MCP/AI
authors reach it there. The door snapshot carries no `translations`, so
at the door the authored labels and the built-in system-field labels are
compared (which is the staging case).
- Boot / registration: nothing on that path runs `AUTHORING_RULES` (`git
grep` over every non-test consumer: the CLI commands, scaffold validate,
`os verify`, the metadata-protocol save/publish gate;
`metadata-diagnostics.ts` imports two named lint functions only, not the
registry). So an installed app keeps loading — no fork.
- "The AI builder's integrity check" (card item 1): not in this
repository (no such check under `packages/`; the builder is in cloud).
What this repo offers it is the publish door above, which every
MCP/REST/Studio object write passes; nothing was done in cloud.

## Tests

- `pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2
src/lint-duplicate-field-labels.test.ts
src/runtime-gate.object-writes.test.ts`: 53 passed.
- **Ablation 1** (rule returns nothing: `if (!isRec(stack)) return
findings;` → always return, via `scripts/ablation-replace.mjs`): 6 red,
among them the objectstack-ai#33506 `owner_id` + `assignee` case, the one-locale
clash, the authored clash, the registry entry and both door cases;
restored, blob equals HEAD, `git diff HEAD` empty.
- **Ablation 2** (hidden fields compared: `if (def.hidden === true)
continue;` neutralised): 2 red, the hidden control in the rule test and
the hidden/relabelled publish control at the door; restored the same
way.
- Consumer suites on this branch, each exit 0: rest 8393, runtime 10781,
objectql 13028, service-automation 3916, service-datasource 1317,
plugin-security 6679, client 812, mcp 1174, cloud-connection 1209,
verify 437, example-showcase 545, example-todo 249, example-crm 51, cli
unit tier 5966, metadata-protocol 266, plugin-approvals rule-runner
tests 24, spec migrations 198.

## Acceptance notes

- **Sweep.** Every example and every first-party app under
`packages/apps` built through the real CLI (`os build`): only
`example-showcase` and `example-todo` were refused, the three fields
relabelled above; all 11 build clean now. HotCRM (5 packages, 23
objects, 5 bundles): 0 findings, with a positive control (a duplicate of
each object's first visible label) firing on 23 of 23 objects, so the
probe reached every object.
- **A re-save of a stored object that carries the clash is refused** at
the publish door until it is fixed, as for every gating rule there (the
door's differential removes the written item's stored self, so its own
clash is new to the judgment). A write of any other object is never
charged with it. The door test pins both.
- **Out of scope, reported:** run over the platform's own objects with
their generated translation bundles (98 objects, 111 bundles), the rule
finds three clashes no author door judges, because these objects are not
built through `os build` and the door snapshot carries no translations:
`sys_import_job` `created_at`/`created_count` "Создано" (ru),
`sys_oauth_resource` `id`/`identifier` "المعرّف" (ar), `sys_user`
`accountable_user_id`/`manager_id` "Responsable" (fr). Each is a
reader-facing duplicate column in that locale. Left untouched here
(translation pipeline output outside the card); named as a follow-up in
the report.
- **Where the door compares locales:** the authored labels and the
built-in `en`/`zh-CN`/`ja-JP`/`es-ES` system-field labels, which is the
staging case; a clash only a stored translation bundle creates is caught
by `os build`/`os validate`/`os lint`, not at the object write.

## Verification

- Gate list from `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at 274a4bd: 116 commands, every one run,
every one exit 0. Three first exited 3 (prerequisite not met, not a
finding) and were rerun after the dependency builds:
`check-plugin-teardown-shape.mjs --self-test` (pinned commit fetched),
`spec check:skill-examples` (client builds),
`check:dual-build-cjs-loads` (dist builds). Log:
`/mnt/project-files/pm-orders/spec/33545-gates-ran.txt`.
- Typecheck: `@objectstack/lint` (including its test typecheck),
`@objectstack/metadata-protocol`, `@objectstack/spec` (`tsc --noEmit`),
`example-showcase`, `example-todo`: exit 0.
- Dogfood battery on 274a4bd (`pnpm --filter @objectstack/dogfood test`
under the verify lock, after building `@objectstack/dogfood^...`):
command exit 0, 467 files passed and 3 skipped, 3950 tests passed and 42
skipped. No fixture was refused.
- Not measured here: the CI-only rows `dispatch-gates` names as having
no local invocation (Build Core, the Dogfood Regression Gate's
merge-queue run, the type-check lanes over CI's whole-workspace
filters).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5mdmzDcF58D1JdRH4y

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5mdmzDcF58D1JdRH4y)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation domain:spec Domain lane — seat card indexed by label:pm:seat size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant