Repository navigation
fix(objectql)!: register a preserve composition’s residual objectExtensions entry; judge residual jobs at composition - #36338
Conversation
…ntry; judge residual jobs at the composition door Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
…al builder beside it, parity pin Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
…sidual-extension pin Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 18 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 — 179 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 318ec0b8a9911fcd2849aa47663788a5ee066bd8 && git checkout 318ec0b8a9911fcd2849aa47663788a5ee066bd8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9f6f306c431add0f7228c180587450faa0f3a1e8 058d5c28159de07a922922e89eee395e9e3dfbd3 && git checkout -B drift-repro 9f6f306c431add0f7228c180587450faa0f3a1e8 && git merge --no-ff 058d5c28159de07a922922e89eee395e9e3dfbd3
node scripts/docs-audit/affected-docs.mjs --json 9f6f306c431add0f7228c180587450faa0f3a1e8
|
Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC Co-authored-by: Claude <noreply@anthropic.com>
…d the residual, place included Step 2b of registerApp now builds its extend contribution through objectExtensionContribution, which gains place; the residual pin compares what a placed entry serves from a body and from the residual. Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC Co-authored-by: Claude <noreply@anthropic.com>
…stry as the residual caller does Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs read: card #35711 (body and all 6 comments), PR #36338 (body, 9 files, net diff against merge base ① Derived judgmentsAccept-set changes the diff implies at
Public-surface changes:
② Semver level
The changeset carries both declaration lines, the The migration is owed and present. Its text is incomplete. See S1. ③ Boundary flags
④ Design judgment
S1 (should-fix) — The migration entry under-describes what composition now refuses. Its S2 (should-fix) — A residual job that shares its name with a package body's job, with different content, still composes, and the boot schedules neither. Nits, no effect on this head:
Implemented-by: VERDICT: PASS |
…ual job name gap it leaves to the binder The migration entry, the changeset and the residual predicate's docblock now name two residual extensions of one object beside another body's, and the first / last / index strategies once a multi-package input carries packages[]; the jobs row says neither runs when both are enabled. Two pins hold the shapes newly named. Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT(增量)· head 维护者速读
增量核对(
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review. The previous record is PASS 7078102405 at Inputs read: card #35711 (body and all 9 comments), PR #36338 (body, 3 comments, 9 files), the delta diff, and the check-runs on the head. The delta is two linear commits, S1: closed ① Derived judgmentsThe delta changes no accepted shape and no refused shape. Read hunk by hunk:
So the accept-set is exactly the one judged at Public surface: the only published change in the delta is the ② Semver levelUnchanged and still right. ③ Boundary flags
④ Design judgment
Closures, each read in the tree:
No must-fix, no should-fix. Nits, no effect on this head:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Seat record (2026-11-22T13:17Z) on head 维护者速读
席位核对ACCEPT · Tier H (a declared narrowing:
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Tier H hand-off (2026-11-22T13:18Z): this PR declares a narrowing ( |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45026983959 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 45039731179 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steedos · project thread
Fixes #35711
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill teaches placing
objectExtensionsorjobsin a manifest-less input of a'preserve'composition; the refusal names both entries and prescribes the fix维护者速读
What changes
Measured first, on main
c30ce97cd7, through the realos serve(packages/cli/bin/run-dev.js serve, SQLite in memory), oncomposeStacks([owner, other, noManifest], { manifest: 'preserve' }):probe_accountwithresidual_note.GET /api/v1/meta/object/probe_accountlisted noresidual_note;POST /api/v1/data/probe_accountwith it answered400 INVALID_FIELD; the boot logged nothing about it.os buildof the same config exits 0 and carries the entry at the artifact's top level (1 Extensions), so a built artifact reaches the same drop. Producers: a composition yieldspackages[]beside a residual under'preserve'with an input that has no manifest, and under any strategy ('preserve','first','last', an index) once an input is itself a multi-package artifact, whose own top-level collections are then residual; a flat composition of inputs that carry nopackages[]is one package with no residual.probe_nightly:composeStacksaccepted them; the boot (with scheduled work on) loggedNOT SCHEDULEDaterrorand armed neither.The fix, REGISTER rather than refuse, because the residual already has an owner: ADR-0130 D4 registers every residual item under
manifest.id, and the engine already registers the residual's objects and items there; an extension was the one residual entry no door registered.packages/metadata/src/plugin.ts. The residual ruleunclaimedTopLevel(the one copy every door reads) now lists a top-levelobjectExtensionsentry (typeobject_extension) when it names a target and no package body carries an entry EQUAL to it by value. Not by target: the flattened top level repeats each body's entry and a built artifact loses the references, but each copy still holds what its body's entry holds; an equal entry is also the case where nothing is lost. The metadata door still registers no extension (it never registered a body's either).packages/objectql/src/plugin.ts. Themanifestservice registers those entries after every body, under the residual's id, through the registry'sextendverb with the same contribution a body's entry builds:objectExtensionContribution(engine-registration.ts) is the one reading of anobjectExtensionsentry, andregisterAppstep 2b now builds a body's contribution through it too, so the two cannot drift (it carriesplace, which feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 added to step 2b on main). Two follow-ons of registering:'preserve'the residual's id is the last input-with-a-manifest's body too, and the registry keeps one extension of a target per package. A residual entry for a target that body also extends (or two residual entries for one target) keeps only the last one's fields; the boot says so once per target aterror, like the objectExtensions: two entries for one object in the same package silently drop the earlier entry's fields #35228 arm A1 line for one body.warn), the residual objects' own rule (the boot's picklist audit would refuse the field).packages/spec/src/stack.zod.ts, the composition door. The residual door now mirrors that reading: anobjectExtensionsentry is claimed by a body only when a body carries an equal entry; the owner body's entries for a target the residual also extends are judged with the residual's, body first (the boot's registration order), so the finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 sentence ("only the last of these entries' fields register") is now true at that door.jobsis judged there by name (a body's job name claims the slot), whereTOP_LEVEL_COLLECTIONS_NEVER_RESIDUALused to drop it (that set is the owner-stamp mirror and is unchanged).jobsrow's wording, at every door. It said only the last entry is kept; the binder schedules none. Now:The runtime keys jobs by name: the metadata keeps only the last of these entries, and the job scheduler refuses a name two enabled jobs share, so when both are enabled neither runs.(exact only for two enabled jobs; a disabled one counts no collision). One row, so it stays byte-identical across doors.stack-residual-extension-registered-and-jobs-judged, changesetminorfor spec, metadata and objectql.Newly refused at composition (
STACK_CROSS_REFERENCE_INVALID, 422), under every manifest strategy once the result carriespackages[]('preserve', and'first'/'last'/an index with a multi-package input):manifest.idextends with other fields;Unchanged: one residual extension for an object ANOTHER package extends (both register), a residual entry equal to a body's, every package-claimed extension, one residual job.
Not refused, a known gap left to the binder (stated in
residualEntryPredicate's docblock and the migration entry): a residual job that shares its name with a package body's job, with other content, composes as that body's copy, and the boot schedules neither of the two enabled jobs. Read from code, not driven.Tests
New pins, named after the card:
packages/spec/src/stack-residual-extension-jobs.test.ts— residual job pair refused (codeSTACK_CROSS_REFERENCE_INVALID, status 422, exact sentence); the single-stack door says the same row; residual extension sharing the owner body's slot refused, body entry first; residual extension of a target another body extends composes; two residual extensions of a target another body extends refused (shape 3);'first'and'last'with a nested multi-package input refuse a residual job pair (with a CONTROL that the artifact carriespackages[]); an equal entry is a copy; CONTROLS: one residual job composes, each body's own job name, two packages each extending one target, the owner body's own pair reported once.packages/metadata/src/unclaimed-top-level-residual-extension.test.ts—unclaimedTopLevellists the residual entry, composed and as built JSON, never the body's flattened copy; CONTROLS: nothing listed when every extension is a body's, no residual withoutpackages[].packages/objectql/src/manifest-service-residual-object-extension.test.ts— on a kernel through themanifestservice: the residual field is served (composed and built JSON); it serves exactly what the same entry serves from a body (parity), and aplaced entry too (anti-vacuity: the placement changes what is served); CONTROL a package-claimed extension unchanged, nothing logged; the owner-slot pair serves the last fields with oneerrorline; a dangling-picklist entry is not registered and is named atwarn.Package suites and typecheck
Head
058d5c2815. Since f4e83b0 the change is docblocks, the migration entry, the changeset, thejobsrow's last clause (now "so when both are enabled neither runs") and two spec pins (contract review S1, S2, N3, N4); the spec pin file re-ran here: 13 passed. The objectql and metadata readings below are from f4e83b0 (origin/maind8599c2 merged in, then the one-reading unification); neither package changed since. The spec suite's last full run is seat 4's at 5a41a05 (870/870 files, 27886 tests); since thenpackages/specchanged only by the main merge and a type cast, and its pin was re-run here.pnpm --filter @objectstack/objectql exec vitest run --project local --maxWorkers=2— Test Files 628 passed (628), Tests 14272 passedpnpm --filter @objectstack/metadata exec vitest run --maxWorkers=2— Test Files 82 passed (82), Tests 2638 passedsrc/stack-residual-extension-jobs.test.ts(spec) — 13 passed at 058d5c2 (9 at f4e83b0);src/unclaimed-top-level-residual-extension.test.ts(metadata) — 3 passed;src/manifest-service-residual-object-extension.test.ts(objectql) — 6 passedpnpm --filter @objectstack/spec typecheckexit 0 (tsc,check:scripts-typecheck,check:test-typecheckOK), re-run at 8f58c38 (058d5c2 adds comments only);@objectstack/metadataexit 0;@objectstack/objectqlexit 0 (check:test-typecheckOK). The first objectql run after the unification found TS2345 at step 2b (the shared definition is typedunknownper key); fixed in f4e83b0 by handing it to the registry as the residual caller does.Ablation (each fix reverted after commit, through scripts/ablation-replace.mjs; every restore proven blob == HEAD, `git diff HEAD` empty)
jobsjudged by slot again: the spec jobs pin turns red (1 failed of 9).place: ext.placereplaced byplace: undefinedinobjectExtensionContribution: the objectql pin turns red (1 failed of 6, the placement anti-vacuity); restore proven blob == HEAD (cbc7b4d3e6),git diff HEADempty.Real boot (os serve) after the fix
Same probe as the measure-first reading, at 5957d21:
GET /api/v1/meta/object/probe_accountlistsresidual_note;POST /api/v1/data/probe_accountwith it answers a created record.Acceptance notes
packages[]beside a residual comes from'preserve'with an input that has no manifest, and from any strategy once an input is itself a multi-package artifact (its own top-level collections are residual);'first'/'last'/an index over inputs that carry nopackages[]compose one flat package with no residual.os buildcarries the composed top level as is (1 Extensions, exit 0). This corrects the first version of this note, which said'preserve'only; the composition door's docblock always said every strategy.placeinregisterAppstep 2b's extension literal. Merging main here, the residual builder would have registered a residual entry without its placement; the two are now one call (objectExtensionContribution),placeincluded, and the parity pin covers a placed entry.jobsrow's sentence changed at every door (it said the last entry is kept; the binder schedules none). The finding: one stack can author two entries under onenamein 20+ named collections (objects,pages,flows,permissions,webhooks…), andos validateexits 0; onlyactionsand thefunctionsarray (#22902) refuse it #22934 rows stay one table, byte-identical across doors.defineStackon a hand-builtpackages[]stack judges its whole top level as one package (stack.KEY[i]), unchanged here.Open items (follow-up cards)
packages/metadata/src/picklist-references.tsstill tells authors a composed stack's top-levelobjectExtensionsentry is not registered, which after this PR holds only for an entry naming a picklist no body declares (review N1);sameAuthoredValue(metadata) hand-copies the spec'sdeepEqualAuthoredand no test holds them equal (review N5).logResidualSameTargetExtensionsalso reports an owner-body pair for a target the residual does not extend, a second line besideregisterApp's (review N2).Verification
First files to read (by risk):
packages/spec/src/stack.zod.ts(residualEntryPredicate,ownerBodyExtensionEntries, thejobsrow),packages/objectql/src/plugin.ts(registerUnclaimedTopLevelExtensions),packages/metadata/src/unclaimed-top-level-residual-extension.test.ts.Two-minute check:
pnpm --filter @objectstack/objectql exec vitest run --project local --maxWorkers=2 src/manifest-service-residual-object-extension.test.ts(after building the objectql closure) — 6 passed.Local gates at 058d5c2: 100 derived families (
dispatch-gates --commands), reconciled with--ran(exit codes recorded): 100 run, 0 NOT MEASURED. Seven first exited on a prerequisite (five specdist/gates:distpredated the last comment commit;check:dual-build-cjs-loads: not every package built; the cli test:MODULE_NOT_FOUND) and were re-run after the full closure build: exit 0 each.check:type-check-debtexit 0 (its full re-measure, 0 raw tsc errors).check:nul-bytesexit 0.overlap-checkclean before each push.PR check-runs at 058d5c2: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate and Check Changeset success; Lint UI skipped (no
ui/path).Dogfood battery at 058d5c2:
os-verify-lock: VERDICT command-exit 0(closure build exit 0, thenpnpm --filter @objectstack/dogfood test): Test Files 484 passed, 3 skipped (487); Tests 4107 passed, 68 skipped (4175). The same counts at f4e83b0.Clause-② reading (seat 7): the diff refuses at composition three shapes that compose today (listed under What changes), under every manifest strategy once the result carries
packages[], so it is a narrowing, declaredno (narrowing)as the claim's conditional names. The contract review at f4e83b0 named the third shape and the reach beyond'preserve', which the first version of this body left out. No governed path is in the diff: the seat lands it with--landonce the dogfood battery is pinned to the head. Registering the residual extension is the REGISTER judgement stated under What changes.🤖 Generated with Claude Code