Skip to content

fix(runtime)!: callData's aggregate arm refuses a relation condition on a disabled package's object - #36337

Merged
os-zhuang merged 4 commits into
mainfrom
claude/issue-35526-aggregate-disabled-package
Nov 22, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/issue-35526-aggregate-disabled-package

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Part of #35526

Clause-②: yes (narrowing: for a non-system caller, callData's aggregate arm and its query fallback on a host with no protocol service refuse a nested-relation condition whose target belongs to a disabled package with 404 OBJECT_PACKAGE_DISABLED, where they answered the count or the matching rows)
Metadata-protocol: none
Skills-docs: none — the docs already teach this answer: content/docs/deployment/marketplace-handbook.mdx says a disabled module is refused on the data plane with 404 OBJECT_PACKAGE_DISABLED and that in-process ctx.api is not refused; this PR makes the /mcp aggregate door match that text and leaves the system context as it is

维护者速读

  • 用户能看到什么变化:环境里停用了某个应用包时,普通成员通过 AI 助手的统计工具(或动作)用该包对象的字段做关联条件,以前会得到 1 或 0 的计数,现在和直接读取一样被拒绝(404);系统身份的调用不变。
  • 为什么做:属于"停用包在所有读取入口都不可见"这一组修复,替成员挡住统计入口这扇门,避免从计数推出停用包里的字段内容。
  • 出错会怎样:只影响停用了包、且查询条件指向该包对象的成员请求;没有停用包的环境不受影响;可以直接撤回本 PR 恢复原行为。
  • 要你做什么:决定系统身份调用是否也要拒绝(这一半留给你裁决,本 PR 不改它)。

What changes

  • packages/runtime/src/action-execution.ts refuseUnservedRelationTargets (used by callData's aggregate arm and by the query fallback on a host with no protocol service) asks, per nested-relation condition site and before the exposure check, the engine registry's isObjectPackageDisabled through registryObjectPackageDisabled (@objectstack/core, the accessor already documented as "the predicate the data plane asks"). A disabled target throws the protocol's own objectPackageDisabledError(target) with param: where.FIELD: the same code, status, sentence and object the protocol's relation-condition check (refuseUnservedRelationTarget, metadata-protocol: $expand and a relation condition serve a disabled package's records through an enabled object's lookup, while the data route answers 404 OBJECT_PACKAGE_DISABLED #35427) throws. No second copy of the predicate or the refusal.
  • @objectstack/metadata-protocol exports objectPackageDisabledError from its root, beside recordNotFoundError (exported for the same callData fallback reason). Additive, enabling-only: no behaviour of that package changes. This is a new published export; see Acceptance notes.
  • The system-context bypass (exposureGated = !isSystem) is not changed. The package check rides it, so a system context is still answered the count. That half of the card is the maintainer's open point (ruling 6545646924 keeps in-process access served; a hook's ctx.api is a system context); the docblock names it and a pin holds today's answer.
  • Stdio twin (packages/mcp/src/stdio-data-bridge.ts enforceRelationTargetExposure): measured, not changed. With a protocol it already refuses a non-system caller 404 OBJECT_PACKAGE_DISABLED (it reads the target through the protocol's by-name read). No pin added there.

The system-identity half of #35526 awaits a maintainer decision, so this PR does not close the card.

Tests

New file packages/runtime/src/action-execution-calldata-relation-disabled-package-35526.test.ts: a real ObjectQL over SqlDriver (in-memory SQLite), the real ObjectStackProtocolImplementation where the host has one, packages A/B/C, dp_alpha.b_ref into B's dp_beta, dp_alpha.c_ref into C's dp_gamma.

  • THE PIN, aggregate arm, with and without a protocol: member caller, B disabled, where { b_ref: { secret_note: VALUE } } refused 404 OBJECT_PACKAGE_DISABLED, object: dp_beta, param: where.b_ref, for the stored value AND for a value nothing holds (one answer both ways: no oracle). Code and status asserted.
  • THE PIN, query fallback (no protocol): same refusal, both values.
  • CONTROL: B re-enabled answers count 1 / 0 (aggregate) and the matching record (fallback).
  • CONTROL: a condition into enabled C's dp_gamma is served (1 / 0) while B is disabled.
  • SYSTEM (pinned as today's answer, open point named in the test): aggregate with B disabled answers 1 / 0 on both hosts.
  • The query arm through the protocol still answers 404 for the member (the data route's own answer, unchanged).

Full dogfood battery (owed once at the final head for the narrowing arm), run at f26f20f54e by seat 7 under the shared verify lock (pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, no OS_TEST_SHARD, no path): lock VERDICT command-exit 1; Test Files 6 failed | 478 passed | 3 skipped (487); Tests 6 failed | 4101 passed | 68 skipped (4175). Each of the six failures is Test timed out in 5000ms on a shared box (the hold ran 1h42m beside other sessions' unlocked work), and none of the six files reaches callData's aggregate arm or a disabled package's relation condition (grep of the six files for aggregate / OBJECT_PACKAGE_DISABLED / disabled package: no hit; the one disabled hit is a disabled-flow refusal): flow-name-per-namespace.dogfood.test.ts, object-hook-lifecycle-showcase.dogfood.test.ts, packaged-flow-write-door-parity.dogfood.test.ts, permission-unknown-grant-object-refusal.dogfood.test.ts, rest-route-generation-tombstones.test.ts, wall-package-doors-refusal.dogfood.test.ts. A locked re-run of those six files alone was queued and is NOT MEASURED (the lock went to another session's full battery; queue-timeout, exit 99). CI's Dogfood Regression Gate runs the battery in the merge queue.

Acceptance notes

  • New published export. objectPackageDisabledError is now on @objectstack/metadata-protocol's root. Without it the no-protocol fallback has no way to raise the data plane's refusal except a copy of the constructor, which the file's own rule forbids. Precedent: recordNotFoundError, exported for the same callData fallback. Flagged for the reviewer because a published export is contract surface.
  • Read only, not measured on a public door (not filed): on a host that registers no protocol service, callData serves a disabled package's object when it is ADDRESSED directly (the package refusal lives in the protocol's by-name read, which that host lacks), so after this PR such a host refuses a relation condition into the object but still serves the object itself. The stdio bridge on a no-protocol host serves both (measured with a temporary probe, not committed). And the MCP multi-env query fallback can hand callData a raw driver with no registry, where the predicate answers "not disabled" (a registry that cannot answer disables nothing, as on the data route).
  • Stdio twin readings (temporary probe over a real engine and the real protocol, B disabled, where { b_ref: { secret_note: VALUE } }): non-system + protocol: aggregate and query refused 404 OBJECT_PACKAGE_DISABLED for both values; non-system, no protocol: served 1 / 0; system, either host: served 1 / 0.
  • Overlap with fix(runtime)!: an action's selection is read in the caller's scope before the action runs #36132 (same file, other hunks): overlap-check before each push, clean every time. fix(runtime)!: an action's selection is read in the caller's scope before the action runs #36132 has since merged into main (c448c61, hunks near L204, L3442-3794, L4676, disjoint from this PR's L340 and the two call sites). overlap-check against origin/main ed33f8a: merges cleanly. The head was not re-merged with main: no GitHub conflict and no main-caused red (AGENTS.md multi-agent discipline 10), and a new head would void the battery above. The merge queue builds and tests the joint tree.
  • test:repo (vitest repo project) is CI's (Test Core); this diff touches none of its files.

Verification

Read first, by risk:

  1. packages/runtime/src/action-execution.ts, the hunk in refuseUnservedRelationTargets: the predicate is read from the engine passed in (ql on the fallback, engine on the aggregate arm).
  2. packages/metadata-protocol/src/index.ts: the one added export line.
  3. The new test file's SYSTEM pin, which holds the open point.

Two minutes: pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/action-execution-calldata-relation-disabled-package-35526.test.ts → 12 passed.

All readings at head f26f20f54e unless named.

Premise on origin/main a5a5312 (before the fix)

Same pin file run before the runtime edit (in-memory driver harness at that point): the 3 member pins red (aggregate with protocol, aggregate without protocol, query fallback: the call resolved, nothing refused), 9 green: B re-enabled answers 1 / 0, the enabled-package condition answers 1 / 0, the system caller answers 1 / 0 with B disabled on both hosts, and the query arm through the protocol answers 404 OBJECT_PACKAGE_DISABLED. This matches the card's measured 1 / 0 oracle.

Pins, ablation and restore
  • pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/action-execution-calldata-relation-disabled-package-35526.test.ts (lock VERDICT command-exit 0): Test Files 1 passed, Tests 12 passed.
  • Ablation via scripts/ablation-replace.mjs, anchor if (isObjectPackageDisabled(site.target)) { replaced by if (false && isObjectPackageDisabled(site.target)) {: anchor 1 to 0, blob 0ea829f2eb44 to 2866cbecc099; Tests 3 failed, 9 passed (exactly the three member pins). Restored: blob 0ea829f2eb44 equals the HEAD blob, git diff HEAD empty. The runtime test imports ./action-execution.js from source, so no build sits between the mutation and the run.
Package suites and typecheck
  • pnpm --filter @objectstack/metadata-protocol --filter @objectstack/runtime typecheck: exit 0.
  • pnpm --filter @objectstack/metadata-protocol test: exit 0.
  • pnpm --filter @objectstack/runtime test (local project): Test Files 636 passed of 637, the one failure being this PR's pin file caught mid-edit while its harness moved from the frozen in-memory driver to SqlDriver; the pin file alone then passed 12 / 12 at the final head.
Derived gate families

Seat 4, at f26f20f54e: 69 derived, 69 run (check:type-check-debt green in its own locked run). Earlier runs caught check:driver-memory-census and check:test-source-alias; both fixed before this head.

Seat 7, again at f26f20f54e (no new commit): node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands derived 69 commands (its stderr warns the tree is 39 commits behind origin/main and six scripts/pm gate files moved there; the head was kept, see Acceptance notes). 67 exit 0. check:plugin-teardown-shape --self-test first exited 3 (shallow clone could not reach its pinned fixture commit; fetched it) and then 0; check:dts-closure first exited 1 (no dist yet, run beside the build) and then 0 after the build. Two are NOT MEASURED, each exit 3 (prerequisite not met): check:dual-build-cjs-loads (six packages outside the dogfood closure have no dist: studio, client-react, embedder-openai, knowledge-memory, knowledge-ragflow, scenarios; their locked build never got the lock) and check:type-check-debt (its nested locked closure build queue-timed out). --ran reconciliation: 69 derived, 67 run, 2 NOT-MEASURED (derived from the recorded exit 3), 0 unrun, exit 0.

CI at f26f20f54e (check-runs read, not re-run): Lint & Repo Gates success, TypeScript Type Check success, Type Check · debt ledger success, Test Core success (10/10 shards), Build Core success, Governed Surface Queue Guard success, Test UI success, Live E2E UI success, Dogfood Regression Gate success (PR run; its shards run in the queue), Check Changeset success; Lint UI, Type Check UI, Build & E2E UI skipped (no ui path).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC

…a disabled package's object 404 OBJECT_PACKAGE_DISABLED

For a non-system caller, the aggregate arm and the no-protocol query
fallback ask the engine registry's isObjectPackageDisabled for each
nested-relation condition's target and refuse with the protocol's own
objectPackageDisabledError, now exported from @objectstack/metadata-protocol.
The system-context bypass is unchanged and pinned pending a decision.

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
… package's object

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
…load metadata at collection

Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. ⚠️ 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/index.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 67 of 249 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 — 35 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 3f7fdd002130a34ce24f735733c2642538914af9 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 3f7fdd002130a34ce24f735733c2642538914af9

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract-review-claim: session_01QsR2jTeURPvEm465RcoYEC · head f26f20f · 2026-11-22T09:18Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf

L1 ACCEPT · head f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b · 2026-11-22T09:20Z

维护者速读

席位核对

  • 形态:l1-face --pr 36337 只标了一项 dogfood(本 PR 欠一轮完整测试电池),下面判断;其余都是 ok:draft、base main、Part of #35526、两个已发布包都有 changeset。Part of 是对的:卡里系统调用者那一半是开放问题,triage 7012522848 已把它拆出来;所以落地后卡要保留 pm:dispatched。改动 4 个文件,+247 −3;check-governed-merges 判定 NOT governed,250 行。
  • 实现读法:包是否停用的判断放在暴露门之前,在读目标对象的 schema 之前就拒。问的是 engine registry 的 isObjectPackageDisabled,通过 core 里已有的 registryObjectPackageDisabled 去问;协议里的 isObjectOfDisabledPackage 问的也是同一个谓词(protocol-authoring-refusals.ts:38)。拒绝用的是协议那个唯一的构造函数,param 的写法也和协议的 refuseUnservedRelationTarget(protocol-query-validation.ts:1388)一致,都是 where.<field>。registry 答不上来时不当作停用,和数据路由一样。系统调用者仍然走原来的旁路,docblock 把这一点标成 OPEN POINT,和卡上的开放问题对得上。
  • changeset 逐句核:FROM/TO、param 示例、「没有停用包的环境无变化」「系统上下文不变」、新导出不改变该包的行为,都和 diff 一致。adr-0087 not-required 的理由成立:没有 schema 键、取值或类型变化,存的数据也不改。Skills-docs: none 属实,marketplace-handbook.mdx:357–369 已经写明停用模块在对外入口上回 404,在进程内的 ctx.api 上不拒。
  • 测试证据:新增 12 条用例,envelope 同时断言 code、status、object、param。覆盖三块:计数入口的钉和两条对照(重新启用后恢复计数、别的包的对象照常服务);一条 SYSTEM 用例,把当前的回答钉住等裁决;无协议查询兜底的钉和两条对照;另有一条协议查询路径,原本就回 404,本 PR 不改。消融 3 红 9 绿,之后已按字节恢复。这些用例我没有在本地重跑,读的是报告和 CI(Test Core 10/10)。
  • dogfood(本条由我判断):head 上完整电池 4175 条里 6 条失败,全部是 Test timed out in 5000ms。我在这六个文件里搜了 aggregate、callData、isObjectPackageDisabled、OBJECT_PACKAGE_DISABLED、disablePackage,每个都是 0 次命中。新加的检查只有在「非系统调用者」加「关联过滤」加「目标包已停用」同时成立时才会触发,其余情况下只多一次同步谓词调用,不可能造成 5 秒超时。CI 上的 Dogfood Regression Gate 在这个 head 是 success。隔离重跑没测成(两次 exit 99),我接受这一项,判为共享机器上的超时,不是回归。
  • 门禁 check-runs @ f26f20f5:39 success · 18 expected skip · 0 failed · 0 pending;mergeable_state clean。head 没有合并 main;fix(runtime)!: an action's selection is read in the caller's scope before the action runs #36132 改了 action-execution.ts,但和本 PR 的改动块不相交,overlap-check 为 clean。
  • 接受的偏差:无。
  • 范围外去向:dev 读代码时发现,对系统调用者,计数入口上对被访问对象本身的 mcp: list_objects / describe_object cannot see any package-installed object (a marketplace app's whole schema) — the HTTP bridge reads the metadata service, not the SchemaRegistry REST serves #25120 包拒绝也被跳过了,这一点没有实测。它属于同一个开放问题,已写进那条问题的选项 B;不另立卡,我照收。
  • 落地条款:收窄、非受管,等席位的 L2 ACCEPT 后由席位 ready + auto-merge;Part of ⇒ 卡保留 pm:dispatched。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b
Local-runs: none
Scope: packages/runtime/src/action-execution.ts, packages/metadata-protocol/src/index.ts, packages/runtime/src/action-execution-calldata-relation-disabled-package-35526.test.ts + packages/metadata-protocol/src/protocol-authoring-refusals.ts, packages/metadata-protocol/src/protocol-query-validation.ts, packages/core/src/security/effective-object-permissions.ts, packages/core/src/utils/relation-condition-sites.ts, packages/objectql/src/relation-filter-lowering.ts, packages/objectql/src/engine-query-lowering.ts, packages/objectql/src/internal-field-evaluation-guard.ts, packages/mcp/src/stdio-data-bridge.ts, content/docs/deployment/marketplace-handbook.mdx (cited code, read at the head, not reviewed)

PR #36337, card #35526 (member-caller half, Part of). Narrowing face, plus the new published root export. Isolated subagent of the seat's session; inputs were the card and its 7 comments, the PR body, the 4-file net diff against merge base a5a5312ff4, and the check-runs on the head. No earlier contract record exists on the card. PR author is objectstack-fleet[bot], so no off-relay note is owed.

Findings: 0 must-fix, 2 should-fix (S1, S2), 5 nits. Three escalations (E1 to E3).

① Derived judgments

Every answer the diff moves, and every one it leaves:

  1. callData aggregate arm, non-system caller, where holding a nested-relation condition directly beneath a lookup of the queried object, target owned by a disabled package: was served the count, now 404 OBJECT_PACKAGE_DISABLED with the target as object and where.FIELD as param, thrown before any schema or row of the target is read. RIGHT. Same predicate the data route asks (registry.isObjectPackageDisabled through registryObjectPackageDisabled, equivalent to the protocol's isObjectOfDisabledPackage, both optional-called on the same engine.registry), same constructor, same order as the protocol's refuseUnservedRelationTarget (package first, exposure second).
  2. callData query/find fallback on a host with no protocol service, same caller and condition: was served the rows, now the same 404. RIGHT, with the dev's own caveat standing (E3): that host still serves the disabled object when it is addressed directly, so the refusal there closes the condition and not the object.
  3. Not named by the PR or the changeset: a target that is BOTH in a disabled package and not exposed (apiEnabled: false, or list left out of apiMethods) moves from 404 OBJECT_API_DISABLED / 405 OBJECT_API_METHOD_NOT_ALLOWED to 404 OBJECT_PACKAGE_DISABLED. A refusal becomes another refusal; nothing is served that was refused. RIGHT (the protocol answers in that order, and so does the addressed-object gate). It is unpinned (nit N3).
  4. System context: unchanged. Both call sites still sit under if (exposureGated), and the package check rides it. Pinned as today's answer on the aggregate arm, both hosts. Not judged here (E1).
  5. A registry that cannot answer (a raw driver on the MCP multi-env fallback, a double): unchanged, nothing refused. RIGHT as parity with the data route's optional call; the dev disclosed it.
  6. Hop 2 and hop 3: unchanged, and by my reading still SERVED. See S1.
  7. Public surface: the root of @objectstack/metadata-protocol gains objectPackageDisabledError(object: string): Error. Additive, no behaviour change in that package. RIGHT to ship (see ③), wrongly declared (S2).
  8. No new error code, no new wire field (param already rides this refusal on the data route since metadata-protocol: $expand and a relation condition serve a disabled package's records through an enabled object's lookup, while the data route answers 404 OBJECT_PACKAGE_DISABLED #35427), no ledger change. The published handbook already lists the MCP data tools among the outward doors that answer OBJECT_PACKAGE_DISABLED (marketplace-handbook.mdx, the "Disabled has one meaning" section), so Skills-docs: none with its reason holds.

S1, should-fix, carry on a follow-up card. Read, not measured. The refusal is asked one hop deep, while the engine serves three and the data route asks every hop.

② Semver level

  • Level: patch on @objectstack/runtime and @objectstack/metadata-protocol. RIGHT. Metadata-protocol: none is true (nothing a metadata author writes moves), and AGENTS.md Post-Task step 3 ships a non-protocol change at patch, breaking or not, with its banner. Both packages sit in the fixed group.
  • Breaking carriers: ! in the title and the changeset summary, the **BREAKING** banner, FROM / TO and the one-line fix, and the ADR-0087 marker not-required (no-migration-prescription) are all present. Check Changeset is success on the head (both runs).
  • S2, should-fix: the Clause-②: value is wrong. The PR body, the changeset body and both claims read Clause-②: no (narrowing). The diff also adds a re-exported name to a published package entry, and the criterion is "widens an accept set OR enlarges the public surface", the public surface being what the built entry declarations reach (execution-duties.md). The truthful line is Clause-②: yes (narrowing), the combination clause2-line.mjs defines as "a diff that widens one surface and narrows another". Precedent on this tree: .changeset/34170-export-signed-body-readers.md and .changeset/35633-mcp-doc-answer-rule-export.md, both export-only, both yes with Metadata-protocol: none at patch. Nothing downstream changes: the level stays patch, the narrowing arm still marks it breaking, and this record is already at the higher tier. That is why it is not a must-fix. The PR body line and a corrected claim line are seat writes that move no head; the changeset line needs a commit, so it rides the next head move or is carried on a follow-up card (a prose-only head move keeps this record under a Regen-provenance: line).

③ Boundary flags

④ Design judgment

  • The narrowing against the published contract on main: it takes no declared capability away. No doc or schema promises a relation condition into a disabled package's object, and the handbook says the opposite: a disabled module is refused on the data plane, and OBJECT_PACKAGE_DISABLED is the answer of the outward doors, the MCP data tools included. The diff makes that refusal real on one door that did not give it.
  • packages/runtime/src/action-execution.ts: the code agrees with the contract it cites, at the hop it asks. The predicate is read from the engine handed in (ql on the fallback, the resolved engine on the aggregate arm), the same registry the protocol reads; the refusal is thrown before resolveWriteResponseSchema touches the target; Object.assign(..., { param }) matches the protocol's disabled.param = param. The where. prefix differs from the data route's filter. and follows this door's own security(runtime): callData's engine fallback hands a caller's where to ql.find after judging only the addressed object, so a nested-relation condition skips the target's exposure ask (census row 10 of #22661) #22823 spelling, which is consistent. Depth is the gap (S1). The docblock is accurate, including the fail-open sentence.
  • packages/metadata-protocol/src/index.ts: one export line, and its comment says what it is. Holds.
  • The pin file: real ObjectQL over SqlDriver, the real protocol where the host has one, code and status asserted, both values asserted so the "no oracle" claim is tested, controls on both sides, ablation recorded as 3 red / 9 green and restored. Holds. Nits below.

Nits (no effect on correctness or the contract):

Escalations:

  • E1, maintainer: whether a system-context callData call is refused too. Both dev reports recommend B and note that B must also decide the addressed-object package check, which returns early for a system context. Triage 7012522848 asked for this half on its own decision card; no such card is named on the thread or in the PR body. Evidence only, no ruling: the handbook currently tells app authors that in-process code never meets OBJECT_PACKAGE_DISABLED, and which doors hand callData a system context is unmeasured.
  • E2, seat: measure and file S1 (hop 2 and 3, package and exposure questions, callData and the stdio bridge).
  • E3, seat: give the dev's no-protocol-host note a carrier, or record why it has none.

Implemented-by: claude/issue-35526-aggregate-disabled-package
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b
Local-runs: none
Scope: packages/runtime/src/action-execution.ts, packages/metadata-protocol/src/index.ts, packages/runtime/src/action-execution-calldata-relation-disabled-package-35526.test.ts + packages/metadata-protocol/src/protocol-authoring-refusals.ts, packages/metadata-protocol/src/protocol-query-validation.ts, packages/core/src/security/effective-object-permissions.ts, packages/core/src/utils/relation-condition-sites.ts, packages/objectql/src/relation-filter-lowering.ts, packages/objectql/src/engine-query-lowering.ts, packages/objectql/src/internal-field-evaluation-guard.ts, packages/mcp/src/stdio-data-bridge.ts, content/docs/deployment/marketplace-handbook.mdx (cited code, read at the head, not reviewed)

Delta record on PR #36337, card #35526, same head as record 7077187908 and by the same reviewer. It closes the two should-fix findings of that record and changes nothing else in it.

The code is unchanged. The head has not moved, the diff is the same four files, and nothing was built, run or re-run. "Closed" below means CARRIED on a follow-up card, as record 7077187908 allowed for a non-blocking should-fix. It does not mean fixed: hop 2 and hop 3 are, by my reading, still served on this head, and the changeset file on this head still reads Clause-②: no (narrowing…).

S1: closed — carried by #36393, non-blocking per 7077187908
S2: closed — carried by #36393, non-blocking per 7077187908

No must-fix is open. No should-fix is open.

① Derived judgments

Unchanged from 7077187908: every answer the diff moves is right at the hop it asks, and the system context is untouched and pinned as today's answer.

S1 (the refusal is one hop deep while the engine serves three and the data route asks every hop; read, not measured) is carried by #36393 item 1 and its to-do items 1 and 2. Read against the record, the card holds all of it: the one-pass walk in refuseUnservedRelationTargets, RELATION_CONDITION_MAX_HOPS = 3, the two-hop example, both questions (package and exposure), both doors (callData and the stdio bridge's enforceRelationTargetExposure), the "read, not measured" label, and a measurement before the fix (a two-hop member pin per door). The card's item 3 also takes the changeset's TO line ("a condition directly beneath a lookup of the queried object"), which the record asked for on a head move. The card names #35526 as its parent and says a member can still read the data through a two-hop condition, so the member half is not recorded as finished on this PR alone.

② Semver level

Unchanged: patch on both packages is right, and the breaking carriers are present.

S2 (the Clause-②: value should be yes (narrowing), because this PR adds a root export to a published entry) stood in three places. Read now:

Until that commit lands, the PR body and the changeset body on this head disagree on the value (yes against no). The level, the narrowing arm and the breaking marking are the same under both, and no check on the head is red.

③ Boundary flags

Unchanged from 7077187908. The export is accepted as shipped; the system-caller half is not ruled here and stays the maintainer's (E1); the dogfood battery reading stands, including that no green battery exists for this head and the merge queue's shard run is the first real verdict; SQL push-down has nothing to find.

E3 (the no-protocol host that still serves a disabled object addressed directly) now has a carrier: #36393 item 2, measured first. Nits N1, N3 and N4 are on the card's to-do item 3 and N5 on its item 3; N2 has no carrier and needs none.

One observation, outside S1 and S2: the card's body grades it p1 with the reason given (the same inference the maintainer graded p1 on #35526), while its label still read priority:p2 when I read it. The board reads the label.

④ Design judgment

Unchanged from 7077187908. The narrowing takes no declared capability away and makes the handbook's own refusal real on this door, one hop deep; depth is the gap, and it is carried.

Implemented-by: claude/issue-35526-aggregate-disabled-package
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Landing (seat 7, 2026-11-22T09:42Z): head f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b · L1 ACCEPT 7077093703 (L1-d) · L2 PASS 7077187908 + delta 7077302942 (CONTRACT_REVIEW_TIER, narrowing face; S1 and S2 closed as carried by #36393, no must-fix or should-fix open) · check-governed-merges --pr 36337: NOT governed · CI on the head: all success or skipped · claim corrected 7077246987. → pr_ready + automerge_enable (merge queue). Part of #35526: the card stays open for the system-caller half (decision with the maintainer) and #36393.
Accepted: the dogfood battery at this head read 6/4175 failures, all 5000 ms timeouts in files that do not reach the changed path (L1 grep, L2 reach check); the isolated re-run is NOT MEASURED, and the merge queue's shard run is the first green battery. The root export objectPackageDisabledError is accepted as shipped (L2, option A). Until #36393's commit lands, the PR body reads Clause-②: yes (narrowing) and the changeset no (narrowing); level and breaking marking agree under both.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 09:42
@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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Seat record (2026-11-22T13:47Z) on head f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b. The merge queue removed this PR at 2026-11-22T10:18Z: it declares a narrowing, and the Governed Surface Queue Guard admits a declared narrowing only on the maintainer's approval, so the seat's landing 7077317119 was not enough. This record and the hand-off below are the right route.

维护者速读

  • 用户能看到什么变化:环境里停用了某个应用包时,普通成员通过 AI 助手的统计工具(或动作)用该包对象的字段做关联条件,以前会得到 1 或 0 的计数,现在和直接读取一样被拒绝。
  • 为什么做:「停用包在所有读取入口都不可见」这一组修复里的统计入口,避免从计数推出停用包里的字段内容。
  • 出错会怎样:只影响停用了包、且条件指向该包对象的成员请求;没有停用包的环境不受影响;撤回本 PR 即恢复。
  • 先看:packages/runtime/src/action-execution.ts 里 refuseUnservedRelationTargets,统计入口在这里判断目标对象的包是否停用。
  • 两分钟验证:CI 42 项通过、0 失败。
  • 要你做什么:批准本 PR(它把原来能返回计数的请求改成拒绝,属于「收窄」,只能由你批);批后由席位放进合并队列。正文里「决定系统身份是否也拒绝」一项你已在 09:47 裁定为「也一律拒绝」,那一半随 callData: the disabled-package refusal of a relation condition stops at the first hop (and the no-protocol fallback still serves the addressed object) #36393 交付,不在本 PR。
  • 席位意见:同意合入。合同审查两轮通过,L1 通过。

席位核对

ACCEPT · Tier H (a declared narrowing: Clause-②: yes (narrowing), queue guard leg for a declared narrowing)

  • L1: ACCEPT 7077093703 (L1-d).
  • L2: PASS 7077187908 (CONTRACT_REVIEW_TIER), delta PASS 7077302942.
  • CI on the head: 42 success, 20 skipped, 0 failed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b
Local-runs: none
Scope: packages/runtime/src/action-execution.ts, packages/metadata-protocol/src/index.ts, packages/runtime/src/action-execution-calldata-relation-disabled-package-35526.test.ts + packages/metadata-protocol/src/protocol.ts, packages/metadata-protocol/src/protocol-authoring-refusals.ts, packages/metadata-protocol/src/protocol-query-validation.ts, packages/core/src/security/effective-object-permissions.ts, packages/core/src/utils/relation-condition-sites.ts, packages/objectql/src/relation-filter-lowering.ts, packages/objectql/src/internal-field-evaluation-guard.ts, packages/mcp/src/stdio-data-bridge.ts (cited code, read at the head, not reviewed)

Same-head re-render on PR #36337, card #35526 (Part of), narrowing face. It restates, in the shape the queue guard's reader takes, the conclusions of the two earlier records by this seat on this head (record ID: 7077187908) and (record ID: 7077302942), after an independent re-read by an isolated reviewer. Inputs read fresh from GitHub: the card body and its 9 comments, the PR body and its 7 comments, the 4-file net diff against merge base a5a5312ff4, follow-up card #36393 with its 3 comments, the check-runs on the head, and the cited files at the head.

The code is unchanged. The head has not moved since both earlier records, the diff is the same four files (+247, -3), and nothing was built, run or re-run. "Closed" below means CARRIED on follow-up card #36393, which the first record allowed for a finding that does not block. It does not mean fixed on this head.

S1: closed

S2: closed

No must-fix, no should-fix.

① Derived judgments

Re-read at the head, every answer the diff moves is right at the hop it asks:

  1. callData aggregate arm, non-system caller, a nested-relation condition directly beneath a lookup of the queried object, target owned by a disabled package: was answered the count, now 404 OBJECT_PACKAGE_DISABLED with the target as object and where.FIELD as param, thrown before the target's schema is resolved. RIGHT. The predicate is registryObjectPackageDisabled over the engine's own registry (core, effective-object-permissions.ts), an optional call that answers false when the registry has no such method; the refusal is the protocol's one constructor (objectPackageDisabledError in protocol-authoring-refusals.ts, re-exported through protocol.ts), and the param assignment mirrors protocol-query-validation.ts.
  2. query fallback on a host with no protocol service, same caller and condition: was answered the rows, now the same 404. RIGHT.
  3. A target both in a disabled package and not exposed moves from the exposure refusal to the package refusal. A refusal stays a refusal. RIGHT, unpinned (nit N3).
  4. System context: unchanged on this head. Both call sites still sit under if (exposureGated). Pinned as today's answer.
  5. A registry that cannot answer: unchanged, nothing refused. RIGHT as parity with the data route.
  6. Public surface: the root of @objectstack/metadata-protocol gains objectPackageDisabledError. Additive. RIGHT to ship.

S1 (the refusal is asked one hop deep while the engine serves three; read, not measured) still reads true at the head: relationConditionSites records a site and does not push the site's own condition back onto its walk, refuseUnservedRelationTargets loops those sites once, and RELATION_CONDITION_MAX_HOPS = 3 in objectql/relation-filter-lowering.ts. It is not introduced by this diff. It is carried whole by #36393 (open, priority:p1, pm:blocked, Blocked-by: #36337, parent #35526): item 1 names the two-hop example, both questions (package and exposure) and both doors (callData and the stdio bridge), and to-do items 1 and 2 measure first and then descend every hop. The card also takes the changeset's TO line wording. The member half of #35526 is therefore not finished by this PR alone, and #35526 stays open.

② Semver level

patch on @objectstack/runtime and @objectstack/metadata-protocol is right: Metadata-protocol: none is true, and the breaking carriers are all present (the ! in the title and changeset summary, the **BREAKING** banner, FROM and TO, the fix line, the ADR-0087 marker). Check Changeset is success on the head, all three runs.

S2 (the Clause-②: value should read yes (narrowing) because the diff adds a root export to a published entry) stands as the earlier records left it:

So the PR body and the changeset body disagree on that one value until #36393's commit lands. The level, the narrowing arm and the breaking marking are the same under both values, and no check on the head is red.

③ Boundary flags

④ Design judgment

  • The narrowing against the published contract on main: it takes no declared capability away. No doc or schema promises a relation condition into a disabled package's object; the handbook says a disabled module is refused on the data plane with OBJECT_PACKAGE_DISABLED. The diff makes that refusal real on one door, one hop deep. Depth is the gap, and it is carried (S1 above).
  • packages/runtime/src/action-execution.ts: the code agrees with the contract it cites at the hop it asks. The predicate reads the engine handed in on both call sites, the throw precedes the target's schema read, and the package question precedes the exposure question, the order the protocol keeps.
  • packages/metadata-protocol/src/index.ts: one export line with an accurate comment. Holds.
  • The pin file: real ObjectQL over SqlDriver, the real protocol where the host has one, code, status, object and param asserted, both values asserted, controls on both sides, ablation recorded as 3 red and 9 green and restored. Holds.

Nits (no effect on correctness or the contract), all carried by #36393 to-do item 3 or its item 3 unless said:

Escalations of the first record, as they stand now: E1 is answered by the ruling above and executed on #36393; E2 and E3 are carried by #36393. Nothing is left unrouted.

Implemented-by: claude/issue-35526-aggregate-disabled-package
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Tier H hand-off (2026-11-22T13:53Z): this PR declares a narrowing (Clause-②: yes (narrowing)), so the queue guard admits it only on the maintainer's approval. Head f26f20f54edbe76ba0063f7d6afeb8cd4b737b6b. The seat record above carries the 维护者速读; seat ACCEPT, L1 ACCEPT 7077093703, L2 PASS 7077187908, delta 7077302942, same-head re-render PASS 7080137727. 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 added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit fcbebf2 Nov 22, 2026
67 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35526-aggregate-disabled-package branch November 22, 2026 15:30
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/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants