Repository navigation
docs(adr-0087): amend D8 predicate 4 and D9 predicate 1 for ui packages - #26455
Merged
Merged
Conversation
D8: predicate 4 also holds when an exported interface's only change is an `any` index signature moving to a non-`any` value type (`unknown` counts as narrowed there); heritage and every other member must be identical, so the #6048 member-removal shape stays refused. D9: the declaration entry maps to the package's one source entry, `src/index.ts` or `src/index.tsx` (vite-plugin-dts in ui/, tsup in client-react); both present is refused as ambiguous. Maintainer decision A on #26220 (claim amendment 6433464805). Claude-Session: https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q Co-authored-by: Claude <noreply@anthropic.com>
os-zhuang
approved these changes
Oct 27, 2026
os-zhuang
marked this pull request as ready for review
October 27, 2026 04:20
os-zhuang
enabled auto-merge
October 27, 2026 04:20
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steve · project thread
Part of #26220 (PR 1 of 2 for parts 3 and 4: the ADR wording. PR 2, the gate code, follows once this lands).
Clause-②: no
Metadata-protocol: none
Governed (Tier H):
docs/adr/**. This PR stays a draft and is not queued or armed until a GOVERNED_APPROVERS account approves it.维护者速读(草稿)
改了什么: 只改了 ADR-0087 一个文件,加了两条修订说明,状态行也记了一笔。
any索引签名变成非any(unknown也算)以外,继承和所有成员逐字不变,就算收窄。src/index.ts,也认src/index.tsx。两个都有就判为歧义拒绝,都没有照旧拒绝。为什么改: 有两个 ui PR 走真实处置被门禁拒。#26293 把
[key: string]: any改成unknown,原文只认“整体是 any”。#26365(plugin-ai 退役)卡在入口映射上:38 个发布的 ui 包里有 21 个入口是src/index.tsx。两处都只影响 TS 消费者,账本不是正确渠道。这是你在决策卡上选的方案 A。风险与代价(含回滚): 谓词 4 是
type-surface-only豁免的唯一保险。新分支要求除索引签名外逐字相同,所以 #6048(删成员)的形状照样被拒,自测里的回归钉继续断言这一点。入口映射只按源文件名判断,不读构建配置。本 PR 只改文字;门禁代码在 PR 2,带电池行和消融。回滚:revert 本 PR;PR 2 落地后要一起 revert。席位意见: 同意合入(ui 席 1)。两条修订都只放宽到实测挡住的那一类,没有顺手扩大。D8 的新分支只放行「声明成员完全不变、只有
any索引签名收窄」这一种情况;#6048 那种丢成员的情况照旧被拒,回归钉还在。D9 只多认src/index.tsx一个入口,两个入口同时存在时按有歧义拒绝。被挡的是 #26293(#25918)和 #26365(#25921 plugin-ai 下线);PR 2 把检查脚本和测试补上后,会拿这两个 PR 证明 exit 0。你要做的: 读两条修订说明(D8 谓词 4 下、D9 不可映射段落下),同意就批准本 PR。批准后由席位入队,然后开 PR 2。
What changes
docs/adr/0087-metadata-protocol-upgrade-contract.mdonly (+63 / −1):**Amended** (2026-10-27, #26220 …)entry pointing at the two notes.anyINDEX SIGNATURE". For a bare reference naming an exportedinterface, or atypealias whose right-hand side is an object type literal, predicate 4 also holds when (1) at base the member surface has at least one index signature typedany, (2) at HEAD at least one of them carries a non-anyvalue type, withunknowncounted as narrowed there only, and (3) heritage, type parameters and every member are otherwise identical, compared member by member on the masked, normalised surface. The note states why this is not a weakening: the feat(runtime)!: 退役 ctx.user 的 roles 别名,positions 成为唯一拼法 (#6011) #6048 shape (a member removed) fails condition 3 and keeps the founding-case refusal, and dotted member paths are untouched.src/index.tsx". The declaration entry (dist/index.d.tsor its twins) maps to the package's one source entry,src/index.tsorsrc/index.tsx. Both present is refused as ambiguous, neither present is refused as before, and the build tool is never consulted.Measured (main
83e9d718)ui/packages (46 manifests, 8 private). 21 havesrc/index.tsx, and all 21 name./dist/index.d.tsas their types entry; their builds are vite-plugin-dts withinsertTypesEntry: true.src/index.tsandsrc/index.tsx.@objectstack/client-react(one of D9's four measured unmappables) builds withtsup src/index.tsx, the same shape.{ schema: TSchema; [key: string]: any; }→ HEAD{ schema: TSchema; [key: string]: unknown; }(gate output ate349c832, predicate 4 refusal).Gates
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderives 24 commands at2494b54b(base83e9d718). All 24 exit 0, includingnode scripts/check-adr-0087-registration.mjs --base origin/mainand--self-test,node scripts/check-adr-links.mjs,node scripts/check-adr-symbol-anchors.mjs,pnpm check:adr-anchors,pnpm check:doc-authoringandpnpm check:pm-governed-merges.pnpm --filter @objectstack/lint run check:doc-formula-expressionsfirst exited 3 (prerequisite:@objectstack/formulaand@objectstack/lintdist not built); afterpnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lintit exits 0.--ran: 24 derived, 24 run, 0 NOT-MEASURED, 0 UNRUN. No package or script is touched, so there is no build closure and no changeset (skip-changeset).Acceptance notes
scripts/check-adr-0087-registration.mjs: the predicate-4 limb with red/green battery rows (fix(types,components)!: renderer props index signatures map to unknown, not any #26293's shape green; a member removed beside the index signature, the feat(runtime)!: 退役 ctx.user 的 roles 别名,positions 成为唯一拼法 (#6011) #6048 pin, a non-anybase index signature, and a dotted path all red), and thesrc/index.tsxmapping (green on a vite-plugin-dts-shaped fixture; both entries present red as ambiguous), each with an ablation. Its proof:--base origin/mainexits 0 on fix(types,components)!: renderer props index signatures map to unknown, not any #26293 and refactor(ui)!: retire@object-ui/plugin-aiand its three node types #26365.runtime-export-retiredcan never certify an operand nameddefault(predicate 2 word-scansdefaultacross every metadata surface) #26324 (predicate 2 cannot certify an operand nameddefault) is a separate card and is not addressed here.🤖 Generated with Claude Code
https://claude.ai/code/session_01Am8eYNReiNP66D2JihPS1q