Repository navigation
feat(mcp): query_records and get_record name the fields field-level security withheld from the caller - #35179
Conversation
…ecurity withheld from the caller Only a field the caller's served schema shows is named; both halves are the framework's own answers, asked as the caller. Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
…ved schema shows the field Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
…te-response tripwires Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 1 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 37799ebb962a5853fb7e1f1d188adb5a71dff7be && git checkout 37799ebb962a5853fb7e1f1d188adb5a71dff7be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1caee8cbd363e06692317cabd3c5746ba0b976be ce2f6fefa12d4fb2a846af796fdf71d03b2b672d && git checkout -B drift-repro 1caee8cbd363e06692317cabd3c5746ba0b976be && git merge --no-ff ce2f6fefa12d4fb2a846af796fdf71d03b2b672d
node scripts/docs-audit/affected-docs.mjs --json 1caee8cbd363e06692317cabd3c5746ba0b976be
|
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Final green head · 2026-11-18T11:26Z: |
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Contract-review-claim: session_01JQwxbWDsbbJizuYnDwBxT8 · head |
|
repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud 席位核对L1 full · ACCEPT · Head-sha: Net diff against merge base Against the card
Read at the head
Declarations, CI, merge
Nits (none blocks)
Not mine, still owed before landing
|
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Contract reviewServed-tier: Read: card #35137 (body, triage 6971739882 / 6974332801 / 6974554954, claim 6974815741, dev report 6976419490), PR #35179 (body, 9-file list, net diff against merge base ① Derived judgments
S1 (should-fix) — the served-schema half is not computed exactly as N1 (nit) — the N2 (nit) — on N3 (nit) — ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…m the same projection describe_object serves Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8
|
repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud 席位核对L1 delta · REWORK (one red test on the merge ref) · Head-sha: I read the delta only, from Must fix
The delta, read
Should fix before landing (card hygiene, not this diff)
Not mine, still owed
|
…cords page shape Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
…thheld-fields # Conflicts: # packages/mcp/src/mcp-http-tools.ts
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Head for delta review · 2026-11-18T14:58Z: |
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Contract-review-claim: session_01JQwxbWDsbbJizuYnDwBxT8 · head |
|
repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud 席位核对L1 delta · ACCEPT · Head-sha: What the delta changesThe delta is two merges of main and one test commit. I compared the PR's net diff against its own merge base at both heads (
Read at the head
Still owed before landing (not mine)
|
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Contract reviewServed-tier: Delta from ① Derived judgmentsS1: closed. Both doors now take the served list from
No must-fix, no should-fix. ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8 Landing · 2026-11-18T15:03Z · head
Status: ready + auto-merge. |
…totalGroups, #35179 withheld fields) into the aggregate order and cut Three adjacent-insertion conflicts, each resolved keeping both sides: the McpDataBridge members aggregateGroups and #35198's userTextLocales (the interface in mcp-http-tools.ts and the runtime HTTP bridge in domains/mcp.ts), and both members in the write-response tripwire roster. #35179's withheld-field naming applies to query_records and get_record only and merged without conflict; #35201 touches service-analytics only. Claude-Session: https://claude.ai/code/session_01JQwxbWDsbbJizuYnDwBxT8 Co-authored-by: Claude <noreply@anthropic.com>
…und counts every kind (objectstack-ai#36065) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D7UBkcmf1Qy7iEMxarYt8wU)_ Fixes objectstack-ai#35113 Fixes objectstack-ai#35098 Clause-②: yes (widening) — new optional card key `askKind` on `QuestionSchema` and `DatasetQuestionSchema`; new exports `ASK_KINDS`, `AskKind`, `AskKindSchema`, `questionTurnKind`, `checkAskKinds`, `askTurns`, `askKindCounts` and `AskTurn` (package root); `kindTally`, `kindCell` and `KindTally` (`./runner`); new optional fields `QuestionResult.askKind`, `DatasetQuestionResult.askKind` and `HalfScores.kinds` (`./runner`) Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;开源评测里两张问数场景卡(订单到回款、差旅报销)的每道题都标明了题型,每轮问数评测的记录按十种题型分别计数,另外差旅报销卡的建应用说明写清了第二步由哪位财务审批。 - 为什么做:「MCP 二期与问数」专项要求开源卡覆盖托管问数集的十种题型,让问数退化当天在开源仓、零成本被发现;差旅卡那句话含糊,让部分构建把第二步审批派给了财务经理。 - 出错会怎样:只影响评测卡的打分与评测报告,不碰产品代码,可直接撤回;两张卡的指纹变了,评测日序列在此处分段。 - 要你做什么:无 ## What changes **Card one: the ten ask kinds.** Each question and dataset question of the two open dataset cards (`order_to_cash`, `travel_expense`) now names its ask kind (`askKind`), one of the ten kinds the hosted ask set asks: `count`, `group_sum`, `top_n`, `time_range`, `join`, `owner_latest`, `business_term`, `ambiguous`, `forbidden`, `unanswerable` (D6 = A on objectstack-ai#34659: the kinds, never the hosted fixture; no hosted question is copied). - Premise reading: the card counted only the five dataset questions per card. The ten ordinary questions per card already ask the figure kinds, the `forbidden` leak reading as a member persona, and `unanswerable`. Counted per turn (a question once per persona it lists, as the runner asks it), the two cards already ask every kind at least twice. So no question is added: the change names the kinds, holds them to the cards, and makes a round report them. Adding figure questions also risks the near-miss trap objectstack-ai#35544 hit (a lifted word that near-misses a dataset measure). - Per turn, `forbidden` is read off the card: a turn asked as a persona whose truth is `withheld` is a `forbidden` ask whatever kind the question names. - The loader (`checkAskKinds`, `packages/qa/scenarios/src/ask-kinds.ts`) refuses a kind its question contradicts, at `askKind`: `top_n` needs a `topN` truth, `time_range` an `in_window` filter, `join` a relation path, `group_sum` a `groupBy`, `count` none, `owner_latest` a `groupBy` ending on a person field (a declared lookup to an object a persona's `record` names, such as `employee`, or a declared user-handle field), `business_term` exactly the `metric_selected` dataset questions, `ambiguous` exactly the `asked_back` ones, `unanswerable` exactly the `unanswerable` truths, and a declared `forbidden` only on a question withheld from every persona it lists. A card that names one kind names the kind of every question and dataset question, all or none. A card that names no kind loads as it did before kinds existed, with dataset questions or without, so no card the released loader accepted is refused. - The runner stamps each turn's kind on its result (`askKind` on every question and dataset-question result). The scorecard counts the asks kind by kind (`HalfScores.kinds`) and adds `Run · kinds` / `Iterate · Run · kinds`, all ten kinds in order, a kind not asked shown as `0 asked`. `summary` sums the row. A card that names no kind, and an older record, show no row. - `docs/qa/scenarios/README.md` gains an "Ask kinds" section: the ten kinds with the rule each is held to, and the per-card count table (no kind at zero). A test holds the cards to the table's figures. It keeps them as a literal, because reading the README from the package's tests would be an undeclared cross-package input (`check:cross-package-test-inputs`). | Kind | `order_to_cash` | `travel_expense` | Total | |:---|---:|---:|---:| | `count` | 3 | 3 | 6 | | `group_sum` | 2 | 3 | 5 | | `top_n` | 1 | 1 | 2 | | `time_range` | 1 | 1 | 2 | | `join` | 2 | 2 | 4 | | `owner_latest` | 2 | 1 | 3 | | `business_term` | 2 | 2 | 4 | | `ambiguous` | 2 | 2 | 4 | | `forbidden` | 1 | 2 | 3 | | `unanswerable` | 1 | 1 | 2 | **Card two (folded in): the step-2 approver in the `travel_expense` prose.** The detailed prompt said "the department manager first (a manager's own claim goes to the finance manager), then Finance". Finance has two members, and the same sentence names one of them the finance manager, so builds could route step 2 to that manager (e14). Every seeded step-2 row and the persona name the Finance officer (e13). The prose now reads "then a Finance officer (Finance staff other than the finance manager)", and the Chinese text says the same. The expected approver, the seed rows, the `$comment` and the `manager_approves_step_one` operation are unchanged. This follows the reading on that card (comment 7061940514, option B), in its own commit. ## Tests - New top-level describes in the existing harnesses: - `test/dataset-cards.test.ts`: every question of both cards names a kind; across the cards no kind is asked fewer than twice; `department_budgets` is `forbidden` as `employee` and `group_sum` as `dept_manager`; each card's per-kind count equals the README table's figures; 18 refusal cases, each at its `askKind` path, including `owner_latest` on a status (`orders_by_status`) and on a product category across a lookup (`booked_by_category`); `owner_latest` across a lookup to a person (`overdue_by_owner`, `account.owner`) loads; a declared `forbidden` withheld from every listed persona loads; a card without dataset questions may name no kinds; a card with dataset questions that names no kind loads (the released card shape). The two missing-kind refusal cases aim at a card that names exactly one kind: a question left without one when only a dataset question names one, and a dataset question left without one when only a question names one. - `test/runner/orchestrate.test.ts`: the offline ask round below; the `Run · kinds` row and the record's tally on a hand-built half; a card that names no kinds has no kinds tally and no row. <details><summary>Package suite, typecheck (head 580727e)</summary> - `pnpm --filter @objectstack/scenarios typecheck && pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2` under the verify lock at 580727e: `VERDICT command-exit 0`, Test Files 40 passed (40), Tests 1236 passed (1236). The same command, after a package build, at 1748bfc: 40/40, 1236/1236. - Dependency closure first: `pnpm --workspace-concurrency=2 --filter '@objectstack/scenarios^...' build`, `VERDICT command-exit 0`. </details> <details><summary>Contract fix round at a6052bd (F1 of contract record 7063179133, fix (a); S1 stays fixed)</summary> - `checkAskKinds` now sets `required` from the card's own declarations: true when any question or dataset question names an `askKind`. Before, it was `card.run.datasetQuestions !== undefined`, which refused a released card with dataset questions and no kinds. The dataset-question branch now refuses a missing kind only when `required` holds, as the question branch already did. The loader message reads "a card that names one ask kind names the kind of every question it asks". `groupsByPerson` stays module-private (cf467bf). - Texts aligned with the rule: the loader message, the `askKind` TSDoc on `QuestionSchema` and `DatasetQuestionSchema`, the card README row 4, the "Ask kinds" opening sentence and the sentence under its table, the package README bullet, and the 35113 changeset sentence. - Tests: the dependency closure built (`VERDICT command-exit 0`), then `pnpm --filter @objectstack/scenarios build && … typecheck && … exec vitest run --maxWorkers=2` under the verify lock at a6052bd: `VERDICT command-exit 0`, Test Files 40 passed (40), Tests 1240 passed (1240). - Ablation 1, `required` set to `false` through `scripts/ablation-replace.mjs`: mutation landed (anchor 1 to 0, blob e4ae344 to 8622ef5f5761). `test/dataset-cards.test.ts`: 2 failed, 48 passed. The 2 are the re-aimed missing-kind cases. Restored, blob equal to HEAD, `git diff HEAD` empty. - Ablation 2, `required` set back to the old rule (`card.run.datasetQuestions !== undefined`): mutation landed (blob e4ae344 to e1ddde9972e2); 1 failed, 49 passed. The 1 is the new case for a card with dataset questions and no kind. Restored, blob equal to HEAD, `git diff HEAD` empty. - The subject resolves to `src/` (the suite imports `../src/index.js`), so no rebuild was needed between the legs. - Gates at a6052bd: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 70 families (merge base 8145424). Each ran once, with its exit code captured before any pipe: 68 exited 0. `node scripts/check-plugin-teardown-shape.mjs --self-test` and `pnpm check:dual-build-cjs-loads` exited 3 (a shallow clone, and no full build), as in the earlier round. Both are NOT MEASURED locally and run in CI. `dispatch-gates --ran` (with exit codes): 70 derived, 68 run, 2 NOT-MEASURED, 0 UNRUN. - `node scripts/pm/overlap-check.mjs --branch=HEAD` before the push: VERDICT clean. It merges cleanly with origin/main (30b0987) and with objectstack-ai#36092, which shares the package README. </details> <details><summary>Ablations (each restored, blob equal to HEAD, git diff HEAD empty)</summary> - `node scripts/ablation-replace.mjs --file packages/qa/scenarios/src/loader.ts --anchor ' checkAskKinds(card, personaTruths, refuse);' --delete -- … vitest run test/dataset-cards.test.ts`: mutation landed (anchor 1 to 0, blob 4a0967e to bd8e244d0a16); 15 failed, 31 passed. The 15 are the refusal cases the check owns. The closed-set case stays green, as it should, because the schema refuses it. - `ask-kinds.ts`, the per-turn `forbidden` reading replaced by the declared kind: mutation landed (blob 6fe408d to 46cad08937e0); 4 failed (the offline round, no kind under two, the per-turn `forbidden` case, the README table). - `ask-kinds.ts`, the `owner_latest` person check reduced to "any `groupBy`" (head 436ed39): mutation landed (blob 7da9b01 to 9e6a2cf23b43); 2 failed, 47 passed, the two non-person `owner_latest` cases. The first attempt used a replacement that is a substring of the anchor. The tool refused it before running anything because the count did not rise, so that attempt measured nothing. It was redone with a distinct replacement. - The subject resolves to `src/`: the suites import `../src/…`, not a built `dist/`, so no rebuild was needed between the legs. </details> <details><summary>Gates</summary> - `node scripts/pm/dispatch-gates.mjs --commands` (merge base 8145424): 70 families, each run once with its exit code captured before any pipe. 67 exited 0. - `pnpm check:cross-package-test-inputs` exited 1 on the first pass. The test read the card README from outside the package. The test now holds a literal instead, and the rerun at 580727e exits 0. - `node scripts/check-plugin-teardown-shape.mjs --self-test` exits 3, because its fixture is pinned to a commit this shallow clone cannot reach. `pnpm check:dual-build-cjs-loads` exits 3, because it reads every package's build. Both are NOT MEASURED locally and run in CI. - Rerun at 580727e after the test-only commit: `check:test-source-alias`, `check:type-check-coverage`, `check:type-check-debt`, `check:issue-citations`, `check:nul-bytes`, `check:doc-authoring` and `check:closed-ceremony-text` all exit 0. The derived list is unchanged. - `dispatch-gates --ran`: 70 derived, 68 run, 2 NOT-MEASURED (exit 3), 0 UNRUN. - `node scripts/pm/overlap-check.mjs --branch=HEAD`: VERDICT clean. It merges cleanly with origin/main and with objectstack-ai#35886, which shares the package README. - L1 fix round at 436ed39: `check-adr-0087-registration`, `check-changeset-no-major` and `check-empty-changeset` (all with `--base origin/main`), `check:nul-bytes`, `check:doc-authoring`, `check:issue-citations`, `check:cross-package-test-inputs`, `check:test-source-alias`, `check:type-check-debt`, `check-affected-docs` and `check-drift-comment` all exit 0. `overlap-check`: VERDICT clean, merging cleanly with origin/main, objectstack-ai#36077 and objectstack-ai#36066. - L1 fix round tests at 436ed39: the dependency closure was built, then `pnpm --filter @objectstack/scenarios typecheck && … vitest run test/dataset-cards.test.ts test/runner/orchestrate.test.ts` gave `VERDICT command-exit 0`, Test Files 2 passed (2), Tests 213 passed (213). </details> ## Acceptance notes - **Done-when, the round:** no live model round ran in this container. The live driver needs a permission mode other than Auto (packages README, "Permission mode"). The offline path ran instead: `runHalf` over each dataset card on the in-memory app, with a driver that answers questions from the computed truth and dataset questions with no route. Every turn's result carries its kind. `kindTally` matches the README counts, and `Run · kinds` names all ten kinds with a measured count on each card. The first live round on the verified build will show the row. - **The FLS "not visible to you" question (comments 6971648229 and 6979780844):** objectstack-ai#35179 shipped the framework half. `query_records` / `get_record` now name the withheld field for a caller served the whole schema (ADR-0106 D4) or on a deployment with masking off (D8). The open runner's personas are plain members (`create-user` with `role: 'user'`) on a default `objectstack dev` host, so the ruled caller cannot be asked on the open cards today. The existing `withheld` grader already passes "not visible to you" and fails "blank". What is missing is the caller: a schema-exempt persona, or a recorded masking-off round. That runner choice is not in this PR; the seat routes it as its own card. The README says no open card asks it yet. The `forbidden` turns here are the member leak reading under default masking. - `docs/qa/scenarios/builds/travel_expense.provenance.json` records the card's new sha256 (`abe91b8f…` to `29162eef…`), following objectstack-ai#35764. The build file is unchanged. - The verified build `builds/travel_expense.json` was authored against the pre-objectstack-ai#35098 prompt, which said "then Finance". Ask rounds install that build and do not re-author it, so the prose change reaches only scratch and door builds. - Ask-round records split at both cards' new hashes (`summary` refuses to mix card hashes). ## Verification - Read first: `packages/qa/scenarios/src/ask-kinds.ts` (`questionKindProblem`, `questionTurnKind`), then `kindTally` / `kindCell` in `packages/qa/scenarios/src/runner/scorecard.ts`, then the two cards' `askKind` lines. - Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run test/dataset-cards.test.ts -t kind`. Expect 31 passed, 19 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cypybwgoxE3ZMZy8kt <!-- signed: repo:objectstack#4 · os-project-manager · session_01FEkQ5pb2t8Z8C64PkPyVt1 --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #35137
Clause-②: yes (widening)
Metadata-protocol: none
Security-touching: yes
The card's two remaining halves have their own carriers: the ask-data skill line is carried by #35191, and the example-app scenario question by #35113. This PR is the framework half, built on the maintainer's ruling A recorded on the card (comment 6977609191): keep the bound.
维护者速读
query_records与get_record在调用者有字段被字段级安全挡掉、而该字段又在调用者自己的 schema 里可见时,结果里多带withheldFields(只给字段名,不给值)和一句固定说明;HTTP 与 stdio 两个入口一致。本轮:「调用者 schema 里有哪些字段」这一半改为直接取describe_object返回给该调用者的那份字段列表。withheldFieldNames的求交一行和本轮的同源字段列表共同守住,各有消融证明;回滚即 revert 本 PR。packages/runtime/src/domains/mcp.ts的describeForCaller与fieldVisibilityOf;packages/mcp/src/stdio-data-bridge.ts的describeForPrincipal与fieldVisibilityOf;packages/mcp/src/mcp-http-tools.ts的withheldFieldNames(served.has一行)。pnpm --filter @objectstack/mcp exec vitest run src/query-records-withheld-fields.test.ts,预期 12 个用例全绿。What changes
McpDataBridgegains an optional member,fieldVisibilityOf(object), answering two framework answers asked as the caller: the field names the caller's own served schema shows, and the security service's readable answer for them (getReadableFields). Both bridges implement it.describe_objectserves. Each door'sdescribe_objectanswer is built by one local function (describeForCalleron the HTTP bridge inpackages/runtime/src/domains/mcp.ts,describeForPrincipalon the stdio bridge inpackages/mcp/src/stdio-data-bridge.ts), andfieldVisibilityOfreads its field names off that answer (describedFieldNames), so any later filter on whatdescribe_objectlists applies towithheldFieldstoo.packages/mcp/src/mcp-http-tools.ts) names a field as withheld only when the served schema shows it and the readable answer leaves it out; withfieldsin the call only asked fields are candidates. When the list is non-empty, the result carrieswithheldFieldsandwithheldFieldsNote(one constant sentence,WITHHELD_FIELDS_NOTE). When it is empty, nothing is added. A missing member, anundefinedanswer or a throw adds nothing and never fails the read.query_recordsandget_recorddescriptions gain one sentence about the member.aggregate_recordsis unchanged: measured on the real security layer, a withheld field asked as a measure or a group is already refused403 PERMISSION_DENIED(see Verification).getReadableFieldsis the caller-scoped answer).Tests
packages/mcp/src/query-records-withheld-fields.test.ts(new): the tool layer over the HTTP runtime, and the stdio bridge behind the real tools. Pins: a withheld field named with the note; a field the served schema does not show never named anywhere in the serialized result, even when asked for infields; a readable field with an empty value not named; only asked fields named; nothing withheld means no member and a byte-identical answer; a bridge that cannot answer or throws names nothing; the member beside a delegation narrowing. On stdio: a D4-exempt caller is told; a member under default masking whose schema hides the field never sees it named; with masking off (D8) the member is told; no security service means no member; and (round 2) the served list followsdescribe_object's field names on an object where the two could differ.packages/runtime/src/domains/mcp-object-schema-mask.test.ts, on the real security layer (SecurityPluginoverObjectQL+SqlDriver): the D4-exempt author's served list equalsdescribe_object's field names and the denied field is withheld; the member under default masking is answered nothing; (round 2) with masking off the member's served list equalsdescribe_object's field names and the denied field is withheld; an unrestricted member is withheld nothing and no security service answers nothing. And (round 2), on the real engine, the pin "served equalsdescribe_object's field names" extended to an object where the two could differ.Choice stated: a caller with nothing withheld gets no member (not an empty list), so its result is unchanged.
Acceptance notes
get_recordkeeps the two members on the record object, beside its field keys (contract review N2, judged and left): moving them beside the record would mean wrapping it (for example arecordkey) only when something is withheld, so where the record sits in the answer would change with the caller's field security, a shape split every client would have to branch on. The existing precedent for a notice on these tools (the delegation narrowing) also adds keys on the answer object. No collision is possible: field machine names are snake_case, these members camelCase.WITHHELD_FIELDS_NOTE,packages/mcp/src/mcp-http-tools.ts) so a shared result-sentence locale picker can adopt it later; this PR adds no picker and does not touchtruncated.Verification
Readings for this round at head
ce2f6fefa12: this branch merged withorigin/mainat1caee8cbd36(which includes #35199,query_recordslatestPer). Earlier rounds' readings (base55020c331b) are kept below where nothing in this round touched them.This round: main merged, the stdio control re-pinned
query_recordsnow reads a probe row past the page, and on the stdio door a page read with a limit is counted byengine.count. The stdio CONTROL pin's engine fixture has nocount, so main serves that page as{ object, records, hasMore: false }with nototal. The pin atpackages/mcp/src/query-records-withheld-fields.test.tsnow expects exactly that shape; its point is unchanged: nowithheldFieldsmember, no note, and the readable answer asked as the principal.packages/runtime/src/domains/mcp-object-schema-mask.test.tswere checked for the same drift on the merged tree: none (results below).packages/mcp/src/mcp-http-tools.ts, thequery_recordsdescription only: both halves kept, the latestPer sentences followed byWITHHELD_FIELDS_DESCRIPTION. The handler auto-merged with both behaviours: the latestPer branch and the probed page both feedwithWithheldFields.Tests (head ce2f6fe)
pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2(whole package, under the verify lock):VERDICT command-exit 0, Test Files 74 passed (74), Tests 1315 passed (1315).pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/mcp(all 8domains/mcp*suites,mcp-object-schema-mask.test.tsamong them):VERDICT command-exit 0, Test Files 8 passed (8), Tests 289 passed (289).pnpm --filter @objectstack/mcp --filter @objectstack/runtime run typecheck:VERDICT command-exit 0; bothcheck:test-typecheck: OK.9c29d732a19): the withheld-fields file read 1 failed / 11 passed, the failing one being the stdio CONTROL (expectedtotal: 1, receivedhasMore: false).Gates (head ce2f6fe)
node scripts/pm/dispatch-gates.mjs --commands: 69 families for this diff (merge base1caee8cbd), run in sequence; 67 exit 0 on the first pass.pnpm check:dts-closureexited 1 on that pass namingpackages/runtimeandpackages/services/service-automationdeclarations as missing; both were present minutes later (written 14:50) and the re-run exits 0 (81 built packages, 260/260 declaration files present).pnpm check:dual-build-cjs-loadsexits 3 (PREREQUISITE NOT MET: it reads every package's built output, only this diff's closure is built): NOT MEASURED locally, run by Lint & Repo Gates on this PR.node scripts/pm/dispatch-gates.mjs --ran: 69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN.node scripts/pm/check-governed-merges.mjs --branch HEAD: NOT governed, 631 changed lines.node scripts/pm/overlap-check.mjs --branch=HEAD: VERDICT overlap exit 1. origin/main1caee8cbd3merges cleanly; feat(mcp): aggregate_records names a lookup group's record beside its id, read as the caller #35202 and feat(mcp): a refused record read says what is not recorded, in the caller's language #35198 merge cleanly; feat(mcp): aggregate_records orders, cuts and counts groups in the database #35193 conflicts inpackages/mcp/src/stdio-data-bridge.tsandpackages/runtime/src/domains/mcp.ts(it also conflicts with main on two other paths, judged not this branch's). One of the two lands behind the other.ce2f6fefa12: 37 success, 16 skipped, 0 failed, among them Test Core (1/10 to 10/10), Lint & Repo Gates, TypeScript Type Check and Build Core all success.Ablation: the served list bypasses describe_object's answer (round 2)
node scripts/ablation-replace.mjs --file packages/runtime/src/domains/mcp.ts --anchor 'return { served: describedFieldNames(described), readable };' --replacement(the round-1 derivation of the served list)-- pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/mcp-object-schema-mask.test.ts: mutation landed (anchor 1 to 0, blob b28efe7b7b33 to d00af3f275cc); 1 failed / 79 passed, the failing one being the extended pin; restored (blob equals HEAD,git diff HEADempty).packages/mcp/src/stdio-data-bridge.ts, replaced the same way,-- pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/query-records-withheld-fields.test.ts: mutation landed (blob 949d972f50fe to 978cd2659f10); 1 failed / 11 passed, the failing one being the new stdio pin; restored (blob equals HEAD).Ablation: the schema intersection (round 1)
node scripts/ablation-replace.mjs --file packages/mcp/src/mcp-http-tools.ts --anchor ' if (!served.has(name)) continue;' --delete -- pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/query-records-withheld-fields.test.ts: mutation landed; 2 failed / 9 passed, the two failing being the tool-layer and the stdio "never named" pins; restored (blob equals HEAD,git diff HEADempty).aggregate_records: measured, already refused (round 1)
One-off probe on the real security layer (
SecurityPluginoverObjectQL+SqlDriver, the HTTP bridge), not committed: a field denied to the caller asked as asummeasure or as agroupBykey answersPERMISSION_DENIED/ 403 for both a member and a schema-exempt author; an unrestricted member is served. Soaggregate_recordsgains no member.Generated by Claude Code