Skip to content

fix(objectql): a package registered again stops serving an object extension its new manifest dropped - #36325

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-35609-reregister-extension-withdraw
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/issue-35609-reregister-extension-withdraw

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #35609

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:开发者在本地开发热重载时删掉扩展包给别人对象加字段的声明、或升级/重装一个不再加这些字段的扩展包后,这些字段会立刻从对象上消失,不再需要重启。
  • 为什么做:修复「扩展包升级后旧字段还挂在对象上」的数据配置错误,替做扩展包升级和本地开发热重载的构建者解决。
  • 出错会怎样:最坏情况是某个包重新注册时误撤了它仍声明的扩展字段,字段在界面和接口上暂时消失;已存数据不受影响,回滚此改动或重启即可恢复。
  • 要你做什么:无。

What changes

SchemaRegistry.replacingPackageBody (the wrapper around every ObjectQL.registerApp body registration, which since #33050 withdraws the items a new body no longer ships) now does the same for object extensions:

  • Before the body registers, it notes the package's current extend layer of each object. After it registers, a layer that is a new contributor is one this body wrote (the extend splice always replaces the package's layer with a new contributor).
  • The layers the previous body wrote, for objects the new body no longer extends, are withdrawn through withdrawObjectExtension, the existing per-object withdrawal the object_extension item delete uses (uninstall's package-wide walk is not reused: it also removes owned objects). Only the very layer the previous body wrote is withdrawn, so a layer another door registered under the package id since (the object_extension item door) is kept.
  • withdrawObjectExtension now records the object's layers in an open registration run before it removes one (noteObjectEntry), so a refusal later in the run (a later artifact member, the run-end follow door) puts the extension back. Outside a run this is a no-op, so the item-delete caller is unchanged.
  • The record (packageBodyExtensions) is put back on refusal and forgotten by uninstallPackage, beside packageBodyItems.

Everything an extension contributes rides on its one contributor layer (fields, fieldPatches, label texts, validations, indexes), so all of it leaves together. Stored data is untouched: the column keeps its values and schema sync drops nothing; the field is no longer served.

Measure first (the card's steps), on main c30ce97cd7

Path Re-registers without uninstalling? Dropped extension's field still served on main? What said anything
Bare registerApp (card repro) yes yes: field, validation and index all served, com.t.mod:extend layer kept nothing
os dev reload: metadata:reloaded → ObjectQLPlugin.refreshReloadedPackages → registerApp yes (refresh, never uninstall) yes nothing: no warn, schema sync adds only
os dev reload, full standalone composition (createStandaloneStack, the artifact door's _reloadAndAnnounce) yes NOT MEASURED on this composition: neither the first run nor the hand-over round got the shared verify lock (the round queued about 80 minutes behind two dogfood batteries). The probe is written (a two-package composed artifact, the extension dropped by the door's own reload, plus a CONTROL reload) and is held by the seat; it reaches the same metadata:reloaded hook measured in the row above nothing
install-local upgrade 1.0.0 → 1.0.1 dropping the extension (manifest.register, no uninstall) yes yes: crm_line served and find returned cb_account the dry run's plan DID say so: plan.fields.removed names crm_line.cb_account, environment.columns reasons: ['removed'], rows: 1; removed fields need no confirmation (schemaUpgradeVerdict: reported, refused by nothing), so the upgrade answered 200 and then kept serving the field the plan said was removed
install-local re-install of the same id and version without the extension yes yes nothing

Stored column, both before and after the fix: crm_line.cb_account keeps its column and its value ACME (schema sync drops no column).

After the fix every row above reads "no": the object serves name only, find no longer returns cb_account, the column still holds ACME, and the dry run's plan is unchanged (it already named the field as removed; now the runtime agrees with it).

Tests

  • packages/objectql/src/reregister-extension-withdraw-35609.test.ts (new): re-register without the extension (fields, validation and index gone, owner kept); CONTROL rename; another package's extension of the same target untouched; same body again keeps it; an extension registered under the id outside a body kept; a refusal later in the run puts it back (and the record with it); the reload door drops it, CONTROL reload keeps it.
  • packages/cloud-connection/src/marketplace-install-local-reregister-extension-withdraw-35609.test.ts (new): real kernel, SQL driver, real schema sync, the install-local door: upgrade dropping the extension (plan names the field, object no longer serves it, column keeps its value), same-version re-install, CONTROL upgrade keeping it.
Readings (ablation: the four fixed objectql files put back to main, then restored byte-identical to HEAD)

One locked run, unfixed-vs-fixed legs over the same two commands. The objectql and cloud-connection suites both resolve @objectstack/objectql to packages/objectql/src (stack frames read ../objectql/src/...), so no dist rebuild was involved; the on-disk proof is the marker count (packageBodyExtensions in registry-items.ts: 0 in the unfixed leg, 9 in the fixed leg) and the restore was proven by an empty git diff HEAD and matching git hash-object = HEAD:path for each file.

  • UNFIXED (main's four files): reregister-extension-withdraw-35609.test.ts 5 failed / 3 passed (the controls pass), package-refused-upgrade-keeps-installed and manifest-service-artifact-refusal-restores green: Tests 5 failed | 76 passed (81). Install-local readings: served after upgrade [ 'cb_account', 'name' ], find returns "cb_account":"ACME", re-install without the extension [ 'cb_account', 'name' ].
  • FIXED (HEAD): Test Files 3 passed (3) · Tests 81 passed (81); install-local served after upgrade [ 'name' ], find row has no cb_account, column after upgrade {"hasColumn":true,"values":["ACME"]}, re-install without the extension [ 'name' ].
  • pnpm --filter @objectstack/objectql test at the fix (objectql src as on head 555ef3e2c7): Test Files 627 passed (627) · Tests 14240 passed (14240).
  • pnpm --filter @objectstack/objectql typecheck: exit 0 (tsc --noEmit, then check:test-typecheck: OK, debt held).

Acceptance notes

  • Clause-②: no. Nothing is refused: a body registered again is never refused over an extension it drops; the dropped layer is withdrawn.
  • Owned objects a re-registered body no longer ships are still kept until a restart; ingestReloadedObjects' docblock calls that deliberate ("same lifecycle as their tables"). Not touched here.
  • ObjectQLPlugin.refreshReloadedPackages' docblock still says items removed from the artifact stay registered until restart; that has been out of date since the item withdrawal landed and is now out of date for extensions too. Not edited (outside this card's file surface). Carried by review follow-ups of PR #36325 #36328.
  • Inferred, not exercised: a withdrawal (this one, an uninstall, an object_extension item delete) is not asked the run-end record-currency follow door, which judges registered layers only. A withdrawn extension carrying a currency code field another package's amount follows would leave that pair unjudged until the follower re-registers. Same gap for the two existing withdrawal doors; not filed. Carried by review follow-ups of PR #36325 #36328.
  • Inferred edge: if a withdrawn layer was the object's last contributor (an extension with no owner, already an ADR-0029 violation), the entry is closed and a refusal later in the run restores the contributor list without reopening the entry. Unreachable through a valid registration.
  • Serial constraint: feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 (shares registry.ts, and places extension items in the fold) has since landed on main as d33bf5a2. overlap-check against origin/main d8599c2ca2 reads clean, and GitHub reports the PR mergeable. This PR's CI ran on the merge with 99fbaa6d, before feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 landed, so the joint tree is first tested in the merge queue. Read, not run: a placement rides on its extension's contributor layer and is applied in the fold, so a withdrawn layer takes its placements with it. registry-object-registration.ts is not touched.
  • Prior rulings: check-prior-rulings --card 35609 over the four files read; no conflict. The closest precedents are the item withdrawal this extends (same wrapper, same restore discipline), ADR-0144 D2/D6 (the run-end follow door, unchanged), ruling A on objectExtensions: two entries for one object in the same package silently drop the earlier entry's fields #35228 (one extension per target per package, unchanged) and ruling 6624345766 (facade form: registry.ts gains only a state field, docblocks and host wiring; check:facade-delegation-only green). Since main grew registry.ts, the file also sits under its facade line ceiling (6426, ruling 6897467376): the long registry: re-registering a package whose new manifest no longer extends an object keeps the old extension's fields served #35609 prose lives in the facet docblock in registry-items.ts, and the ceiling is not raised.

Verification

Merge-queue red at 555ef3e, fixed at 368b000 (repo:objectstack#7)
  • What failed: the merge queue dequeued this PR (merge-group run 45007098161, job 137160994478, Lint · repo & tooling gates). check-facade-delegation-only --self-test case N6 printed: the committed registry is red: is 6441 lines, over its line ceiling of 6426 by 15. The PR was green on its own head. Main had grown registry.ts to 6409 lines, and this PR's +32 went over the ceiling.
  • Fix (53d2506ddb, 368b000bed): merged origin/main 4e55e4eb72 (a merge, no rebase, no force-push). Then I did what the rule says to do: "a file in facade form does not grow". The detailed extension-withdrawal prose moved from the facade docblocks to the facet docblock on ItemsFacet.replacingPackageBody (registry-items.ts). The facade keeps a short contract paragraph, and the field doc is one line. The ceiling row is untouched, so the check is not weakened.
  • Comment-only proof: both files were transpiled with removeComments, before and after 368b000bed. Each pair is byte-identical (registry.ts sha256 prefix b87e53ad1efa both sides, registry-items.ts afb1b850be15 both sides). A control leg with one injected token compared different (cmp exit 1).
  • pnpm check:facade-delegation-only: exit 0. N6 the committed registry is well-formed against this checkout passes, and the check prints packages/objectql/src/registry.ts: 6421 lines, ceiling 6426 (5 left; ruling 6897467376).
  • dispatch-gates --commands at 368b000bed: 73 derived. 71 exit 0. check:dual-build-cjs-loads and check:type-check-debt exit 3 (PREREQUISITE NOT MET: no full dist/), so NOT MEASURED locally and carried by CI's Build Core and debt-ledger lanes. --ran with exit codes: 73 derived, 71 run, 2 NOT-MEASURED, 0 unrun. Gate derivation read a tree 7 commits behind the newest origin/main ff60149900. None of this PR's files moved there, so I did not merge again.
  • overlap-check --branch: VERDICT clean exit 0 against origin/main ff60149900.
  • NOT MEASURED locally: the @objectstack/objectql test suite and typecheck at the merged head. Reason: the shared verify lock. Three 9-minute tries all ended in queue-timeout behind a dogfood battery (holder pid 13599, more than 39 minutes). This is a declared narrowing. The fix commit compiles to identical JS (proof above), and CI's Test Core and Type Check lanes run both on the merge. The objectql dependency closure did build under the lock (VERDICT command-exit 0).
Local gates at 555ef3e
  • dispatch-gates --commands: 73 commands derived; all run. 70 exit 0. check:query-options-erasure went red (test surface 236 to 237) on a cast in the new cloud-connection pin; fixed in 555ef3e2c7 and re-run green (236). check:dual-build-cjs-loads and check:type-check-debt exited 3 (PREREQUISITE NOT MET: no full dist/, and the closure build never got the shared lock): NOT MEASURED locally, CI's Lint & Repo Gates carries both.
  • Re-run on the final head after the last edit: cross-package-test-inputs, test-source-alias, nul-bytes, refd-timer-probe, tier-file-adoption, issue-citations, doc-authoring, facade-delegation-only: all exit 0.
  • dispatch-gates --ran: 73 derived, 73 run, 0 unrun.
  • overlap-check --branch=HEAD: clean against origin/main and feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236.
  • Not run locally, declared to CI: test:repo, the full cloud-connection suite (only the new file was run), and the Build Core / Type Check workspace lanes. CI has since run all of them at this head (round below).
  • Dogfood battery: not owed (no !, no narrowing arm).
Hand-over round (repo:objectstack#7) at the same head 555ef3e: the local gaps closed

No commit in this round; the head declared final stays 555ef3e2c7. CI ran this head on the merge with 99fbaa6d (b97f554d), and every gate-carrying check-run concluded success.

  • Cloud-connection new file, rerun after the cast removal: Test Core at this head, @objectstack/cloud-connection:test printed src/marketplace-install-local-reregister-extension-withdraw-35609.test.ts (3 tests) passed. The objectql file printed src/reregister-extension-withdraw-35609.test.ts (8 tests) passed. All 10 Test Core shards: success.
  • Cloud-connection typecheck: Type Check · workspace ran @objectstack/cloud-connection:typecheck; Tasks: 124 successful, 124 total; success.
  • check:dual-build-cjs-loads: Build Core step "Every published require entry point actually loads": success.
  • check:type-check-debt: Type Check · debt ledger step "Re-measure the type-check DEBT / TEST_DEBT ledger": success, lane verdict success.
  • Derived gates re-run locally at 555ef3e2c7, against origin/main c448c615: dispatch-gates --commands derived 73 commands. 68 exited 0. Five exited 3, PREREQUISITE NOT MET (no built dist/; the closure build never got the lock). CI carries all five at this head with success: dts-closure (Build Core "Sweep the built closure for vanished declarations"), dual-build-cjs-loads, lean-entry-closure (Build Core "The lean engine entry loads no forbidden or unlisted package"), sourcemap-no-sources-content (Build Core "No published source map embeds source text") and type-check-debt (above). dispatch-gates --ran with the exit codes recorded: 73 derived, 68 run, 5 NOT-MEASURED (derived from exit 3), 0 unrun.
  • Still NOT MEASURED: the full createStandaloneStack reload probe. Reason: the shared verify lock. This round queued about 80 minutes behind two dogfood batteries (holder pid 5424 over 67 minutes), and retaking the same slot after each exit 99 put the call back behind newer arrivals. No CI job runs this probe.

Two-minute check: pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/reregister-extension-withdraw-35609.test.ts prints 8 passed; revert registry-items.ts to origin/main and the same command prints 5 failed.

Read first, by risk: packages/objectql/src/registry-items.ts (replacingPackageBody, the identity test that decides which layers the body wrote), packages/objectql/src/registry-platform-global.ts (withdrawObjectExtension now notes the run), packages/objectql/src/registry.ts (host wiring and the record).

Written by repo:objectstack#4 · os-project-manager · session_01FEkQ5miLqNucRZevceHwNh (PM-dispatched dev run); continued after the hand-over by repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC

… drops an object extension (WIP probes)

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
…nsions its new manifest no longer declares

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
…that drop an object extension; changeset

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

19 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 761220c6ad6101576e4ce41c2aa5e0a721a50589.

⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • the SDK route bridge reached 68 of 250 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 — 21 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 761220c6ad6101576e4ce41c2aa5e0a721a50589 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 761220c6ad6101576e4ce41c2aa5e0a721a50589

⚠️ 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 761220c6ad6101576e4ce41c2aa5e0a721a50589 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@github-actions github-actions Bot added size/l 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 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT · head 555ef3e2c7c32127acdc5145ce01d78e87c96cd6 · 2026-11-22T09:18Z

维护者速读

  • 用户能看到什么变化:一个包被再次注册时,如果新版本不再扩展某个对象,旧扩展加在该对象上的字段、校验和索引会立刻下线,不用等到重启。再次注册包括三种情况:os dev 重新加载、市场 install-local 升级、同版本重装。
  • 为什么做:卡 registry: re-registering a package whose new manifest no longer extends an object keeps the old extension's fields served #35609(p1)。修之前,升级的预演计划已经列出「该字段将被移除」,接口也回答 200,但这个字段之后照样能查出来,运行时和计划说的不一致。
  • 出错会怎样:库里存的数据不动,列和值都保留,只是这个字段不再对外提供。同一次注册后面如果被拒,撤下的扩展会原样放回。别的包对同一对象的扩展,以及不是由包体注册的扩展,都不受影响。只改 @objectstack/objectql,可以整体撤回。
  • 要你做什么:无。
  • 席位意见:ACCEPT。Clause-②: no,Metadata-protocol: none,不欠 L2;非受管,由席位落地。

席位核对

  • 形态:l1-face --pr 36325 只有一项标记,是 changeset:@objectstack/cloud-connection 只加了一个测试文件,没有 changeset 条目。我已清除这项标记,理由是这个包的 files 只有 dist、README.md、CHANGELOG.md,构建入口只有 src/index.ts(根目录 tsup.config.ts:6),测试文件不会发布。其余各项都是 ok:draft、base main、Fixes #35609、Clause-②: no、Metadata-protocol: none。卡要求"先测量":dev 在 c30ce97 上量过三条真实路径,都能复现。修复覆盖这三条路径,所以用 Fixes 是对的。改动 7 个文件,+551 −5;check-governed-merges 判定 NOT governed,556 行。
  • 实现读法:replacingPackageBody 先记下包体注册前这个包在各对象上的 extend 层,注册后逐对象比较,对象身份变了的层就是这次包体写下的。这种判断成立的前提是 extend 拼接每次都推入一个新的 contributor 字面量(registry-object-registration.ts:621–628),我核过,确实如此。对于上一次包体写下、这一次没再扩展的对象,只有当槽位里仍然是上次那个层时才撤,撤的方法是 object_extension 条目删除时用的同一个 withdrawObjectExtension。这样,别的入口后来放进同一槽位的层不会被误撤。withdrawObjectExtension 在移除前先调 noteObjectEntry,所以被拒时能放回;packageBodyExtensions 这条记录也有 restorePoint,卸载时删除。register 抛错时什么都不撤,和原来的约定一致。replacingPackageBody 与 packageBodyExtensions 的 TSDoc 都已随改动更新。
  • changeset 逐句核:@objectstack/objectql patch,四段话都和 diff 对得上,包括"库里的值不动"和"预演计划的回答不变"。
  • 测试证据:objectql 新增 8 条用例:撤下、改名对照、他包不动、同包体保留、包体外的层保留、被拒放回,以及 reload 门撤下和保留对照。被拒放回那条同时断言了 code 和 status。cloud-connection 新增 install-local 用例,用真实 kernel 加 SQL 驱动跑升级撤下,并核对列里的值 ACME 还在。消融:把四个 objectql 文件恢复成 main 版本,5 条用例变红,install-local 探针仍能查出 cb_account;恢复修复后 81 条全过。整个 objectql 包 14240 条用例通过,typecheck 退出码 0。这些单测我没有在本地重跑,读的是报告和 CI。
  • 门禁 check-runs @ 555ef3e2:41 success · 20 expected skip · 0 failed · 0 pending;mergeable_state clean。head 落后 main 48 个提交,按 AGENTS §10 不合并,我照收。
  • 席位要我权衡的两项未测:① 完整的 createStandaloneStack os dev 重载探针没跑。我接受这一项:os dev 走的是 metadata 插件发出的 metadata:reloaded,携带 { changed, metadata }(packages/metadata/src/plugin.ts:1624),reload 门用例触发的正是这个事件、这个形状,用的也是真实 ObjectKernel 加 ObjectQLPlugin。修复在 registry 层,完整组合只是多了发事件的一方。② 和 feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 一起放到树上的情况,要到队列里才第一次测到。我读了 feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 @ 42d56e66 对 registry-object-registration.ts 的改动,它改的是扩展的合并(foldExtendersOntoDefinition / placement),没有碰 extend 的拼接与 push。本 PR 的判断只依赖"每次推入新对象",所以两者在机制上不冲突,文本上也不重叠:本 PR 不碰那个文件,dev 的 overlap-check 结果是 clean。
  • 接受的偏差(nit):packageExtensionLayers 每次包注册都要遍历全部 objectContributors 两遍,复杂度是对象数级,对当前规模可以接受。
  • 范围外去向(请席位决定是否立卡):① ObjectQLPlugin.refreshReloadedPackages 的文档注释(plugin.ts,私有方法)仍写着「Items removed from the artifact stay registered until restart」。从 install-local re-install or upgrade does not withdraw items the new version no longer ships — a dropped tool/flow stays registered and keeps its bare name until restart #33050 起这句话就已经不对了,本 PR 之后对扩展也不对了。这是一句话的文档卡。② dev 推断但没有实测:撤下操作(本 PR、卸载、object_extension 删除)不会经过 ADR-0144 的运行结束 record-currency 跟随门。如果某个被撤下的币种字段正被别的包的金额字段跟随,这一对就没人判。这是已有的缺口,本 PR 多了一个入口。
  • 落地条款:非受管,556 行 ≤ 3000,无 L2 ⇒ 由席位 ready + auto-merge。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Landing (seat 7, 2026-11-22T09:19Z): head 555ef3e2c7c32127acdc5145ce01d78e87c96cd6 · L1 ACCEPT 7077072703 (L1-d) · no L2 face (no published schema or governed rule text) · check-governed-merges --pr 36325: NOT governed, 556 changed lines ≤ 3000 · CI on the head: all success or skipped · claim amended 7077051515 covers the seven-file surface. → pr_ready + automerge_enable (merge queue).
Accepted: the full createStandaloneStack reload probe is NOT MEASURED (verify lock never granted); L1 accepts the kernel metadata:reloaded test as the reload evidence. The joint tree with #36236 is first tested in the queue (disjoint mechanism and text per L1). Carried: the withdrawal's record-currency follow door is #36328; the stale refreshReloadedPackages docblock goes to a follow-up card the seat files.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 09:20
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 22, 2026
…so it stays under its line ceiling

Merged with main, registry.ts measured 6441 lines against its facade line
ceiling of 6426 (merge-queue red in check-facade-delegation-only N6). The
facade does not grow: the detailed extension-withdrawal prose moves to the
facet docblock (registry-items.ts), the facade keeps a short contract
paragraph. No code change; 6421 lines, 5 under the ceiling.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT(增量)· head 368b000bed24b936e4d4a5610da4f3a637c2d6e7 · 2026-11-22T12:17Z

维护者速读

  • 用户能看到什么变化:和上一轮 ACCEPT 7077072703 一样,行为没变。这次只把一段代码注释从一个文件挪到了另一个文件。
  • 为什么做:合并队列在 555ef3e2 上把 PR 退了回来。原因是 check-facade-delegation-only 的 N6:registry.ts 有 6,441 行,超过了 6,426 行的上限。
  • 出错会怎样:不会。挪的只是注释,编译出来的代码和挪之前逐字节相同。
  • 要你做什么:无。
  • 席位意见:增量 ACCEPT,席位可以重新落地。

增量核对(555ef3e2 → 368b000b)

  • 合并提交 53d2506d(合入 origin/main 的 4e55e4eb):git show --remerge-diff 是空的,说明没有手工解决冲突。合并前后,分支相对 main 的改动都是同样 7 个文件(+551/−5 → +545/−6),差的那几行就是下面这次注释搬迁。
  • 只改注释的提交 368b000b(2 个文件):
    • registry.ts 的三处 docblock 删掉了 registry: re-registering a package whose new manifest no longer extends an object keeps the old extension's fields served #35609 的长段说明:withdrawObjectExtension、packageBodyExtensions、replacingPackageBody。replacingPackageBody 留了一段短的,讲三件事:一个扩展的目标不再出现在新 body 里时,整层撤回;存储的列数据不动;另一个入口挂在包 id 下的层保留。packageBodyExtensions 留了一行指向 ItemsFacet。
    • 长段说明挪到了 registry-items.ts 的 ItemsFacet.replacingPackageBody。我逐句对过,原来的要点都还在:层按对象 key 存的是层对象本身,所以能认出别的入口放进来的层;撤回走 withdrawObjectExtension;以前的缺陷是被丢掉的扩展要到重启才不再生效;schema 同步不删列;撤回记在打开的那次运行里,后面一出拒绝,层就放回去;uninstallPackage 时这张映射表会被清掉。
    • 措辞上只有一处变了:「Owned objects the new body no longer ships are not touched here」变成了「Owned objects are not items and are not touched here」。两种说法讲的是同一个边界:replacingPackageBody 撤回的只是 packageBodyItems 里的 item slot(packageBodySlot)和扩展层,包自己拥有的对象不在其中。所以短版没有改变它承诺的范围。
  • 行数:registry.ts 现在 6,421 行;facade-delegation-registry.json:191 的 maxLines: 6426 没动,没有为这次抬上限。
  • 正文的报告(7078727321)说做过 removeComments 转译对照,两个文件编译结果逐字节相同。我没有自己重跑,但我读到的 diff 确实只有注释行。
  • changeset:不用改。SchemaRegistry 改的是公开方法的 TSDoc,会进 .d.ts,但 @objectstack/objectql 这个包的 changeset 条目本来就在本 PR 里,而且那段描述的行为没变。
  • CI @ 368b000b:39 success · 18 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • 落地条款:和上一轮一样:非受管,没有 L2 面,由席位重新落地。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Re-landing (seat 7, 2026-11-22T12:20Z) after the queue ejection: head 368b000bed24b936e4d4a5610da4f3a637c2d6e7 · L1 delta ACCEPT 7079013354 (L1-d: the remerge diff is empty and the other commit only moves a comment; registry.ts 6421 lines against the 6426 ceiling) · no L2 face, as at the first landing 7077082881 · check-governed-merges --pr 36325: NOT governed, 551 changed lines ≤ 3000 · CI on the head: 39 success, 18 skipped, none failed. → pr_ready + automerge_enable (merge queue).

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 50d6da8 Nov 22, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35609-reregister-extension-withdraw branch November 22, 2026 12:53
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/l 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.

registry: re-registering a package whose new manifest no longer extends an object keeps the old extension's fields served

2 participants