Repository navigation
fix(runtime)!: callData refuses a disabled package's data at every relation hop and for a system context too - #36687
Conversation
📓 Docs Drift CheckThis PR changes 2 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 37 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 23703982396a1d81f6f72cbcedfc50f00da33872 && git checkout 23703982396a1d81f6f72cbcedfc50f00da33872
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c1e6cf75a757a7e9102bae608ddb020135619882 9198e1cd479993589423506030d28efa593f490c && git checkout -B drift-repro c1e6cf75a757a7e9102bae608ddb020135619882 && git merge --no-ff 9198e1cd479993589423506030d28efa593f490c
node scripts/docs-audit/affected-docs.mjs --json c1e6cf75a757a7e9102bae608ddb020135619882
|
…enforceApiExposure; system-context page row 48 names the package refusal
|
CI notes for this PR:
Generated by Claude Code |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: Head note. The review was asked at
① Derived judgmentsEvery hop, callData: yes. Every hop, stdio bridge: yes.
Bounded and cycle-safe: yes. Depth stops past System caller: exactly the ruling. The package question left the Stdio bridge system behaviour: unchanged, and it does not ask the package question. At this head the walk has no Should stdio match the ruling? Not in this PR. The ruling's words bind Doc sentence, row 48: true of the code. "The bypass covers exposure only: a disabled package's object is refused No-protocol host, addressed object: closed and measured. Clause-② line. The repo defines the value by one question: does the card widen the accepted set or enlarge the public surface ( Metadata-protocol line. DELIBERATE CORRECTION of Line 1, OLD: "Clause-②: no (narrowing: for a non-system caller, Line 2, OLD: "- TO: the call is refused Line 3, OLD: "The fix: re-enable the package to filter on its records again, or filter on the lookup's stored id. An environment with no disabled package sees no change. A system context (an in-process caller, such as a hook's Not consumed: the file is on ② Semver level
③ Boundary flags
④ Design judgmentThe change does what card #36393 items 1 to 3 and ruling 7077381587 ask, and no more. One walk per door, the same order as the protocol's twin, the protocol's own error, one predicate read per call. Using the engine registry for the predicate is the right fix for the no-protocol host: the refusal no longer depends on a service the host may not register. No must-fix, no should-fix. Notes:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读应用包停用之后,它的数据不能再通过「按关联条件统计」的方式被一点点问出来了。这条规则现在每一层关联都检查,系统身份调用也一样拒绝,与之前的裁决「系统身份也一律拒绝」一致。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读数据查询接口(callData)以前会让普通调用者通过「关联字段的条件」去筛选一个已停用的应用包里的数据,这次在每一层关联上都拒绝,和标准数据接口的行为一致。属于「收紧」:以前能执行的这类查询现在会返回「包已停用」的错误,所以按规则要 os-zhuang 在 GitHub 上批准后才能合并。 Narrowing hand-off · 2026-11-23T13:00Z: the merge queue's governed guard dequeued this pull because it declares |
Requested by Warren · project thread
Fixes #36393
Fixes #35526
Clause-②: yes (narrowing)
Metadata-protocol: none
Skills-docs: none — no skill or eval teaches a relation condition into a disabled package's object or a system context through
callData; the change refuses reads, and no key, value or metadata type an author writes moves维护者速读
What changes
packages/runtime/src/action-execution.ts(callData) andpackages/mcp/src/stdio-data-bridge.ts, their pin files, two changesets.refuseUnservedRelationTargetswalked the queried object's relation sites once. The engine lowers a condition beneath a condition up toRELATION_CONDITION_MAX_HOPS = 3relationships, soaggregate dp_alpha where { c_ref: { b2_ref: { secret_note: V } } }withdp_beta's package disabled still answered 1 / 0. It now descends each site's own condition against its target's field map, asking every target on the way, disabled package first and then exposure, with the full position asparam(where.c_ref.b2_ref). The order and depth backstop match the protocol's twin walk (refuseUnservedRelationTargetsIn). The same fix covers the exposure question past hop 1, which had the same gap since security(runtime):callData's engine fallback hands a caller'swheretoql.findafter judging only the addressed object, so a nested-relation condition skips the target's exposure ask (census row 10 of #22661) #22823.exposureGated = !isSystem. It is asked of every caller, for the addressed object and for every relation target. The exposure question for a system context is unchanged, and a pin holds that.callDatanow reads the engine registry'sisObjectPackageDisabledonce per call (packageDisabledPredicate, through@objectstack/core'sregistryObjectPackageDisabled) and refuses a disabled package's addressed object with the protocol's ownobjectPackageDisabledErrorbefore any exposure verdict. Measured before the fix: on a host with no protocol service,aggregate dp_betaandquery dp_betawere served to a member and to a system context. On a protocol host,aggregate dp_betawas served to a system context. The same predicate decides the relation targets, so the raw driver the MCP multi-env query fallback threads through (no registry) no longer decides it.enforceRelationTargetExposuredescends every hop the same way, askingenforceApiExposure(disabled package, then exposure) at each target with its full position. A system context is asked nothing, unchanged (the ruling bindscallData); the walk leaves that bypass toenforceApiExposureand adds noisSystemread of its own (check-system-context-census). The stdio system principal and no-protocol host are mcp stdio bridge: a system principal, and any caller on a host with no protocol service, is still served a disabled package's data (callData refuses both since #36687) #36689..changeset/35526-calldata-relation-disabled-package.mdhas not been consumed by a release (it is still onmain; the open version PR chore: version packages #35129 has not merged). In this PR, itsClause-②:line readsyes (narrowing…), its TO line is narrowed to "a condition directly beneath a lookup of the queried object", and its N5 sentence no longer glosses a system context as a hook'sctx.api.content/docs/permissions/system-context.mdxrow 48 (callData,refuseUnexposedDataAction) gains one sentence: the system bypass covers exposure only, and a disabled package's object is refused to a system context too, addressed or as a relation target at any hop.DELIBERATE CORRECTION:
.changeset/35526-calldata-relation-disabled-package.md. This PR makes that pending release note's system-caller sentence and its one-hop TO line incomplete, and the card asks for itsClause-②line to be corrected.check:empty-changesetis red on it locally by design; the seat confirms by its own record.Why
A disabled package's records are off the data plane: the protocol's data route answers
404 OBJECT_PACKAGE_DISABLEDfor its objects and for a relation condition into them, at every hop and for every caller.callData's engine arms gave a second answer to the same question.Declaration note.
Clause-②: yes (narrowing), as the seat's claim declares (7099212652). The change narrows a published door (callData, the MCP stdio bridge); it adds or removes no export. The narrowing is BREAKING and gets a narrowing-face L2 at the contract-review tier.Who changes: hosts that hand
callDataa system context (HttpDispatcher.handleMcp/buildMcpBridge,dispatchAction). No door in this repository does that, andctx.apinever passes throughcallData(ruling analysis on #35526).Verification
At head
9198e1cd47(the code atd6f70d698cplus the stdio walk's droppedisSystemreturn, behaviour-equivalent, and the row-48 sentence):packages/runtime/src/action-execution-calldata-relation-disabled-package-35526.test.ts(realObjectQL+SqlDriverin-memory SQLite + the real protocol): 46 passed. Withaction-execution.tsreverted toorigin/main6a73185: 23 failed | 23 passed. The red ones are the two-hop member and system pins on both hosts,$or/$not, two-hop exposure, the order pins, the flipped SYSTEM one-hop pins, and the addressed-object pins (no-protocol host for both callers, the protocol host for system).packages/mcp/src/stdio-data-bridge.relation-condition-target-exposure.test.ts: 41 passed at9198e1cd47. Withstdio-data-bridge.tsreverted: 10 failed | 31 passed (two-hop exposure direct /$or/$not, two-hop disabled package, order; forqueryandaggregate).$or/$not(N4) are pinned.@objectstack/runtimefull local suite (atd6f70d698c; runtime source unchanged since): Test Files 644 passed (644), Tests 13316 passed | 25 skipped.@objectstack/mcpfull suite (atd6f70d698c): 83 files, 1481 tests passed.9198e1cd47, under the verify lock (pnpm --workspace-concurrency=2 --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test):VERDICT command-exit 0, held the lock 36m18s on a shared box; Test Files 487 passed | 3 skipped (490); Tests 4121 passed | 68 skipped (4189).pnpm --filter @objectstack/runtime --filter @objectstack/mcp typecheck: exit 0.eslinton the changed source and test files: exit 0.check-system-context-censusexit 0 at9198e1cd47(red ataf5e5f8e10: the walk's ownisSystemread had no row).check:adr-0087-registrationexit 0,check:changeset-fixedexit 0,check-changeset-no-majorno major.check:empty-changesetred on the DELIBERATE CORRECTION above, as expected.overlap-check --branch=claude/project-thread-rhdqay: merges cleanly againstorigin/main. Its only PR overlap is chore: version packages #35129 (chore: version packages, the Changesets bot PR, which deletes pending changesets on every regeneration). With that PR excluded:VERDICT clean exit 0.9198e1cd47: every run success or skipped, except Check Changeset (red only on the declared DELIBERATE CORRECTION). Test Core 10/10, Lint & Repo Gates, TypeScript Type Check, Build Core, Build Docs, Live E2E UI, PR-body guards, Governed Surface Queue Guard: success.dispatch-gates --commandsfull derived list (left to the seat's L1).Acceptance notes
callDataonly.wherein object form, as before. The array (FilterAST) form is not lowered here first, unlike the protocol's twin walk. An aggregation's ownfilteris not walked either, because the engine lowers relation conditions inwhereonly.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses (eslint on changed files).main, one pull request. (two cards ruled as one change)packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbYSL1X4Mj36e8WtU7H