Repository navigation
fix(runtime)!: callData's aggregate arm refuses a relation condition on a disabled package's object - #36337
Conversation
…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>
Claude-Session: https://claude.ai/code/session_01FEkQ5miLqNucRZevceHwNh Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 35 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 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 |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract-review-claim: session_01QsR2jTeURPvEm465RcoYEC · head f26f20f · 2026-11-22T09:18Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: PR #36337, card #35526 (member-caller half, Findings: 0 must-fix, 2 should-fix (S1, S2), 5 nits. Three escalations (E1 to E3). ① Derived judgmentsEvery answer the diff moves, and every one it leaves:
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
③ Boundary flags
④ Design judgment
Nits (no effect on correctness or the contract):
Escalations:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: 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 S1: closed — carried by #36393, non-blocking per 7077187908 No must-fix is open. No should-fix is open. ① Derived judgmentsUnchanged 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 ② Semver levelUnchanged: S2 (the
Until that commit lands, the PR body and the changeset body on this head disagree on the value ( ③ Boundary flagsUnchanged 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 ④ Design judgmentUnchanged 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: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Landing (seat 7, 2026-11-22T09:42Z): head |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Seat record (2026-11-22T13:47Z) on head 维护者速读
席位核对ACCEPT · Tier H (a declared narrowing:
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Same-head re-render on PR #36337, card #35526 ( 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 judgmentsRe-read at the head, every answer the diff moves is right at the hop it asks:
S1 (the refusal is asked one hop deep while the engine serves three; read, not measured) still reads true at the head: ② Semver level
S2 (the
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
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: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Tier H hand-off (2026-11-22T13:53Z): this PR declares a narrowing ( |
Requested by Steedos · project thread
Part of #35526
Clause-②: yes (narrowing: for a non-system caller,
callData'saggregatearm and itsqueryfallback on a host with no protocol service refuse a nested-relation condition whose target belongs to a disabled package with 404OBJECT_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.mdxsays a disabled module is refused on the data plane with404 OBJECT_PACKAGE_DISABLEDand that in-processctx.apiis not refused; this PR makes the/mcpaggregate door match that text and leaves the system context as it is维护者速读
What changes
packages/runtime/src/action-execution.tsrefuseUnservedRelationTargets(used bycallData'saggregatearm and by thequeryfallback on a host with no protocol service) asks, per nested-relation condition site and before the exposure check, the engine registry'sisObjectPackageDisabledthroughregistryObjectPackageDisabled(@objectstack/core, the accessor already documented as "the predicate the data plane asks"). A disabled target throws the protocol's ownobjectPackageDisabledError(target)withparam: where.FIELD: the same code, status, sentence andobjectthe 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-protocolexportsobjectPackageDisabledErrorfrom its root, besiderecordNotFoundError(exported for the samecallDatafallback reason). Additive, enabling-only: no behaviour of that package changes. This is a new published export; see Acceptance notes.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'sctx.apiis a system context); the docblock names it and a pin holds today's answer.packages/mcp/src/stdio-data-bridge.tsenforceRelationTargetExposure): measured, not changed. With a protocol it already refuses a non-system caller 404OBJECT_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 realObjectQLoverSqlDriver(in-memory SQLite), the realObjectStackProtocolImplementationwhere the host has one, packages A/B/C,dp_alpha.b_refinto B'sdp_beta,dp_alpha.c_refinto C'sdp_gamma.where { b_ref: { secret_note: VALUE } }refused404 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.dp_gammais served (1 / 0) while B is disabled.Full dogfood battery (owed once at the final head for the narrowing arm), run at
f26f20f54eby seat 7 under the shared verify lock (pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test, noOS_TEST_SHARD, no path): lockVERDICT 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 isTest timed out in 5000mson a shared box (the hold ran 1h42m beside other sessions' unlocked work), and none of the six files reachescallData'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 onedisabledhit 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'sDogfood Regression Gateruns the battery in the merge queue.Acceptance notes
objectPackageDisabledErroris 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 samecallDatafallback. Flagged for the reviewer because a published export is contract surface.callDataserves 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 handcallDataa raw driver with no registry, where the predicate answers "not disabled" (a registry that cannot answer disables nothing, as on the data route).where { b_ref: { secret_note: VALUE } }): non-system + protocol: aggregate and query refused 404OBJECT_PACKAGE_DISABLEDfor both values; non-system, no protocol: served 1 / 0; system, either host: served 1 / 0.overlap-checkbefore 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 intomain(c448c61, hunks near L204, L3442-3794, L4676, disjoint from this PR's L340 and the two call sites).overlap-checkagainstorigin/mained33f8a: merges cleanly. The head was not re-merged withmain: 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(vitestrepoproject) is CI's (Test Core); this diff touches none of its files.Verification
Read first, by risk:
packages/runtime/src/action-execution.ts, the hunk inrefuseUnservedRelationTargets: the predicate is read from the engine passed in (qlon the fallback,engineon the aggregate arm).packages/metadata-protocol/src/index.ts: the one added export line.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
f26f20f54eunless 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.scripts/ablation-replace.mjs, anchorif (isObjectPackageDisabled(site.target)) {replaced byif (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 HEADempty. The runtime test imports./action-execution.jsfrom 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 toSqlDriver; 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-debtgreen in its own locked run). Earlier runs caughtcheck:driver-memory-censusandcheck: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 --commandsderived 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-testfirst exited 3 (shallow clone could not reach its pinned fixture commit; fetched it) and then 0;check:dts-closurefirst 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) andcheck:type-check-debt(its nested locked closure build queue-timed out).--ranreconciliation: 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 Gatessuccess,TypeScript Type Checksuccess,Type Check · debt ledgersuccess,Test Coresuccess (10/10 shards),Build Coresuccess,Governed Surface Queue Guardsuccess,Test UIsuccess,Live E2E UIsuccess,Dogfood Regression Gatesuccess (PR run; its shards run in the queue),Check Changesetsuccess;Lint UI,Type Check UI,Build & E2E UIskipped (no ui path).🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTeURPvEm465RcoYEC