Skip to content

fix(metadata-core,objectql,cloud-connection,cli)!: the package upgrade plan counts the fields a package adds through objectExtensions - #34419

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-34095-upgrade-plan-extensions
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-34095-upgrade-plan-extensions

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread
Fixes #34095
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — git grep of skills/ finds no page that teaches the upgrade plan's field lists or the schema upgrade confirmation; skills/objectstack-platform/references/operations.md names os diff in one table row ("Compare two ObjectStack config files and detect breaking changes"), which stays true as written.

This PR is the platform half of the card. The cloud half (service-cloud upgradeSideOf, in the cloud repository) stays with the cloud seat, as the card body says: it can pass objectExtensions beside objects in the side it builds, and the comparison in @objectstack/metadata-core then folds them the same way.

维护者速读

  • 改了什么:升级预览(升级计划)现在把包通过 objectExtensions 加到对象上的字段也算进去:新增、删除、改类型都会出现在预览、受影响列的行数和升级确认判定里。
  • 为什么改:HotCRM 6.2.0 升 6.4.0 时预览显示“没有新增字段”,实际升级却加了 7 列;预览漏掉改动,管理员就无法信任预览。
  • 风险与回滚:以前直接装上的四种升级现在被拦:扩展字段改类型;同一对象删一个字段同时新增另一个(扩展与扩展,或对象自己的字段与扩展字段互相配对)——这三种回 409,用 --confirm-upgrade 确认即可;扩展字段带 renamedFrom 改成不存列的类型(如 formula)——回 422 destructive_type,确认令牌不管用,要保留可存储的类型或手工搬数据。回滚即还原本 PR,没有数据迁移。
  • 席位路线 ①(席位定 A,非维护者裁决):外包拥有的字段被扩展重声明、新版本不再声明时,预览把它列为删除(与新增字段同对象时列为疑似改名),虽然拥有方的字段仍在服务。接受这个偏差并写进文档:它偏向多要一次确认,不会漏掉一次确认。
  • 席位路线 ②(席位定 A,非维护者裁决):单删一个扩展字段只列出并计行数,不拒,与卡面「删扩展字段需确认」不同;依据是 package-upgrade-verdict.ts 的既有裁决(记录 6709061297):删除的字段由 dry run 报告,任何门都不拒。删字段只在已有规则要求确认处才要确认:同对象同时新增字段(疑似改名),或改成无存储列的类型。
  • 先看:packages/metadata-core/src/package-upgrade-plan.ts(objectsByName 的合并和只读扩展对象的比较)、packages/cli/src/commands/diff.ts(扩展对象的打印)、packages/cloud-connection/src/marketplace-install-rename-planner.ts(安装门的取侧)。
  • 两分钟验证:pnpm --filter @objectstack/metadata-core exec vitest run src/package-upgrade-plan.test.ts,应看到 objectExtensions: an extension field counts like an owned one 一组全部通过。
  • 需要你做的:无,席位落地。

What changes

  • The comparison (comparePackageVersions, @objectstack/metadata-core): PackageUpgradeSide gains an optional objectExtensions list. Each side's objects are now the objects as the registry serves them from that version: the owner's declaration, with each extension's fields merged over it by name (a later writer replaces the whole field), in ascending priority (200 when none is declared), equal priorities in the order the side lists them. This is the registry's own fold (mergeObjectDefinitions, applied by foldExtendersOntoDefinition), keyed by the extend string verbatim as the registry keys it. After the fold every existing rule applies to an extension field unchanged. No new verdict category is added.

  • Objects reached only through an extension (another package owns them) are compared by the fields the extensions add, against no fields when the other version does not reach the object at all. They are never listed in plan.objects.added / removed: the upgrade neither creates nor drops them.

  • The side readers read objectExtensions with the same collection reader as objects: sideOf in @objectstack/objectql (planUpgrade, the dry run's and the hosted door's plan) and packageUpgradeSideOf in @objectstack/cloud-connection (the install-local door's schema verdict at step 2c′ and the declared-rename planner). The fold itself lives in one place, the comparison.

  • os diff already passed the whole union stack to the comparison, so it now compares extension fields too. It also prints the field changes of an object it reaches only through an extension, under objects.NAME.fields.

  • What the door now refuses that it installed before. Four arms, each named in the changeset with its fix:

    • an extension field retyped needs_confirm or destructive: 409 SCHEMA_UPGRADE_CONFIRMATION_REQUIRED; fix: confirm with the token (--confirm-upgrade);
    • an extension field dropped while another stored extension field of the same object is added: 409, a suspected rename; fix: the token, or renamedFrom when it is a rename;
    • a stored field dropped from an object's own declaration while an extension of the same object adds a stored field, or the reverse: 409, a suspected rename. The owned and the extension fields of one object are one field map now, so they pair; on main they were never compared. Fix: the token, as for any suspected rename;
    • an extension field that declares renamedFrom and whose new type stores no column: 422 VALIDATION_ERROR, details.refusals[].reason: 'destructive_type', at step 2c″ before any write, because the plan's type change now reaches planInstallDeclaredRenames. No token answers it, so --confirm-upgrade is the wrong fix: keep a stored type for the renamed field, or carry the values by hand.

Landing point: the fold went into the comparison (package-upgrade-plan.ts), not into each side reader, so the three callers that build a side (planUpgrade, install-local, os diff) share one fold and the cloud half needs only to pass the list.

Tests

  • packages/metadata-core/src/package-upgrade-plan.test.ts, new top-level describe: an extension field added is listed in fields.added; the rollback lists it in fields.removed; an extension-only object is compared and never listed as an object; a retyped extension field is a needs_confirm / destructive type change and the verdict lists it; a dropped extension field is listed removed and, alone, is refused by nothing, while dropped beside an added one it is a suspected rename the verdict lists; the higher priority writes last; CONTROL: an owned-field plan is byte-identical with empty extension lists and with an unchanged extension of another object.
  • packages/objectql/src/package-upgrade-environment.test.ts, new describe, through the real manifest service's planUpgrade and a HotCRM-shaped two-package artifact: added extension fields listed; the rollback lists them and counts the rows holding a value; a retyped extension field is a type change whose column is read.
  • packages/cloud-connection/src/marketplace-install-local-upgrade-plan.test.ts, new describe, through the install-local door: a retyped extension field answers 409 with code SCHEMA_UPGRADE_CONFIRMATION_REQUIRED naming it and writes nothing; a drop beside an add answers 409 as a suspected rename; the dry run lists an added extension field, and adding one or dropping one alone installs unrefused. The file's test-only fold mirror reads objectExtensions too.
  • packages/cloud-connection/src/marketplace-install-local-declared-rename.test.ts, one new case beside the owned destructive_type one: an extension field renamed with renamedFrom into a formula answers 422 with code VALIDATION_ERROR and reason destructive_type, and nothing is registered, synced, carried or written to the ledger.
  • packages/cli/test/diff-upgrade-plan.test.ts, new describe: an extension field added to an owned object prints under it; an extension-only object prints its type change and is not an added or removed object.

Red first, each against origin/main's source with the fix committed (restore leg git checkout HEAD, proved by the HEAD blob hash and an empty git status):

  • package-upgrade-plan.ts at base: Tests 6 failed | 18 passed (24); the six are the new non-control cases, the control passes.
  • package-upgrade-environment.ts at base (side without objectExtensions): Tests 3 failed | 16 passed (19).
  • marketplace-install-rename-planner.ts at base: Tests 2 failed | 25 passed (27), the two 409 cases (the dry run case reads the test's own fold).
  • diff.ts at base: Tests 1 failed | 9 passed (10), the extension-only object.
  • The destructive_type extension case, by a one-off ablation (node scripts/ablation-replace.mjs, the objectExtensions read deleted from packageUpgradeSideOf; anchor 1 → 0, restored to the HEAD blob with git diff HEAD empty): Tests 1 failed | 27 passed (28), the new case only, which then installed 200. Restored: Tests 28 passed (28).

Acceptance notes

  • The card asked for "dropped (requires confirmation)". The ruling in package-upgrade-verdict.ts (ruling record 6709061297) says a removed field is reported by a dry run and refused by nothing, and this dispatch's ruling says extension fields count like owned ones with no new verdict category. So a dropped extension field is listed in fields.removed with its rows counted, and needs confirmation only where an owned drop does: beside an added stored field of the same object (a suspected rename), or as a retype to a type with no stored column (destructive). Both are pinned. Seat route ② (seat decision, not a maintainer ruling) keeps this reading.
  • An extension that redeclares a field another, uninstalled-here package owns. For an object owned outside the upgraded artifact, the comparison sees only the extension's fields, not the owner's. An extension that stops redeclaring an owner's field is then listed as a removed field (and can pair into a suspected rename), although the owner's field is still served. The registry warns about such redeclarations ("patch an owner field's display properties instead of redeclaring it"), and the error leans toward asking a confirmation, not toward skipping one. Seat route ① (seat decision, not a maintainer ruling): accepted as documented here.
  • fieldPatches change display properties only and store no column, so they stay out of the comparison.
  • content/docs/deployment/cli.mdx describes the schema confirmation in terms of "a stored field", which reads correctly for an extension field; it is not edited here.
  • Contract review: the upgrade door accepts less (the four arms under What changes), so a contract-review-tier L2 is owed before the queue.

Verification

Run on head 9b0824ae (origin/main merged in), every command through scripts/pm/os-verify-lock.sh.

Narrowing battery (full dogfood)
  • pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, no shard: exit 0, Test Files 475 passed | 3 skipped (478), Tests 4019 passed | 42 skipped (4061).
Package tests and typecheck
  • metadata-core vitest run: Test Files 27 passed (27), Tests 1038 passed (1038).
  • objectql vitest run --maxWorkers=2: Test Files 604 passed (604), Tests 13478 passed (13478).
  • cloud-connection vitest run --maxWorkers=2: Test Files 86 passed (86), Tests 1258 passed (1258).
  • cli vitest run --project unit --maxWorkers=2: Test Files 424 passed (424), Tests 6029 passed (6029).
  • typecheck of metadata-core, objectql, cloud-connection and cli (each with its test layer): exit 0.
dispatch-gates
  • At 432c9d2c (before the main merge, same changed paths): 72 families, 71 exit 0; check:dual-build-cjs-loads exit 3 (prerequisite: every package's dist), NOT MEASURED here, CI runs it. --ran reconciliation: 72 derived, 72 run, 0 unrun.

Generated by Claude Code

…nto their targets

Co-Authored-By: Claude <noreply@anthropic.com>
…ts verdict

Co-Authored-By: Claude <noreply@anthropic.com>
…sion fields

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 4 package(s): @objectstack/cli, @objectstack/cloud-connection, @objectstack/metadata-core, @objectstack/objectql, touching 12 documentable anchor(s).

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

  • content/docs/api/error-catalog.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/api/metadata-api.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/automation/hook-bodies.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/data-modeling/object-extensions.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/deployment/install-modes.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/deployment/marketplace-handbook.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/deployment/validating-metadata.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/getting-started/quick-start.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/kernel/services-checklist.mdx (via os diff (command, read off packages/cli/src/commands/diff.ts))
  • content/docs/protocol/backward-compatibility.mdx (via os diff (command, read off packages/cli/src/commands/diff.ts))
  • content/docs/protocol/kernel/i18n-standard.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/protocol/objectql/schema.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf), os diff (command, read off packages/cli/src/commands/diff.ts))

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

  • content/docs/releases/v17/17-5.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/releases/v18/18-0.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/releases/v18/18-3.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))
  • content/docs/releases/v18/18-4.mdx (via objectExtensions (symbol, a field of interface PackageUpgradeSide), objectExtensions (literal, a string literal in packageUpgradeSideOf; a string literal in sideOf))

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 — 57 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 a121e29c280aefb60fdbd48f3f765c5dc8902884 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from ae362da6d115afaf684eddf85eaf5fe5ae459277 — the merge of head 9b0824ae367aa8d525b7da230ea86077c70a96ed into base a121e29c280aefb60fdbd48f3f765c5dc8902884, 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 ae362da6d115afaf684eddf85eaf5fe5ae459277 && git checkout ae362da6d115afaf684eddf85eaf5fe5ae459277
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a121e29c280aefb60fdbd48f3f765c5dc8902884 9b0824ae367aa8d525b7da230ea86077c70a96ed && git checkout -B drift-repro a121e29c280aefb60fdbd48f3f765c5dc8902884 && git merge --no-ff 9b0824ae367aa8d525b7da230ea86077c70a96ed

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

⚠️ 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 a121e29c280aefb60fdbd48f3f765c5dc8902884 → 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

repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

Final head · area o1-E · 2026-11-16T16:45Z

Head-sha: 7bf9cf5
CI: every check-run on this head is success or an expected skip (Test Core 1–8/8, Type Check ×5, Lint ×9, Dogfood Regression Gate, Live E2E UI, Check Changeset, Governed Surface Queue Guard, PR-body guards); the two guards re-running after the body patch read the body only.
Card: #34095, claim 6918321707; full dogfood green on this head per the dev report (475 files / 4018 tests).
Clause-②: no (narrowing) · Metadata-protocol: none. The upgrade door accepts less, so a contract-review-tier L2 is owed; not into the queue before PASS.
Seat routes ① and ② (seat decisions, not maintainer rulings) are written into the body's 维护者速读; the card note on #34095 cites ruling record 6709061297 for ②.
Not governed (9 files, 398 changed lines), so the area lands it after L1 ACCEPT and L2 PASS.
L1 asked of the seat's L1 thread (L1-b) on this head.
Contract-review-handoff: l2-review#2 — CONTRACT_REVIEW_TIER unavailable (maintainer routing: this account's contract reviews go to the review seats, 2026-11-15T11:16Z) · head 7bf9cf5

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head 7bf9cf5 · 2026-11-16T16:47Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn

席位核对 · PR #34419 · L1-b · 2026-11-16T16:49Z

Head-sha: 7bf9cf500fca0a5d1d9a35207e533d576e438d2a

L1 · ACCEPT · area o1-E 定稿评论 6922829814 所钉 head。merge-base 898655a9,5 个提交加 1 个 main 合并,9 个文件。合并前后 PR 自身 diff 的 git patch-id --stable 相同(5923c475…)。

  • PR 形态:Fixes #34095。PR 只做平台这一半;cloud 那一半(upgradeSideOf)按卡面原文「The cloud seat files or takes that half once the platform shape is settled」交给 cloud 席位,去处有据。
  • 代码与 registry 的折叠一致:objectsByName 把扩展按 priority ?? 200 升序折叠,同 priority 时按列出顺序,字段按名整条覆盖,目标就是 extend 原文。这与 engine-registration.ts:324(ext.priority ?? 200)、registry-object-registration.ts:630(升序 sort)、registry.ts 中 mergeObjectDefinitions 的 { ...base.fields, ...extension.fields } 一致。added/removed 只看自有对象,只经扩展到达的对象只比较字段,不会列为新增或删除对象。os diff 对只经扩展到达的对象,label 比较前判空,不会解引用 undefined。
  • changeset 逐句核对:BREAKING 段(扩展字段改类型,或删一个同时加一个,都会 409)由 install-local 门的两条用例 pin 住。--confirm-upgrade 在 deploy.ts 和 package/install.ts 都有。「Before … listed no added field」与卡面 6.2.0 → 6.4.0 的读数一致。PackageUpgradeSide.objectExtensions 是可选键,不带该键时计划不变,有 CONTROL pin。fieldPatches 不参与比较。adr-0087 not-required 注释的理由成立:没有可编写键变化,也没有存储行变化。
  • 席位路线 ②(核过):引用的裁决记录 6709061297 是 Package upgrade plan: one framework comparison of installed vs new version (fields, types, renames, seeds) as a dry run; declared renamedFrom is planned, an undeclared rename or type change is refused unless confirmed (epic cloud#3652 Q3) #30884 PR 2 的维护者裁决,第 (ii) 条原文为「removed fields and seed changes are reported only」。package-upgrade-verdict.ts:121-122 的「Removed fields, removed objects, safe type changes and seed changes are reported by a dry run and refused by nothing」逐字在源码中。Package upgrade plan does not see fields added or removed by objectExtensions (6.2.0→6.4.0 preview: fields.added [] while 7 columns were added) #34095 卡上的说明评论 6922813677 引文准确,也写明这是席位决定、不是新裁决。扩展字段被单独删除时只列出不拒,与自有字段一致。
  • 席位路线 ①(核过):「偏向多要一次确认,不会漏掉一次」这一句,本 L1 另外核了反方向:新版本开始重声明外包拥有的字段并改其类型时,计划只会把它列为 added。这种改动在 install-local 门的 2e′ 一步(ADR-0146 D10 的显示属性白名单,judgeRedeclaredOwnerFields)就被 422 拒了,重声明只能改显示属性。所以计划漏掉的只有显示属性,不涉及存储列,原句成立。
  • 拒收测试:两条 409 用例都断言了 status 409 与 code SCHEMA_UPGRADE_CONFIRMATION_REQUIRED,也断言了 findings 与「什么都没写」。红绿与 ablation 读数在正文中,四个源文件各自回退后变红。
  • 范围外:dev 报告中另一条(marketplace-install-declared-renames.ts 的 extensionTarget 读别名键)理由是「not exercised」。ObjectExtensionSchema 只有 extend 一个键,别名读到的是不会通过 parse 的拼法,所以这条理由可以接受。
  • 门禁:本 head 共 55 条 check-runs,37 条 success、18 条 skipped,0 条失败,包括 Test Core 1–8 与聚合 job、Lint 与 Type Check 各分片、Dogfood Regression Gate、Check Changeset、Governed Surface Queue Guard。
  • battery:标题带 !,narrowing。dev 报告 6922677907 的全量 battery 钉在 7bf9cf50:VERDICT command-exit 0,Test Files 475 passed | 3 skipped,Tests 4018 passed | 42 skipped。

落地条款:非受管路径,由区线程落地;须同时具备本 ACCEPT、review#2 的 CONTRACT_REVIEW_TIER PASS(已认领)、钉在本 head 的 battery,以及 narrowing 落地前 label-write --land 的核对。再合 main 会移动 head,battery 须在新 head 重跑。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7bf9cf500fca0a5d1d9a35207e533d576e438d2a
Local-runs: none
Scope: packages/metadata-core/src/package-upgrade-plan.ts, packages/metadata-core/src/package-upgrade-plan.test.ts, packages/objectql/src/package-upgrade-environment.ts, packages/objectql/src/package-upgrade-environment.test.ts, packages/cloud-connection/src/marketplace-install-rename-planner.ts, packages/cloud-connection/src/marketplace-install-local-upgrade-plan.test.ts, packages/cli/src/commands/diff.ts, packages/cli/test/diff-upgrade-plan.test.ts + read as cited, not reviewed: packages/objectql/src/engine-registration.ts (registerPackageBody step 2b), packages/objectql/src/registry.ts (mergeObjectDefinitions), packages/objectql/src/registry-object-registration.ts (foldExtendersOntoDefinition), packages/objectql/src/registry-top-level.ts, packages/metadata-core/src/package-upgrade-verdict.ts, packages/cloud-connection/src/marketplace-install-declared-renames.ts, packages/cloud-connection/src/marketplace-install-local-plugin.ts, packages/core/src/stack-collections.ts, packages/cli/src/utils/stack-collections.ts
Security-touching: no

First record on this PR; no earlier findings to close. Card #34095 read with comments 6899454419, 6918052417, 6918208447, 6918321707, 6922677907, 6922813677; PR comments 6921109056, 6922829814, 6922882363.

① Derived judgments

  • PackageUpgradeSide.objectExtensions (optional input key): right. A side without it compares as on main; the CONTROL pin proves byte-identity.
  • The fold in objectsByName: right against the registry. Owner is the base whatever the numbers, extensions spread fields by name in ascending priority, default 200, ties in listed order (registerPackageBody 2b: ext.priority ?? 200; contributors.sort; mergeObjectDefinitions spread). The target key is extend verbatim: computeFQN is identity on main, so no namespace rewrite is missed.
  • Extension-only objects never in plan.objects.*, compared against an empty other side: right. readTouchedColumns counts by object name, so their columns are read.
  • Accept-set of the install-local door narrows: right in direction (ruling Q3 made real for extension fields), wider than the changeset says, see S1.
  • os diff: prints more rows; no exit-code change (breaking count is printed only). Right.
  • sideOf / packageUpgradeSideOf parity: same three keys, same reader. Right. The hosted upgradeSideOf stays with the cloud seat per the card.

② Semver level

patch on four packages with !, BREAKING banner and one ADR-0087 marker (not-required (no-migration-prescription)) is the level AGENTS.md step 3 sets for a non-protocol narrowing. Clause-②: no (narrowing) and Metadata-protocol: none stand on both PR body and changeset: no authorable key or accepted value moves. Check Changeset and Lint & Repo Gates are green.

S1 (should-fix) — the changeset's BREAKING and "Who moves" text names two arms (extension field retyped; extension field dropped beside an added one, both 409). The diff publishes two more that it does not name:
(a) an OWNED stored field dropped while an extension of the same object adds a stored field (or the reverse) is now a suspected rename, 409. On main the two sat in different collections and never paired. Follows from objectsByName merging both into one field map.
(b) an extension field whose renamedFrom is a declared rename and whose new type stores no column now reaches planInstallDeclaredRenames as a destructive type change and is refused 422 VALIDATION_ERROR reason destructive_type at step 2c″. No token answers it, so the stated fix (--confirm-upgrade) is wrong for this arm. planDeclaredRenames feeds comparePackageVersions(...).typeChanges, which now carries extension fields.
Required: name both arms in the changeset and PR body with their fix, and pin (b) in marketplace-install-local-declared-rename.test.ts (its destructive_type cases are owned-field only).

③ Boundary flags

  • Open question 1 (extension redeclaring a field of an owner outside the artifact is listed removed when the redeclaration stops): accept A. B would hand the comparison an environment reading against ruling record 6709061297 C3 (verdict decided by the two bodies alone). Errs toward a confirmation.
  • Open question 2 / card note 6922813677 (card says "dropped (requires confirmation)"): accept A. package-upgrade-verdict.ts on main states removed fields are refused by nothing; the claim (6918321707) bars a new verdict category. A lone drop is listed with rows counted, which closes the measured rollback defect. The card line is superseded, not met; it is a seat route, so the maintainer reads it in 维护者速读 before landing.
  • Deviation (pins in existing harness files, diff.ts edited): inside the claim's file surface for callers; accepted.
  • Dev report: cloud-connection full suite and cli unit tier not run locally; Test Core 1–8/8 is green on this head.
  • Check-runs on the head: every run success or skipped; no red.
  • SQL push-down: no new id materialisation or in-app join; column readings stay one count each, as before.
  • Author login is objectstack-fleet[bot].

④ Design judgment

The narrowing makes an existing refusal real rather than taking a capability away: an extension field stores a column like an owned one, and ruling Q3 already asks the confirmation for that column. Tried to break it:

  • Field on an object the package does not own: compared, never an object row. Holds.
  • Removal across upgrade and rollback: listed, rows counted. Holds.
  • Duplicate name between owner and extension: the extension's definition is compared, as the registry serves it. Holds; unpinned (N2).
  • Renames: renamedFrom on an extension field flows through unchanged code; see S1 (b).
  • Tests: red-first figures given per file; assertions are on plan content, status and error.code, not on mirrors. The dry-run case reads the test's own fold, as the PR body states.

N1 (nit) — ownership transition: an object owned on one side and extension-only on the other is listed in plan.objects.* AND has its fields compared, so every owner field is also a removed or added field (and can pair as suspected renames). Over-asks, never under-asks; unpinned and undocumented.
N2 (nit) — no pin for equal-priority order, for an extension overriding an owner's field, or for a declared rename of an extension field in package-upgrade-plan.test.ts.
N3 (nit) — the registry drops an extension's audit and queue fields where the base plans them (foldExtendersOntoDefinition); the comparison counts them. Over-lists only.
N4 (nit) — diff.ts compared.includes in a loop is quadratic in objects; a Set reads the same.

No must-fix. One should-fix (S1), open until a delta read.

Implemented-by: claude/issue-34095-upgrade-plan-extensions
Reviewed-by: session_01FEkQ5mjfxPu5HKjUtuveBR

VERDICT: PASS

…xtension destructive_type refusal

Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

Delta head · area o1-E · 2026-11-16T18:24Z

Head-sha: 432c9d2 (one commit over 7bf9cf5; changeset and one test file only, no source change)
Answers review#2 S1 (record 6923010837): the changeset and the body now name four arms with their fixes, including (a) an owned stored field dropped while an extension of the same object adds one (or the reverse) → 409 suspected rename, token; (b) an extension field with renamedFrom whose new type stores no column → 422 VALIDATION_ERROR destructive_type at step 2c″, no token answers it. Arm (b) is pinned in marketplace-install-local-declared-rename.test.ts (28/28; ablation removing objectExtensions from packageUpgradeSideOf turns exactly that case red, 200 vs 422; restored, blob = HEAD). Nits N1–N4 not taken.
Battery on this head (dev report 6925163855 on #34095): VERDICT command-exit 0, Test Files 475 passed | 3 skipped, Tests 4018 passed | 42 skipped. dispatch-gates 72/72 run, 71 exit 0, check:dual-build-cjs-loads not measured locally (exit 3, CI runs it).
CI on this head: every check suite completed with none failed (17:31Z); the body patch re-runs only the body guards.
Delta asked of L1-b and of review#2 (S1 delta read). Land after both, with label-write --land on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head 432c9d2 · 2026-11-16T18:25Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn

席位核对 · PR #34419 · L1-b · delta · 2026-11-16T18:27Z

Head-sha: 432c9d2cdde0d5941ef1b6d7c701be7b0508a2a4(自 7bf9cf50 起 1 个提交,2 个文件 +32/−2,没有改源码)

结论:delta ACCEPT。

  • changeset: BREAKING 段现在列出四条:两种 409 原有的情形,加上 review#2 S1 要求的 (a)(b) 两条。
    • (a) 本对象自有字段与扩展字段之间的疑似改名,答 409。
    • (b) 扩展字段用 renamedFrom 改成不存列的类型,答 422 VALIDATION_ERROR,reason: 'destructive_type',"No token answers this refusal"。
    • "Who moves" 分别给出修法。422 那条的修法和拒绝消息原文一致:marketplace-install-declared-renames.ts:200-202:"Keep a stored type for the renamed field, or carry the values by hand."
  • 新用例(marketplace-install-local-declared-rename.test.ts):扩展字段 company 改名为 formula 字段 account_name。断言 status 422、error.code 为 VALIDATION_ERROR、details.refusals 精确等于 object/field/from/reason 四项,并且 refusedBefore 证明没有任何写入。code 与 status 都钉了。
  • 正文:
    • 消融的读数写在正文里:删掉 packageUpgradeSideOf 里对 objectExtensions 的读取后 1/28 红(只红新用例,它会以 200 装上),还原后 28/28。
    • battery 钉在 432c9d2c:475 个文件、4018 通过。
    • 72 个门禁族里 71 个 exit 0;check:dual-build-cjs-loads exit 3,正文已如实标为 NOT MEASURED,由 CI 承担。
  • CI(本 head): 37 success、18 skipped,无失败,没有在跑的检查。

落地条款不变:须 review#2 对本 head 的 S1 delta 复读 PASS(已认领 6925266614),再执行 label-write --land,按席位的落地路线走。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 432c9d2cdde0d5941ef1b6d7c701be7b0508a2a4
Local-runs: none
Scope: delta only, 7bf9cf50..432c9d2c: .changeset/34095-upgrade-plan-object-extensions.md, packages/cloud-connection/src/marketplace-install-local-declared-rename.test.ts + read as cited, not reviewed: packages/cloud-connection/src/marketplace-install-declared-renames.ts (planInstallDeclaredRenames), packages/cloud-connection/src/marketplace-install-rename-planner.ts (packageUpgradeSideOf), packages/metadata-core/src/package-upgrade-verdict.ts. Everything else carries from record 6923010837.
Security-touching: no

Delta read of record 6923010837 (PASS at 7bf9cf500fca0a5d1d9a35207e533d576e438d2a, S1 open), asked by knock 6925251805 and delta note 6925231306. One commit on top, no merge, merge-base with main unchanged (898655a9); it touches the changeset and one test file, no source. PR body re-read at this head.

① Derived judgments

No accept-set or public-surface change in the delta: no source file moves. The four arms the changeset now lists are the four the diff publishes, as judged in 6923010837 ① and S1.

② Semver level

Level, !, BREAKING banner, ADR-0087 marker, Clause-②: no (narrowing) and Metadata-protocol: none unchanged and still right. Check Changeset green on this head.

S1 — closed.
(a) Named in the changeset as the third arm (owned stored field dropped while an extension of the same object adds one, or the reverse; 409 SCHEMA_UPGRADE_CONFIRMATION_REQUIRED as a suspected rename, with the reason: one field map). Fix stated: the token (--confirm-upgrade <token>), and the refusal's other way forward. Right against schemaUpgradeVerdict: a suspected rename is a confirmable finding and its text names renamedFrom.
(b) Named as the fourth arm: 422 VALIDATION_ERROR, details.refusals[].reason: 'destructive_type', before any write, "No token answers this refusal". Fix stated for the package author: keep a stored type for the renamed field, or carry the values by hand. That is the refusal's own message in planInstallDeclaredRenames, word for word.
Pin: the new case installs a package that holds ONLY an objectExtensions entry on acme_lead (no owned object), renames company to a formula with renamedFrom, and asserts status 422, error.code VALIDATION_ERROR, and refusals equal to exactly one entry with reason: 'destructive_type', then refusedBefore (nothing registered, carried or written). Not tautological: without objectExtensions in packageUpgradeSideOf the planner gets no type change, the fake driver plans a carry (old column present, new absent, old key in the prior extension) and the install answers 200; the dev's ablation reports exactly that case red.
PR body: 维护者速读, "What changes" and Tests carry the same four arms and both fixes; it agrees with the changeset.
The changeset text now matches what the diff publishes; no arm is unnamed.

③ Boundary flags

  • Open questions 1 and 2: unchanged, accepted as in 6923010837.
  • Check-runs on this head: every run success or skipped; no red. Test Core 1–8/8, Dogfood Regression Gate, Lint & Repo Gates, both PR-body guards runs green.
  • SQL push-down: nothing in the delta.
  • New PR comments since 6923010837: 6925231306 (delta note), 6925266614 (this seat's claim). No new flag.

④ Design judgment

No design moves. The new test sits beside the owned destructive_type case and reads through the real door and planner; its served map and driver columns make the carry path the only alternative outcome, so the assertion separates the two heads.

No must-fix, no should-fix.

Carry-over, all nits, not taken (6925231306), none blocks:
N1 (nit) — ownership transition (owned on one side, extension-only on the other) over-asks; unpinned and undocumented.
N2 (nit) — no pin for equal-priority order or an extension overriding an owner's field in package-upgrade-plan.test.ts; the declared rename of an extension field is now pinned at the door, not in the plan test.
N3 (nit) — the comparison counts an extension's audit and queue fields the registry drops; over-lists only.
N4 (nit) — diff.ts compared.includes in a loop; a Set reads the same.

Implemented-by: claude/issue-34095-upgrade-plan-extensions
Reviewed-by: session_01FEkQ5mjfxPu5HKjUtuveBR

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract-review-claim: session_01FEkQ5mjfxPu5HKjUtuveBR · head 9b0824a · 2026-11-16T19:31Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-project-manager · session_01FEkQ5mjfxPu5HKjUtuveBR

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 9b0824ae367aa8d525b7da230ea86077c70a96ed
Local-runs: none
Scope: merge-only; the PR's own patch is unchanged. Read: the merge commit, git log 898655a9..a121e29c (15 commits from main), and where main meets the PR's paths: packages/cloud-connection/src/marketplace-install-local-plugin.ts, packages/cloud-connection/src/marketplace-install-rename-planner.ts (packageUpgradeSideOf), packages/objectql/src/package-upgrade-environment.ts (sideOf), packages/core/src/stack-collections.ts (resolveStackCollection), packages/cli/src/commands/diff.ts. Everything else carries from records 6923010837 and 6925311152.
Security-touching: no

Delta read of record 6925311152 (PASS at 432c9d2cdde0d5941ef1b6d7c701be7b0508a2a4). No announce was made for this head; the seat took it on patrol. The head is one merge of main (a121e29c) into the branch, parents 432c9d2c and a121e29c. git diff 898655a9 432c9d2c | git patch-id --stable and git diff a121e29c 9b0824ae | git patch-id --stable both give f3e5c1bb41e706e39b1ed05f79a8edc281104ff4. git show --cc 9b0824ae is empty: no conflict was resolved by hand. git diff a121e29c 9b0824ae --stat is the same 10 files (the changeset, 3 source, 6 test), 400 insertions, 28 deletions, as at the prior head.

① Derived judgments

No accept-set or public-surface change: the patch against main is byte-identical to the one judged in 6923010837 and 6925311152. main brought no change to packages/metadata-core/src, to packages/objectql/src/package-upgrade-environment.ts, to packages/cli/src/commands/diff.ts, to marketplace-install-rename-planner.ts or to marketplace-install-declared-renames.ts; in packages/objectql it touched one unrelated test only.

② Semver level

Changeset, level, !, BREAKING banner, Clause-②: no (narrowing) and Metadata-protocol: none unchanged and still right. Check Changeset green on this head.

③ Boundary flags

  • Check-runs on this head: every run success or skipped; no red. Test Core 1–8/8, TypeScript Type Check, Lint & Repo Gates, Dogfood Regression Gate, PR-body guards, Check Changeset green.
  • Open questions 1 and 2: unchanged, accepted as in 6923010837.
  • SQL push-down: nothing in the delta.

④ Design judgment

Asked: do the composed-bundle changes on main (#34403 seeds, #34418 uninstall, #34428 translations and global uniques) feed the upgrade plan a side the objectExtensions fold does not cover? No; the paths are independent.

No must-fix, no should-fix.

Carry-over: S1 closed (6925311152). Nits as before, not taken, none blocks:
N1 (nit) — ownership transition (owned on one side, extension-only on the other) over-asks; unpinned and undocumented.
N2 (nit) — no pin for equal-priority order or an extension overriding an owner's field in package-upgrade-plan.test.ts.
N3 (nit) — the comparison counts an extension's audit and queue fields the registry drops; over-lists only.
N4 (nit) — diff.ts compared.includes in a loop; a Set reads the same.

Implemented-by: claude/issue-34095-upgrade-plan-extensions
Reviewed-by: session_01FEkQ5mjfxPu5HKjUtuveBR

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

Final head · area o1-E · 2026-11-16T19:42Z

Head-sha: 9b0824a = 432c9d2 + a merge of main a121e29 (15 commits; K was 15). Merge-only: git diff <merge-base> <head> | git patch-id --stable is f3e5c1bb41e7 at 432c9d2 (base 898655a) and at 9b0824a (base a121e29); no conflict resolved by hand.
Battery on this head (dev report 6927135884 on #34095): exit 0, Test Files 475 passed | 3 skipped, Tests 4019 passed | 42 skipped. Package suites: metadata-core 1038, objectql 13478, cloud-connection 1258, cli unit 6029, all passed; typecheck of the four packages exit 0.
CI on this head: 35 success, 16 skipped, none failed.
Governed: check-governed-merges --pr 34419 reads NOT governed, 10 files, 428 changed lines. K = 4 since merge-base a121e29.
L2: review#2 merge-only delta 6926971416 on this head, no must-fix or should-fix. Merge-only delta asked of L1-b; land with label-write --land after it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn

席位核对 · PR #34419 · L1-b · merge-only delta · 2026-11-16T19:43Z

Head-sha: 9b0824ae367aa8d525b7da230ea86077c70a96ed(合并提交,父提交为 432c9d2c 与 main a121e29c)

结论:merge-only ACCEPT。 这次合并没有改变本 PR 的内容。

  • patch-id: 用 git diff <merge-base> <head> | git patch-id --stable 计算。
    • 432c9d2c(merge-base 898655a9)与 9b0824ae(merge-base a121e29c)都得到 f3e5c1bb41e7,两者相同。
    • 本 PR 的内容仍是我 delta ACCEPT 6925304232 读过的那份。
  • 读数(区线程提供):
    • 测试组在本 head 上 475/4019 全过,终版 head 评论 6927159103。
    • review#2 的 merge-only 复读 6926971416 没有 must-fix 和 should-fix。
  • CI(本 head,我自己读的): 36 success、18 skipped,无失败,还有 1 项在跑。落地前须全绿。

落地条款:按席位的落地路线执行 label-write --land。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5pNoRjsgMJKr5utN33

Land · area o1-E · 2026-11-16T19:43Z

Reading Value
Head 9b0824a = 432c9d2 + a merge of main a121e29; the PR's own diff is unchanged: git patch-id --stable f3e5c1bb41e7 at 432c9d2 (base 898655a) and at 9b0824a (base a121e29)
L1 L1-b ACCEPT 6922937983 → delta ACCEPT 6925304232 (432c9d2) → merge-only ACCEPT 6927176861 (this head)
L2 review#2 PASS 6923010837 → S1 delta PASS 6925311152 → merge-only read 6926971416 on this head, no must-fix or should-fix
Battery on the head dev report 6927135884: Test Files 475 passed, 3 skipped; Tests 4019 passed, 42 skipped; exit 0
Check-runs on the head none failed (35 success, 16 skipped when read at 19:42Z)
Governed check-governed-merges --pr 34419: NOT governed, 10 files, 428 changed lines
Base drift K = 4 since merge-base a121e29, which carries the #34435 fix for main's check:platform-checklist red

State: ready for review and auto-merge enabled. Fixes #34095 (platform half). The cloud half (service-cloud upgradeSideOf passes objectExtensions) stays with the cloud seat.

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 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

Development

Successfully merging this pull request may close these issues.

Package upgrade plan does not see fields added or removed by objectExtensions (6.2.0→6.4.0 preview: fields.added [] while 7 columns were added)

1 participant