Repository navigation
fix(objectql): a package registered again stops serving an object extension its new manifest dropped - #36325
Conversation
… 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>
… casting them Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 19 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 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
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T09:19Z): head |
…register-extension-withdraw
…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
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT(增量)· head 维护者速读
增量核对(
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Re-landing (seat 7, 2026-11-22T12:20Z) after the queue ejection: head |
Requested by Steedos · project thread
Fixes #35609
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
SchemaRegistry.replacingPackageBody(the wrapper around everyObjectQL.registerAppbody registration, which since #33050 withdraws the items a new body no longer ships) now does the same for object extensions:extendlayer 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).withdrawObjectExtension, the existing per-object withdrawal theobject_extensionitem 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 (theobject_extensionitem door) is kept.withdrawObjectExtensionnow 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.packageBodyExtensions) is put back on refusal and forgotten byuninstallPackage, besidepackageBodyItems.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
c30ce97cd7registerApp(card repro)com.t.mod:extendlayer keptos devreload:metadata:reloaded→ObjectQLPlugin.refreshReloadedPackages→registerAppos devreload, full standalone composition (createStandaloneStack, the artifact door's_reloadAndAnnounce)metadata:reloadedhook measured in the row abovemanifest.register, no uninstall)crm_lineserved andfindreturnedcb_accountplan.fields.removednamescrm_line.cb_account,environment.columnsreasons: ['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 removedStored column, both before and after the fix:
crm_line.cb_accountkeeps its column and its valueACME(schema sync drops no column).After the fix every row above reads "no": the object serves
nameonly,findno longer returnscb_account, the column still holdsACME, 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-fixedlegs over the same two commands. The objectql and cloud-connection suites both resolve@objectstack/objectqltopackages/objectql/src(stack frames read../objectql/src/...), so no dist rebuild was involved; the on-disk proof is the marker count (packageBodyExtensionsinregistry-items.ts: 0 in the unfixed leg, 9 in the fixed leg) and the restore was proven by an emptygit diff HEADand matchinggit hash-object=HEAD:pathfor each file.reregister-extension-withdraw-35609.test.ts5 failed / 3 passed (the controls pass),package-refused-upgrade-keeps-installedandmanifest-service-artifact-refusal-restoresgreen:Tests 5 failed | 76 passed (81). Install-local readings:served after upgrade [ 'cb_account', 'name' ],findreturns"cb_account":"ACME", re-install without the extension[ 'cb_account', 'name' ].Test Files 3 passed (3) · Tests 81 passed (81); install-localserved after upgrade [ 'name' ],findrow has nocb_account,column after upgrade {"hasColumn":true,"values":["ACME"]}, re-install without the extension[ 'name' ].pnpm --filter @objectstack/objectql testat the fix (objectql src as on head555ef3e2c7):Test Files 627 passed (627) · Tests 14240 passed (14240).pnpm --filter @objectstack/objectql typecheck: exit 0 (tsc --noEmit, thencheck:test-typecheck: OK, debt held).Acceptance notes
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.object_extensionitem 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.registry.ts, and places extension items in the fold) has since landed onmainasd33bf5a2.overlap-checkagainstorigin/maind8599c2ca2reads clean, and GitHub reports the PR mergeable. This PR's CI ran on the merge with99fbaa6d, 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.tsis not touched.check-prior-rulings --card 35609over 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.tsgains only a state field, docblocks and host wiring;check:facade-delegation-onlygreen). Since main grewregistry.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 inregistry-items.ts, and the ceiling is not raised.Verification
Merge-queue red at 555ef3e, fixed at 368b000 (repo:objectstack#7)
Lint · repo & tooling gates).check-facade-delegation-only --self-testcase 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 grownregistry.tsto 6409 lines, and this PR's +32 went over the ceiling.53d2506ddb,368b000bed): mergedorigin/main4e55e4eb72(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 onItemsFacet.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.removeComments, before and after368b000bed. Each pair is byte-identical (registry.tssha256 prefixb87e53ad1efaboth sides,registry-items.tsafb1b850be15both 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 checkoutpasses, and the check printspackages/objectql/src/registry.ts: 6421 lines, ceiling 6426 (5 left; ruling 6897467376).dispatch-gates --commandsat368b000bed: 73 derived. 71 exit 0.check:dual-build-cjs-loadsandcheck:type-check-debtexit 3 (PREREQUISITE NOT MET: no fulldist/), so NOT MEASURED locally and carried by CI's Build Core and debt-ledger lanes.--ranwith exit codes: 73 derived, 71 run, 2 NOT-MEASURED, 0 unrun. Gate derivation read a tree 7 commits behind the newestorigin/mainff60149900. None of this PR's files moved there, so I did not merge again.overlap-check --branch:VERDICT clean exit 0againstorigin/mainff60149900.@objectstack/objectqltest 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-erasurewent red (test surface 236 to 237) on a cast in the new cloud-connection pin; fixed in555ef3e2c7and re-run green (236).check:dual-build-cjs-loadsandcheck:type-check-debtexited 3 (PREREQUISITE NOT MET: no fulldist/, and the closure build never got the shared lock): NOT MEASURED locally, CI'sLint & Repo Gatescarries both.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.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).!, 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 with99fbaa6d(b97f554d), and every gate-carrying check-run concludedsuccess.Test Coreat this head,@objectstack/cloud-connection:testprintedsrc/marketplace-install-local-reregister-extension-withdraw-35609.test.ts (3 tests)passed. The objectql file printedsrc/reregister-extension-withdraw-35609.test.ts (8 tests)passed. All 10Test Coreshards: success.Type Check · workspaceran@objectstack/cloud-connection:typecheck;Tasks: 124 successful, 124 total; success.check:dual-build-cjs-loads:Build Corestep "Every published require entry point actually loads": success.check:type-check-debt:Type Check · debt ledgerstep "Re-measure the type-check DEBT / TEST_DEBT ledger": success, lane verdict success.555ef3e2c7, againstorigin/mainc448c615:dispatch-gates --commandsderived 73 commands. 68 exited 0. Five exited 3, PREREQUISITE NOT MET (no builtdist/; 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") andtype-check-debt(above).dispatch-gates --ranwith the exit codes recorded: 73 derived, 68 run, 5 NOT-MEASURED (derived from exit 3), 0 unrun.createStandaloneStackreload 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.tsprints 8 passed; revertregistry-items.tstoorigin/mainand 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(withdrawObjectExtensionnow 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