Skip to content

fix(objectql)!: register a preserve composition’s residual objectExtensions entry; judge residual jobs at composition - #36338

Merged
os-zhuang merged 10 commits into
mainfrom
claude/issue-35711-residual-extension-jobs
Nov 22, 2026
Merged

os-zhuang merged 10 commits into
mainfrom
claude/issue-35711-residual-extension-jobs

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #35711

Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none — no skill teaches placing objectExtensions or jobs in 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 real os serve (packages/cli/bin/run-dev.js serve, SQLite in memory), on composeStacks([owner, other, noManifest], { manifest: 'preserve' }):

  • Residual extension. The input without a manifest extends probe_account with residual_note. GET /api/v1/meta/object/probe_account listed no residual_note; POST /api/v1/data/probe_account with it answered 400 INVALID_FIELD; the boot logged nothing about it. os build of 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 yields packages[] 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 no packages[] is one package with no residual.
  • Residual jobs. Two inputs without a manifest declaring job probe_nightly: composeStacks accepted them; the boot (with scheduled work on) logged NOT SCHEDULED at error and 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 rule unclaimedTopLevel (the one copy every door reads) now lists a top-level objectExtensions entry (type object_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. The manifest service registers those entries after every body, under the residual's id, through the registry's extend verb with the same contribution a body's entry builds: objectExtensionContribution (engine-registration.ts) is the one reading of an objectExtensions entry, and registerApp step 2b now builds a body's contribution through it too, so the two cannot drift (it carries place, 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:
    • Under '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 at error, 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.
    • An entry whose field names a picklist no package body declares is not registered and is named at boot (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: an objectExtensions entry 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 one name in 20+ named collections (objects, pages, flows, permissions, webhooks …), and os validate exits 0; only actions and the functions array (#22902) refuse it #22934 sentence ("only the last of these entries' fields register") is now true at that door. jobs is judged there by name (a body's job name claims the slot), where TOP_LEVEL_COLLECTIONS_NEVER_RESIDUAL used to drop it (that set is the owner-stamp mirror and is unchanged).
  • The jobs row'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.
  • ADR-0087 semantic entry stack-residual-extension-registered-and-jobs-judged, changeset minor for spec, metadata and objectql.

Newly refused at composition (STACK_CROSS_REFERENCE_INVALID, 422), under every manifest strategy once the result carries packages[] ('preserve', and 'first'/'last'/an index with a multi-package input):

  1. two residual jobs of one name;
  2. a residual extension for an object the body carrying manifest.id extends with other fields;
  3. two residual extensions of one object, also when another package body extends that object (the claim is by value now; it was by target, so both counted as that body's copies and composed).

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 (code STACK_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 carries packages[]); 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 — unclaimedTopLevel lists 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 without packages[].
  • packages/objectql/src/manifest-service-residual-object-extension.test.ts — on a kernel through the manifest service: the residual field is served (composed and built JSON); it serves exactly what the same entry serves from a body (parity), and a placed 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 one error line; a dangling-picklist entry is not registered and is named at warn.
Package suites and typecheck

Head 058d5c2815. Since f4e83b0 the change is docblocks, the migration entry, the changeset, the jobs row'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/main d8599c2 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 then packages/spec changed 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 passed
  • pnpm --filter @objectstack/metadata exec vitest run --maxWorkers=2 — Test Files 82 passed (82), Tests 2638 passed
  • src/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 passed
  • typecheck: pnpm --filter @objectstack/spec typecheck exit 0 (tsc, check:scripts-typecheck, check:test-typecheck OK), re-run at 8f58c38 (058d5c2 adds comments only); @objectstack/metadata exit 0; @objectstack/objectql exit 0 (check:test-typecheck OK). The first objectql run after the unification found TS2345 at step 2b (the shared definition is typed unknown per key); fixed in f4e83b0 by handing it to the registry as the residual caller does.
  • These ran outside the verify lock (declared narrowing): the lock was held by two sibling dogfood batteries for about 100 minutes; the battery below ran under it.
Ablation (each fix reverted after commit, through scripts/ablation-replace.mjs; every restore proven blob == HEAD, `git diff HEAD` empty)
  • A, metadata listing removed: the metadata pin turns red (1 failed of 3).
  • B, objectql registration call deleted: the objectql pin turns red (3 failed of 4 at that time).
  • C, spec jobs judged by slot again: the spec jobs pin turns red (1 failed of 9).
  • D, spec owner-body pairing removed: the owner-slot pin turns red (1 failed of 9).
  • E (seat 7, at f4e83b0), place: ext.place replaced by place: undefined in objectExtensionContribution: the objectql pin turns red (1 failed of 6, the placement anti-vacuity); restore proven blob == HEAD (cbc7b4d3e6), git diff HEAD empty.
Real boot (os serve) after the fix

Same probe as the measure-first reading, at 5957d21: GET /api/v1/meta/object/probe_account lists residual_note; POST /api/v1/data/probe_account with it answers a created record.

Acceptance notes

  • Measure-first, step 2 (producers): 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 no packages[] compose one flat package with no residual. os build carries 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.
  • feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 landed on main with place in registerApp step 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), place included, and the parity pin covers a placed entry.
  • The residual extension's dangling-picklist judgement reads the stack's own bodies, like the residual objects' rule; a field naming a picklist an already-installed package declares is treated as dangling (not registered, named at boot): conservative, not silent.
  • The jobs row'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 one name in 20+ named collections (objects, pages, flows, permissions, webhooks …), and os validate exits 0; only actions and the functions array (#22902) refuse it #22934 rows stay one table, byte-identical across doors.
  • defineStack on a hand-built packages[] stack judges its whole top level as one package (stack.KEY[i]), unchanged here.

Open items (follow-up cards)

  • jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431: a residual job sharing its name with a package body's job (other content) composes and the boot schedules neither (contract review S2, L1). Whether composition should refuse a job name shared across packages is for the maintainer to rule.
  • metadata: a residual picklist named only by a residual extension is refused as unreferenced; stale message #36432: a residual picklist named only by a residual extension is still refused as unreferenced at validate, build and boot (L1); packages/metadata/src/picklist-references.ts still tells authors a composed stack's top-level objectExtensions entry 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's deepEqualAuthored and no test holds them equal (review N5).
  • Not carried by either card: logResidualSameTargetExtensions also reports an owner-body pair for a target the residual does not extend, a second line beside registerApp's (review N2).

Verification

First files to read (by risk): packages/spec/src/stack.zod.ts (residualEntryPredicate, ownerBodyExtensionEntries, the jobs row), 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 spec dist/ gates: dist predated 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-debt exit 0 (its full re-measure, 0 raw tsc errors). check:nul-bytes exit 0. overlap-check clean 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, then pnpm --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, declared no (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 --land once the dogfood battery is pinned to the head. Registering the residual extension is the REGISTER judgement stated under What changes.

🤖 Generated with Claude Code

…ntry; judge residual jobs at the composition door

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>
@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
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata, @objectstack/objectql, @objectstack/spec, touching 20 documentable anchor(s).

18 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 9f6f306c431add0f7228c180587450faa0f3a1e8.

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

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 179 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 9f6f306c431add0f7228c180587450faa0f3a1e8 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 318ec0b8a9911fcd2849aa47663788a5ee066bd8 — the merge of head 058d5c28159de07a922922e89eee395e9e3dfbd3 into base 9f6f306c431add0f7228c180587450faa0f3a1e8, 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 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

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

…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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT · head f4e83b06c2d6e64daa0cb8e7cfb44ae4340c4f6d · 2026-11-22T10:50Z

维护者速读

  • 用户能看到什么变化:用 composeStacks(…, { manifest: 'preserve' }) 拼包时,没有包标识的那部分给某个对象加的字段,现在能正常使用了。以前这些字段直接消失,写入时报 INVALID_FIELD,启动日志也不提。
  • 新拦下两种写法,在拼包时报 422 STACK_CROSS_REFERENCE_INVALID:两个没有包标识的部分声明同名定时任务(以前启动时两个都不运行);没有包标识的部分和持有产物标识的那个包,给同一对象各加一段不同的扩展(以前只有后一段生效)。
  • 为什么做:卡 objectql: a composed artifact's residual top-level objectExtensions entry is registered by no door, and a residual job is judged by no duplicate door #35711,拼包「剩余部分」这一组问题里的最后一个漏洞。
  • 出错会怎样:最坏情况是拼包时多拦了不该拦的写法,作者会看到点名两处的报错;已经构建好的产物照常启动,只多一条错误日志;不涉及数据迁移,可以撤回。
  • 要你做什么:无(见下面落地条款给席位的一点)。

席位核对

  • 形态:l1-face --pr 36338 只标了 dogfood 一项,见下面。draft、base main、Fixes #35711;卡上「先测量」三步都在正文里,经真实的 os serve 量过;产出方只有 'preserve';修复覆盖卡上 Expected 的两条,所以用 Fixes 是对的。9 个文件 +862 −43;check-governed-merges 判定 NOT governed,905 行。超出原认领面的 metadata/src/plugin.ts、objectql/src/engine-registration.ts 和迁移条目,席位正在补进认领,我按补后的范围读。
  • 声明:Clause-②: no (narrowing) 属实。新导出的 objectExtensionContribution、equalByValue 只从 engine-registration.ts 导出,objectql 的包导出只有 . 和 ./core,两者都不转出这个文件;metadata 新增的函数都没有导出;UnclaimedTopLevelItem.type 本来就是 string。收窄的两种写法都写在 changeset 里了。Metadata-protocol: narrowed:ADR-0087 语义条目 18.stack-residual-extension-registered-and-jobs-judged 已登记,changeset 三个包都是 minor,带 ! 和 BREAKING。Skills-docs: none 的理由成立:没有 skill 教这种写法,报错本身写明了改法。
  • 实现读法:
    • metadata 的 unclaimedTopLevel 现在把顶层的 objectExtensions 条目列为 object_extension,前提是它有目标,并且没有任何包体里有一条和它按值相等的条目。按值而不按目标比,是因为展平后的顶层会重复每个包体的条目。metadata 自己仍不登记扩展:registerArtifactBodyCollections 用 artifactItemSlot 判断,扩展没有槽位,会被跳过,所以剩余计数和告警不变。
    • objectql 在所有包体之后,以剩余部分的 id 经 extend 登记这些条目。包体和剩余部分都走 objectExtensionContribution 这一种读法,place 也包括在内,所以两边不会走样。共享槽位的情况每个对象记一条 error;引用了包体都没声明的选项列表的条目不登记,记一条 warn。
    • spec 拼包门的剩余判断与此对齐:扩展按值相等认领;持有 manifest.id 的那个包体对同一目标的条目排在前面,一起判断。jobs 改为按名字判断,只要任一包体用了这个名字,就算被认领。
  • 文本逐句核:changeset 的 Fixed、Refused now、Wording、Unchanged、Installed artifacts 五段,以及最后的一行改法,都与 diff 一致;报错例句「body 的条目在前、剩余的在后」与 spec 用例逐字相同。迁移条目的 surface、replacement、reason、acceptanceCriteria 四段与 changeset 一致。
  • 测试证据:spec 9 条,含两种拒绝,code、status、条数、整句都有断言;对照用例包括单个剩余任务、各包体自己的任务、两个包各扩展一个目标、持有者包体自己的一对只报一次。metadata 3 条,分别在拼包后和构建后的 JSON 上测,对照是全部由包体认领。objectql 6 条,经 manifest 服务在内核上跑:剩余字段被服务;和同一条目从包体登记时服务的内容一致;带 place 的条目也一致,而且 place 确实改变了服务的结果;共享槽位只服务后一段,记 1 条 error;引用未知选项列表的条目不登记,记 warn。消融 A 到 E 各挂对应的用例,恢复后 blob 一致。真实 os serve 在修复后列出 residual_note,带它写入能创建记录。这些用例我没有在本地重跑,读的是报告和 CI。
  • dogfood(由我判断):! 和 (narrowing) 欠一轮完整测试电池,正文在 f4e83b0 上全量跑了一轮:4175 条里 4107 过、68 跳过、0 失败,和 head 一致,所以这项满足。
  • CI @ f4e83b06:60 success · 13 expected skip · 0 failed · 0 pending;mergeable_state clean。
  • nit:「两条扩展按值相等」现在有三种写法:metadata 的 sameAuthoredValue、spec 的 deepEqualAuthored、objectql 的 equalByValue。前两者的注释说它们读法一致,但我没看到有用例把它们钉成相等。目前 objectql 那一处只用在已经判定为不相等的条目上,所以不影响结果。
  • 范围外(两条都是读代码看出来的,没有实测;请席位决定要不要立卡):
    1. 如果一个剩余任务和某个包体的任务同名(哪怕内容不同),它会被当作包体的副本,residualEntryPredicate 不判断它。但启动时 jobNameCollisions(runtime/src/app-artifact-handlers.ts:1403)会把剩余部分算进去,两个都 NOT SCHEDULED。这和本 PR 处理的「剩余扩展与持有者包体共享槽位」是同一类问题,只是落在任务上。
    2. 一个剩余选项列表如果只被剩余扩展的字段引用,unreferencedResidualPicklists 只看包体和剩余对象,所以照样把它判为「没有字段引用」并在启动时拒绝,那句话就不对了。本 PR 之前也是这样,本 PR 没让它变差。
  • 落地条款:收窄、非受管、905 行。席位的 schema 面 L2 PASS、认领补齐之后,由区 ready + auto-merge。给席位的一点:正文「维护者速读」第 4 条写「需要你决定是否合入」,最后一段又写「the maintainer lands it」,这和 check-governed-merges 的判定(NOT governed,不到 3000 行)不一致。如果认领里的条件确实要求维护者合,就保留;否则请把第 4 条改成「无」,免得维护者以为要他动手。这不是声明行,我不改判。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f4e83b06c2d6e64daa0cb8e7cfb44ae4340c4f6d
Local-runs: none
Scope: packages/spec/src/stack.zod.ts, packages/spec/src/migrations/entries/semantic/18.stack-residual-extension-registered-and-jobs-judged.ts + packages/metadata/src/plugin.ts, packages/objectql/src/plugin.ts, packages/objectql/src/engine-registration.ts
Security-touching: no
Rule-change-verified: none

Inputs read: card #35711 (body and all 6 comments), PR #36338 (body, 9 files, net diff against merge base d8599c2ca2), and the check-runs on the head. Every check-run is success or skipped. None failed. Tests, the changeset and the rest of the diff are the lane seat's ACCEPT.

① Derived judgments

Accept-set changes the diff implies at composeStacks, each read from the code:

  1. Two top-level jobs of one name that no package body declares, in a composition that carries packages[]: refused now. Right. On main residualEntryPredicate sent jobs to the slot rule, which never files a job as residual, so no door judged the pair. The boot's binder (jobNameCollisions, packages/runtime/src/app-artifact-handlers.ts) schedules neither. Declared.
  2. A residual objectExtensions entry for an object that the body carrying manifest.id also extends with other fields: refused now, body entry first. Right. The residual registers under that id and the registry keeps one extension of a target per package. Declared.
  3. Two residual objectExtensions entries for one object that some package body also extends: refused now. Right as a refusal, because both register under manifest.id and only the last is served. NOT declared. On main the claim was by target (SAME_STACK_ENTRY_IDENTITY.objectExtensions.identity), so both entries counted as a body's copies and composed. The head claims by value, so both are the residual's. See S1.
  4. Reach beyond 'preserve': packages is a concat key, so 'first', 'last' or an index with an input that is itself a multi-package artifact also carries packages[] beside a residual. Shapes 1 to 3 are refused there too. Right, and the jsdoc on collectComposedResidualDuplicateEntryErrors says so. The PR body, the changeset and the migration entry say 'preserve' only. See S1.
  5. A single residual extension, including one for an object another package extends: accepted as before, and now registered. Right. This is the card's fix and it is not a narrowing.
  6. A residual entry equal by value to a body's entry: read as that body's copy at composition and at boot. Right. Nothing is lost, because the body registers the same content.

Public-surface changes:

  • @objectstack/metadata unclaimedTopLevel now lists object_extension items. Right. The three other readers filter by type (unclaimedTopLevelItems, the CLI view walk, unreferencedResidualPicklists), and the metadata door skips an item with no slot, so it registers none.
  • @objectstack/objectql exports objectExtensionContribution and equalByValue from engine-registration.ts. Right. registerApp step 2b and the residual path now build one contribution, place included.
  • The jobs row text changed at every door. Right for two enabled jobs. See N3.
  • Boot: a residual extension now passes the registry's extend door, so a refusal that door raises now fails a boot that used to load and drop the entry. Right, it is what a body's entry gets, and the jsdoc says so. The changeset does not. See N4.

② Semver level

Clause-②: no (narrowing) is right. The diff refuses compositions that compose on main, and the claim's own conditional names that a narrowing. Metadata-protocol: narrowed is right: a value an author can write is now refused. narrowed takes at least minor on each package the diff moves, and the changeset gives minor to @objectstack/spec, @objectstack/metadata and @objectstack/objectql. All three move. The level is right.

The changeset carries both declaration lines, the Skills-docs: line, the **BREAKING** banner, a one-line fix, and exactly one ADR-0087 marker, registered stack-residual-extension-registered-and-jobs-judged. The marker id equals the entry id in the semantic migration file. A registered semantic entry with no D2 conversion is the right disposition: which of two jobs or two extensions to keep is the author's choice. Check Changeset and Lint & Repo Gates are green on the head.

The migration is owed and present. Its text is incomplete. See S1.

③ Boundary flags

  • Open question in the first dev report (who unifies the two extension literals after feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236): answered on this head. objectExtensionContribution is the one reading and step 2b calls it.
  • Second dev report: open_questions is empty. security_findings is none. I found none either.
  • Deviation, declaration lines differ from the dispatch order: right, see ②.
  • Deviation, file surface wider than the claim: justified. The claim placed unclaimedTopLevel in stack.zod.ts. It lives in packages/metadata/src/plugin.ts, and the fix cannot avoid it. engine-registration.ts is needed for the one reading. The migration entry is owed by the narrowing. The seat should record that the area lease named two paths and the diff has five source files.
  • Deviation, main merged in: needed, feat(spec): an object extension places the fields, groups and child lists it brings (place) #36236 moved step 2b.
  • Deviation, suites run outside the verify lock: a process matter. The check-runs on the head are the gate verdicts and they are green.
  • SQL push-down: no query, no id materialisation and no in-app join is added. No finding.
  • Escalated to the maintainer with the landing decision: shapes 3 and 4 in ① are narrowings the PR body's summary does not name. It says two shapes are newly refused.

④ Design judgment

packages/spec/src/stack.zod.ts: holds against the card and the boot code. The by-value claim for extensions mirrors claimedArtifactExtensions in metadata. deepEqualAuthored, sameAuthoredValue and equalByValue agree on undefined keys, arrays and depth. ownerBodyExtensionEntries finds the same body the boot finds (artifactPackageId(body) === ownerId), and puts its entries first, which is the boot's registration order. The jobs row is one row at every door. data is untouched, because the duplicate door never asks about it.

packages/metadata/src/plugin.ts: agrees with its jsdoc. An entry is listed when it names a target and no body carries an equal entry.

packages/objectql/src/plugin.ts: agrees with its jsdoc. Registration is last, under the residual id, through extend. The dangling-picklist class follows the residual objects' rule. A residual picklist that only a residual extension names is still refused by unreferencedResidualPicklists at validate, build and boot, so that case is refused where it is written.

packages/objectql/src/engine-registration.ts: one reading, both callers. Holds.

S1 (should-fix) — The migration entry under-describes what composition now refuses. Its surface names two shapes under 'preserve' with inputs that carry no manifest. The code also refuses (a) two residual extensions of one object when a package body extends that object too, which composed on main, and (b) all of these shapes in a 'first', 'last' or index composition that carries packages[] from a multi-package input, where an input WITH a manifest is also part of the residual. The changeset's "Refused now" list and the PR body's "Newly refused" list have the same gap, and the PR body states that only 'preserve' yields a residual, which the jsdoc in the same diff contradicts. Fix: name (a) and (b) in surface, replacement and reason, and in the changeset and PR body.

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. residualEntryPredicate claims a job by name, so the residual job is read as the body's copy. The binder counts by name: the top level holds two enabled jobs of the name, so jobNameCollisions refuses both. This is read from code, not driven. The card asks that a residual job is not accepted and then left unrun, and the new jobs sentence states the very rule that unschedules this pair. The jsdoc does not say the name claim also covers a different job. Two bodies each declaring the name have the same boot outcome, and the new CONTROL test pins that they compose. Close it one of two ways: judge the pair at composition (a further narrowing, to be declared), or state in the jsdoc and the migration entry that a cross-package job name is left to the binder and file a follow-up card for the maintainer to rule.

Nits, no effect on this head:

  • N1: packages/metadata/src/picklist-references.ts (outside the diff) still tells authors that a top-level objectExtensions entry of a composed stack is not registered. After this PR that is true only for an entry whose field names a picklist no body declares. Follow-up prose fix.
  • N2: logResidualSameTargetExtensions adds every owner-body entry, not only those for a target the residual extends. When the owner body has its own pair for one object and the residual extends another, the boot prints a second error line for the pair registerApp already reported. The spec side filters to the residual's targets. Follow-up.
  • N3: the jobs sentence ends "so none of them runs". When one of the two is disabled, the binder counts no collision. The sentence is exact only for two enabled jobs. Accepted deviation.
  • N4: the changeset's "Installed artifacts keep loading" bullet covers only the shared-slot shape. A built artifact whose residual extension the extend door refuses now fails its boot. Reachable only through strict: false or a hand-built artifact. Follow-up wording.
  • N5: sameAuthoredValue in metadata is a hand copy of the spec's deepEqualAuthored, and no test holds the two equal. Follow-up.

Implemented-by: claude/issue-35711-residual-extension-jobs
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT(增量)· head 058d5c28159de07a922922e89eee395e9e3dfbd3 · 2026-11-22T13:15Z

维护者速读

  • 用户能看到什么变化:和上一轮一样。用 composeStacks 拼包时,没有包标识的那部分给对象加的字段,现在能正常使用;拼包时会新拦下几种写法,只有后一段生效、或者两个都不运行的写法。这一轮只补了说明和两条测试,代码没变。
  • 为什么做:卡 objectql: a composed artifact's residual top-level objectExtensions entry is registered by no door, and a residual job is judged by no duplicate door #35711。这一轮是对席位契约档 L2 的 S1 和 S2 两条的修改。
  • 出错会怎样:最坏情况是拼包时多拦了不该拦的写法,作者会看到点名两处的报错。已经构建好的产物照常启动。可以撤回。
  • 要你做什么:这个 PR 是声明过的收窄。按队列守卫,它要等你批准后才能合入,席位会交给你。
  • 席位意见:ACCEPT。

增量核对(f4e83b06 → 058d5c28,2 个提交,4 个文件)

  • L2 S1(迁移说明没写全被拦下的写法)已改。 我逐句核了迁移条目 18 的 surface、replacement、reason,changeset 的 Refused now 段,以及 PR 正文第 34 行。三处现在都写了三种被拦下的写法:

    1. 两个同名的剩余 job;
    2. 剩余的对象扩展和持有 manifest.id 的那个包扩展同一个对象;
    3. 两个剩余扩展扩展同一个对象,即使另一个包也扩展了它。这一种在 main 上能拼过去。

    三处也都写明了不只 'preserve':用 'first'、'last' 或下标拼包时,只要某个输入本身是多包产物,结果带 packages[],同样会拦。正文原来「只有 'preserve' 会产生剩余部分」的说法已经删掉,第 79 行改成了两种来源。这和代码里 collectComposedResidualDuplicateEntryErrors 的 jsdoc 一致。

  • L2 S2(剩余 job 与包内 job 同名)按第二种办法收口。 这一轮不再加收窄。stack.zod.ts 里 residualEntryPredicate 的 docblock 和迁移条目开头的注释都写明了这个已知缺口:按名字认领,内容不同也会拼过去,启动时两个都不调度。迁移条目的 reason 末句和 changeset 的「Not refused (known gap)」段也写了。后续卡 jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431 已开(open,domain:server,pm:blocked),标题同时覆盖剩余 job 和两个包同名两种情况,PR 正文第 87 行引用了它。

  • 报错措辞改为「so when both are enabled neither runs」:SAME_STACK_ENTRY_IDENTITY.jobs.consequence 改了,测试里 JOB_CONSEQUENCE_AND_REMEDY 跟着改。我在本 head 上 git grep 了旧说法「so none of them runs」,全仓已经没有了,没有留下过时的文档或钉子。

  • changeset 新加的 Installed artifacts 句:剩余扩展现在和包内扩展一样走注册表的 extend 入口,所以被这个入口拒绝的扩展,会让以前能启动(只是丢掉它)的产物启动失败。这类扩展只能通过 strict: false 或手工产物出现。这是把已有行为说出来,不是新改的代码;作为不兼容写进了 changeset,写得对。

  • 新加的两条测试:

    • 'first' 和 'last' 下,两个同名剩余 job 放在嵌套产物旁边,用 it.each 拦下;另有一条对照:只有一个剩余 job 时能拼过去,而且断言 packages 长度为 2,证明测试不是空转。
    • 「两个剩余扩展扩展另一个包也扩展的对象」被拦下,断言了完整报错句。

    拦下的用例沿用文件里的 refusalOf / expectOneIssue,上一轮已经核过它们会断言 code 和 status。

  • 声明不变:Clause-②: no (narrowing)、Metadata-protocol: narrowed。Skills-docs: none — … 仍然属实:skills/** 里讲 composeStacks 的地方是 objectstack-platform/references/bootstrap.md:123-129 和 objectstack-ui/rules/navigation.md:11,讲扩展的地方是 objectstack-data/SKILL.md:360-366,都没有教把扩展或 job 放在剩余部分。小瑕疵,不阻塞:这一行的理由只提了 'preserve',其实对另外几种策略也成立。

  • dogfood:标题带 !,欠全量。报告 7079605850 钉在 058d5c28,也就是本 head:锁下 VERDICT command-exit 0,484 个文件通过、3 个跳过,4107 条用例通过、68 条跳过,没有失败。钉到了 head。

  • CI @ 058d5c28:60 success、13 skipped、0 failed;mergeable clean。

  • 落地:声明过的收窄。增量 L2 也通过后,由席位交给维护者批准(同 fix(service-analytics)!: refuse an object of a disabled package with the data route's 404 OBJECT_PACKAGE_DISABLED #36319)。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 058d5c28159de07a922922e89eee395e9e3dfbd3
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/18.stack-residual-extension-registered-and-jobs-judged.ts, packages/spec/src/stack.zod.ts + packages/metadata/src/plugin.ts, packages/objectql/src/plugin.ts, packages/objectql/src/engine-registration.ts
Security-touching: no
Rule-change-verified: none

Delta review. The previous record is PASS 7078102405 at f4e83b06c2d6e64daa0cb8e7cfb44ae4340c4f6d, with S1, S2 and nits N1 to N5. This record judges f4e83b06..058d5c28 in full and carries the earlier judgments of the unchanged files forward.

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, 8f58c380f0 and 058d5c2815. It holds no merge of main. It touches four files: the changeset, migration entry 18, the spec pin file and stack.zod.ts. The three implementing files (metadata/src/plugin.ts, objectql/src/plugin.ts, objectql/src/engine-registration.ts) are byte-identical to the reviewed head. The check-runs on the head are 60 success and 13 skipped. None failed and none is pending.

S1: closed
S2: closed
N3: closed
N4: closed

① Derived judgments

The delta changes no accepted shape and no refused shape. Read hunk by hunk:

  1. stack.zod.ts, the jobs row of SAME_STACK_ENTRY_IDENTITY: the last clause of the consequence sentence changes from "so none of them runs" to "so when both are enabled neither runs". This is message text only. It is one row, so every door still prints the same bytes. The identity, the predicate and the remedy are untouched. Right.
  2. stack.zod.ts, the docblock on residualEntryPredicate: a comment block that states the known gap. No code line moves. Right.
  3. Migration entry 18: the header comment, surface, replacement and reason are rewritten. id and acceptanceCriteria are unchanged, so the changeset's ADR-0087 marker still names this entry. Right.
  4. The spec pin file: two new describe blocks (the 'first' and 'last' reach with a packages[] CONTROL, and shape 3) and the new jobs sentence in the shared constant. Tests add no behaviour. They are the lane seat's ACCEPT.
  5. The changeset: prose only. The package levels, both declaration lines and the marker line are unchanged.

So the accept-set is exactly the one judged at f4e83b06: items 1 to 6 of the previous record stand. No further narrowing is added. The residual job that shares its name with a package body's job still composes, as before.

Public surface: the only published change in the delta is the jobs finding text. The new clause is exact for two enabled jobs and no longer claims anything about a disabled one.

② Semver level

Unchanged and still right. Clause-②: no (narrowing) and Metadata-protocol: narrowed are on the PR body and the changeset. The changeset gives minor to @objectstack/spec, @objectstack/metadata and @objectstack/objectql, with the **BREAKING** banner, the one-line fix and the one registered marker. Check Changeset and Lint & Repo Gates are green on this head. The delta publishes one changed message string, which the same changeset covers.

③ Boundary flags

  • Third dev report (7079605850): open_questions is empty and security_findings is none. I found none in the delta.
  • Deviation, tracker numbers only in comments: right. jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431 appears in the stack.zod.ts docblock and in the migration file's header comment. The three shipped strings carry no card number.
  • Deviation, the build, gates and typecheck ran outside the verify lock: a process matter. The check-runs on the head are the gate verdicts and they are green.
  • Deviation, file surface wider than the first claim: answered. The amended claim 7078023051 names all five source files.
  • Dogfood battery: pinned to this head. Report 7079605850 names 058d5c2815, os-verify-lock: VERDICT command-exit 0, Test Files 484 passed and 3 skipped, Tests 4107 passed and 68 skipped. The Dogfood Regression Gate check-run on the head is success.
  • jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431 exists and is open. Its title is the residual and two-body job name question. It is the right carrier for S2.
  • SQL push-down: the delta adds no query, no id materialisation and no in-app join. No finding.
  • Escalated to the maintainer: the landing route. The PR body now tells the maintainer there is nothing to do and says the seat lands this pull itself. That is wrong for a declared narrowing. The queue guard's narrowing leg (ruling on card governance: the guard scripts join the governed register, .claude/** lands by declared rule-change, and a narrowed spec change lands only by the maintainer #35321) needs BOTH an authorized approval, or the maintainer's own enqueue, AND a PASS contract review on the same head. This record is only the second half. Nothing in this delta changes that. See N7.

④ Design judgment

packages/spec/src/migrations/entries/semantic/18.stack-residual-extension-registered-and-jobs-judged.ts: holds against composeStacks on this head.

  • surface now defines the place exactly: a result that carries packages[] beside top-level entries no package body claims. That is what residualEntryPredicate reads. It then names all three refused shapes: two residual jobs of one name; a residual extension for an object the body carrying manifest.id also extends with other fields; two residual extensions of one object, also when a package body extends it, with the note that they composed before. Each matches the code and each has a pin.
  • replacement gives a fix for each shape, including "merge two top-level extensions of one object into one" for shape 3. Its account of manifest.id is right: 'preserve' selects the last input with a manifest, and 'first', 'last' or an index keep what selectManifest picks.
  • reason states the by-value claim, the reach under 'first', 'last' or an index once an input carries packages[], the new jobs wording, and the one case that is NOT refused. All agree with the code.
  • The strings name what is refused. One gloss is not exhaustive. See N6.

packages/spec/src/stack.zod.ts: the delta holds. The new docblock paragraph agrees with the code it sits on: the job claim is by name through SAME_STACK_ENTRY_IDENTITY, and jobNameCollisions lives in packages/runtime/src/app-artifact-handlers.ts. It says the outcome is read from code and not driven, which is honest. The rest of the file is as judged at f4e83b06.

packages/metadata/src/plugin.ts, packages/objectql/src/plugin.ts, packages/objectql/src/engine-registration.ts: unchanged in the delta. The previous judgments stand.

Closures, each read in the tree:

  • S1: the migration entry, the changeset and the PR body name shape 3 and the reach beyond 'preserve'. The PR body no longer says only 'preserve' yields a residual.
  • S2: closed the second way the finding offered. No further narrowing. The gap is stated in the residualEntryPredicate docblock, in the migration header comment and reason, in the changeset ("Not refused (known gap)") and in the PR's open items, with jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431 as the carrier.
  • N3: the row now ends "so when both are enabled neither runs", pinned by the spec test constant.
  • N4: the changeset's "Installed artifacts" bullet now says a residual extension the extend door refuses fails a boot that used to load and drop it.

No must-fix, no should-fix.

Nits, no effect on this head:

  • N1, N2, N5: still open as follow-ups. The PR body routes N1 and N5 to metadata: a residual picklist named only by a residual extension is refused as unreferenced; stale message #36432. N2 has no carrier card yet.
  • N6: the per-strategy gloss in surface, repeated in the changeset's "Fixed" bullet, lists which inputs feed the residual and leaves two cases out. Under 'first', 'last' or an index beside a multi-package input, a plain input WITH a manifest and no packages[] also has its entries in the residual, because no body is assembled for it there. Under 'preserve', the own top-level entries of a multi-package input are residual too. The defining clause before the gloss ("top-level entries no package body claims") covers both cases, and so does the door's code, so no refused shape is left unnamed. Accepted deviation. Do not fix it in the migration string on this head: that moves the head. A changeset or follow-up wording fix is enough.
  • N7: PR body, prose face. The Chinese summary item 4 says the maintainer has nothing to do and the seat merges it. The Verification section says "the seat lands it with --land". Both contradict the queue guard's narrowing leg. Fix on the PR body: say the maintainer's approval is needed. This is a prose edit that does not move the head.

Implemented-by: claude/issue-35711-residual-extension-jobs
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Seat record (2026-11-22T13:17Z) on head 058d5c28159de07a922922e89eee395e9e3dfbd3. This PR declares a narrowing, so the merge queue's Governed Surface Queue Guard admits it only on the maintainer's approval. The PR body's summary item 4 and its Verification line say the seat lands it with --land; that is superseded by this record (L2 delta nit N7).

维护者速读

  • 用户能看到什么变化:应用作者把几个包拼成一个产物时,不属于任何包的那部分给别人的对象加的字段现在能正常使用;以前字段直接消失,写入时报「字段不存在」,启动日志也不提。
  • 为什么做:这是拼包产物里「剩余部分」没人登记的最后一个漏洞;同时两个剩余部分声明同名定时任务时,以前拼包不拦,启动后两个都不运行。
  • 出错会怎样:拼包时新拦下两种写法(剩余部分里的同名定时任务;剩余部分与持有产物标识的包给同一对象各加一段扩展),作者会在校验时看到点名两处的报错;已构建的产物照常启动,只多一条错误日志;撤回本次合并即可恢复,不涉及数据迁移。
  • 先看:packages/spec/src/stack.zod.ts 里 residualEntryPredicate,它决定哪些剩余条目被判;再看 packages/objectql/src/plugin.ts 里 manifest 服务登记剩余扩展的一段。
  • 两分钟验证:CI 60 项通过、0 失败;完整 dogfood 在此提交上通过(报告 7079605850,退出码 0)。
  • 要你做什么:批准本 PR(它把原来能拼的两种写法改成拒绝,属于「收窄」,只能由你批);批后由席位放进合并队列。
  • 席位意见:同意合入。合同审查两轮通过,L1 两轮通过;剩余的定时任务命名缺口由 jobs: two jobs of one name compose and the boot schedules neither (residual and two-body) #36431 跟进。

席位核对

ACCEPT · Tier H (a declared narrowing: Clause-②: no (narrowing), Metadata-protocol: narrowed, queue guard leg for a declared narrowing)

  • L1: delta ACCEPT 7079682020 (L1-d), after the earlier REWORK.
  • L2: PASS 7078102405 (CONTRACT_REVIEW_TIER, S1 and S2), delta PASS 7079701866 (S1, S2, N3, N4 closed; no must-fix or should-fix open).
  • Dogfood battery at the head: os-dev-report 7079605850, command-exit 0.
  • CI on the head: 60 success, 13 skipped, 0 failed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Tier H hand-off (2026-11-22T13:18Z): this PR declares a narrowing (Clause-②: no (narrowing)), so the queue guard admits it only on the maintainer's approval. Head 058d5c28159de07a922922e89eee395e9e3dfbd3. The seat record above carries the 维护者速读; seat ACCEPT, L1 delta ACCEPT 7079682020, L2 delta PASS 7079701866. After an approving review the seat runs the pre-landing checks and enqueues it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 13:20
@os-zhuang
os-zhuang 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
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45026983959 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (12/16) — 失败步骤: Run the ui tests (shard 12/16)

    × 1. each member is its own section, in AUTHORED order, headed by `title` (or `Line Items`), with `columns` in authored order 188ms
    FAIL   dom  packages/plugin-form/src/__tests__/masterDetailDetailsMembers-8071.test.tsx > `object-master-detail-form` — the member shape of `details` > 1. each member is its own section, in AUTHORED o
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

  • packages/plugin-form/src/__tests__/masterDetailDetailsMembers-8071.test.tsx — 24h 窗口内只有本 PR 撞到过,暂不汇总(再有一个不同 PR 撞到就会自动开汇总 issue)。
  • ⚠️ 24h 评论账本没读完(超过 5 页仍未读到窗口尽头),所以上面的「不同 PR 数」是下界,不是全量。

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 3 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@os-zhuang
os-zhuang 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
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45039731179 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test UI (5/16) — 失败步骤: Run the ui tests (shard 5/16)

    × a phone draws the star beside the name, and its bottom bar's ⋯ holds no favorites entry 1202ms
    FAIL   dom  packages/app-shell/src/views/RecordDetailView.favoritesEntry-12427.test.tsx > record page: the favorite star beside the record name, none in the ⋯ (objectstack#36246) > a phone draws the s
      ↳ 失败原因: AssertionError: expected null to be truthy
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • ⚠️ 本 PR 过去 24h 已在队列失败 1 次(不含本次)。 内容未变而反复失败 ⇒ 高度怀疑 flaky 测试或与同组 PR 的语义冲突,重排不解决。
  • 过去 24h 队列共有 4 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue 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.

objectql: a composed artifact's residual top-level objectExtensions entry is registered by no door, and a residual job is judged by no duplicate door

3 participants