Skip to content

feat(mcp): a refused record read says what is not recorded, in the caller's language - #35198

Merged
objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/issue-35138-not-recorded
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 9 commits into
mainfrom
claude/issue-35138-not-recorded

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Refs #35138 (item notRecorded)

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 改了什么:MCP 的 query_records / aggregate_records / get_record 被拒绝时,若调用点名的对象或字段在调用者自己的 schema 里不存在,拒绝旁边多出 notRecorded(点名的是哪个对象/字段,原样取自调用者的输入)和 ifNotRecorded(按调用者语言的一句话:告诉用户"这项数据没有记录",不要报 0);新增 @objectstack/core 的共享句子语言选择器,数据集工具改用它,行为不变。
  • 为什么改:托管侧实测模型拿到裸的 not-found 会绕着答(报 0 或拿别的字段凑),开源 MCP 门的客户端和每日问数轮次拿不到这条信号;本 PR 把它搬进框架。
  • 风险与回滚:原有拒绝(isError、code、message、status)字节不变,只在拒绝旁追加两个成员;两个成员只由"调用者发送的名字"和"调用者被服务的 schema"构成,不点名调用者看不到的任何东西。回滚即 revert 本 PR。
  • 先看:packages/mcp/src/mcp-http-tools.ts 的 notRecordedMembersOf / recordReadErrorResult(决定何时出现成员、成员由什么构成);packages/core/src/sentence-locale.ts(共享选择器);packages/services/service-analytics/src/dataset-next-step.ts(改用共享选择器)。
  • 两分钟验证:pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/mcp-not-recorded.test.ts,预期 14 个用例全绿,其中 CONTROL 用例断言"看不到的字段/对象"与"不存在的字段/对象"成员文本逐字节相同。
  • 需要你做的:无,席位落地。

What changes

  • notRecorded / ifNotRecorded on a refused record read. query_records, aggregate_records and get_record keep their coded refusal byte for byte and, where the call named an object or a field that the caller's served schema (describeObject, the describe_object answer) does not show, render { error, notRecorded, ifNotRecorded }:
    • notRecorded: { object } when the schema shows no such object; { object, fields } with the field names the call sent that the schema does not show, in the order sent (read from where through $and / $or / $nor / $not, a dotted key by its head, fields, orderBy, groupBy, each aggregation's field and filter);
    • ifNotRecorded: one sentence in the caller's language (en, zh-Hans, zh-Hant, ja), written in the executor (ADR-0149 M1: no wording in the spec).
  • The rule. The answer names only what the caller can see: both members are built from the names the caller sent and the caller's served schema, nothing else, with one wording for every case; nothing the schema shows is named or counted. A read that answers, a refusal about a field the schema shows, a server fault, and a refusal whose schema read throws carry no member. id, created_at, updated_at (answered on every object, PLATFORM_PROVISIONED_COLUMNS) are never named.
  • One sentence-locale picker in @objectstack/core: pickSentenceLocale(locales, written) and platformLocaleNamedBy(code), moved from service-analytics' dataset-next-step.ts. datasetToolSentenceLocale now wraps it; its pins are unchanged and green.
  • A locale member on both bridges: optional McpDataBridge.userTextLocales(). HTTP: userTextLocalesOf(ec), the ladder the dataset tools read on that door. stdio: the principal's ladder (what the dataset tools read there), then the i18n service's default. Absent or throwing: en.
  • Type stays local to packages/mcp (NotRecordedMembers); nothing enters packages/spec.

Tests

  • packages/mcp/src/mcp-not-recorded.test.ts (14): unknown object on all three tools; unknown field on query_records and aggregate_records; CONTROL: a field (and an object) the caller cannot see answers members byte-identical to one that does not exist, whatever refusal stands beside them; a readable existing field, id / created_at / updated_at, a successful read, a server fault and a failing schema read carry no member; zh / zh-Hant / ja / fallback / no-member / throwing locale; the stdio bridge's userTextLocales.
  • packages/runtime/src/domains/mcp-not-recorded.test.ts (5): over the real security layer (SecurityPlugin, ObjectQL, SqlDriver, protocol), the HTTP bridge's served schema shows neither a field the caller is denied nor an unknown field, describeObject answers null for an object the caller cannot read as for an unknown name, a read naming either is refused 4xx, CONTROL the staff reads both, and userTextLocales answers userTextLocalesOf(ec).
  • packages/core/src/sentence-locale.test.ts (2): whole-code and prefix lookup, next rung, en floor.
  • Existing pins adjusted: the tripwire's face roster and the stdio member roster gain userTextLocales; the HTTP twin in stdio-data-bridge.not-found.test.ts now serves task (as the stdio side does), so the PARITY pin still compares like with like.
Package runs (head e4c3aa0, then the merge of origin/main at ee70211)
  • @objectstack/mcp typecheck (incl. check:test-typecheck) exit 0; vitest run: 72 files / 1285 tests passed at e4c3aa0, 73 files / 1306 tests passed at ee70211.
  • @objectstack/core + @objectstack/service-analytics vitest run: 161 files / 3734 tests and 218 files / 5592 passed, 335 skipped; typecheck exit 0 for both.
  • @objectstack/runtime typecheck exit 0; vitest run: 627 files / 12969 passed, 25 skipped (e4c3aa0 tree before the member move; src/domains/mcp* re-run at ee70211: 9 files / 289 passed).
Ablations (each through scripts/ablation-replace.mjs: anchor hit once, blob changed, restored to the HEAD blob with an empty git diff HEAD)
Mutation Pin Result
members never computed object + field + CONTROL + locale 9 failed
sent field names never compared field pins + CONTROL 3 failed / 14
members made to depend on the refusal's code CONTROL 2 failed / 14
served fields not read readable-field pin 3 failed / 14
always-answered columns dropped readable-field pin 3 failed / 14
sentence always en zh pin 1 failed / 14
dataset picker narrowed to en service-analytics nextStep / sourceLine locale pins 8 failed
core picker without prefix lookup core pin 1 failed / 2 (the first run stayed green: every code in the test was named whole by the table; prefix-only codes added, then red)
HTTP bridge locale member empty runtime locale pin 1 failed / 5
stdio i18n-default rung dropped stdio pin 1 failed / 14

Acceptance notes

  • The members are decided by the names sent and the caller's served schema alone, never by the refusal beside them; a server fault (5xx) carries none.
  • ifNotRecorded is not described in the three tool descriptions; the sentence states its own instruction. The card's ask cards (#35113) are outside this PR's file surface.
  • aggregate_records reads the served object a second way for option order and currency (servedFieldsOf, landed in this card's PR 2, through servedObjectDefinitionOf); this PR reads describeObject, which tells an unserved object (null) from one it cannot read and leaves the search companion out, which that helper does not.
  • pnpm check:dual-build-cjs-loads locally: PREREQUISITE NOT MET (needs a full workspace build); CI runs it.

Verification

Derived gate families (dispatch-gates --commands, head e4c3aa0)

76 derived, 75 exit 0, 1 NOT MEASURED (pnpm check:dual-build-cjs-loads, exit 3, no full build). dispatch-gates --ran: 76 accounted, 75 run, 1 NOT-MEASURED. After merging origin/main (ee70211) re-run: check:type-check-coverage, check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:doc-authoring, check:issue-citations, check:test-source-alias, check:cross-package-test-inputs, check:published-files all exit 0; check:type-check-debt hit the local 300 s timeout (exit 124, NOT MEASURED there; exit 0 at e4c3aa0). overlap-check.mjs before each push.


Generated by Claude Code

…s not recorded, in the caller's locale

A refused query_records, aggregate_records or get_record keeps its coded
refusal and carries notRecorded and ifNotRecorded beside it when the
object, or a field the call named, is not in the caller's served schema.
One shared sentence-locale picker in @objectstack/core, used by the
dataset tools and the record tools.

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
… HTTP bridge's schema and locale answers, and the shared picker

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
…on the HTTP not-found twin; add the changeset

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
…te on both faces

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
…e does not name whole

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

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 4 package(s): @objectstack/core, @objectstack/mcp, @objectstack/runtime, @objectstack/service-analytics, touching 28 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/core/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.

18 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 756aba29a02c22c23d3a19a57b4f34046c3a2f26.

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

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/core/src/index.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 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 — 68 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 756aba29a02c22c23d3a19a57b4f34046c3a2f26 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 756aba29a02c22c23d3a19a57b4f34046c3a2f26

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

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 756aba29a02c22c23d3a19a57b4f34046c3a2f26 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Contract review brief handed to the isolated reviewer (TIER_DEFAULT, declaration face), posted beside its record:

Contract review brief — PR #35198 @ ee702119c1a9c640a7dcae71b22e50ba7bbeaaa6 (card #35138, PR 3)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head (shape: node scripts/pm/record-recognisers.mjs --template --face declaration) with a PASS or FAIL verdict.

  • Face: the Clause-②: yes (widening) declaration (claim 6975089907, amendment 2 6976973578). Confirm from the committed file list that no packages/spec/src/** or governed path is touched; if one is, stop and say so.
  • Read: card mcp: the result members the hosted ask tools add over the framework tools are either moved into the framework or stated as hosted-only, one by one #35138 and its comments (amendment 2, os-dev report 6979330524, area note 6979387847), the PR body, the full diff against its merge-base, the changeset, and the head's check-runs. Code outside the diff is read at origin/main only.
  • ① Judge query_records, aggregate_records and get_record after the diff on both doors: the coded refusal kept byte for byte; the present-only notRecorded / ifNotRecorded members; the rule that they are built only from the names the caller sent and the caller's served schema, so an object or field the caller cannot see answers exactly as one that does not exist; the new pickSentenceLocale export of @objectstack/core and service-analytics' wrapper (behaviour unchanged); the optional userTextLocales() bridge member on both bridges; what the built entries reach; anything removed, renamed or narrowed.
  • ② Changeset level per package (a new public export of @objectstack/core) and the line-initial Clause-② / Metadata-protocol lines in PR body and changeset; changeset prose against the diff.
  • ③ Every dev deviation, NOT-MEASURED gate, open question (answered A in 6979387847) and out-of-scope note answered or escalated.
  • Implemented-by: claude/issue-35138-not-recorded · Reviewed-by: session_01JQwxbYRqkDAGuse5Wqbohi.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Contract review

Served-tier: TIER_DEFAULT
Head-sha: ee702119c1a9c640a7dcae71b22e50ba7bbeaaa6
Local-runs: none

Inputs: brief 6979408379; card #35138 (claim 6975089907, claim amendment 2 6976973578, os-dev report 6979330524 and area note 6979387847); PR #35198 (body and comments, the Docs Drift Check 6979326025 among them); the full diff against merge-base ba6556c617 (13 files, +835/−45: 5 commits and the merge of origin/main); the changeset; and the check-runs on this head. Code outside the diff was read at origin/main only. origin/main has no commit since the merge-base that touches packages/mcp, packages/core/src, packages/services/service-analytics/src or packages/runtime/src/domains/mcp.ts.

Face: the committed file list is one changeset plus files under packages/core/src/, packages/mcp/src/, packages/runtime/src/domains/ and packages/services/service-analytics/src/. It touches no packages/spec/src/** path and no governed path. record-recognisers.mjs --paths decides no face from the paths and defers to the changeset's Clause-②: line, which carries yes (widening). Governed Surface Queue Guard succeeded on this head. So this is the declaration face at TIER_DEFAULT, with no ④. Every file is inside the file surface of amendment 2.

① Derived judgments

  • CI on this head is still running. 65 check-runs: 22 success, 11 skipped, 32 in progress, 0 failure. Still running: Build Core, Test Core (10 shards), Test UI (16 shards), Build & E2E UI, Type Check UI, Type Check · workspace, Type Check · consumer gates and Live E2E UI. Complete and green: Check Changeset, Governed Surface Queue Guard, PR-body guards, Check PR Size, Type Check · source gates, Type Check · debt ledger, Lint · ESLint, every Lint · lane (among them Lint · repo & tooling gates, which carries the NOT-MEASURED check:dual-build-cjs-loads), Lint & Repo Gates and Dogfood Regression Gate. I judge on what is complete. The seat must see the 32 running runs finish green on this head before landing.
  • The coded refusal is kept byte for byte: right. codedErrorResult gains an optional second argument and renders { error } exactly as before when it is absent. The error object is built by the same dataDoorRefusalEnvelope / dataDoorAnswerOf path as before, and the members are added beside it, never inside it. dataDoorErrorResult passes the members only on a refusal: a coded envelope, or a door answer that is not a server fault. recordReadErrorResult asks the schema only on that same condition, so a 5xx answer carries no member and costs no extra read. Every other caller of dataDoorErrorResult (the write tools and delete_records) passes no members, so their answers do not change.
  • When the members are present: right. Only on a refused query_records, aggregate_records or get_record. notRecorded is { object } when describeObject answers null, and { object, fields } when it shows the object but not some of the sent names. Names are deduplicated and kept in the order first sent. A served object whose fields are all shown, a schema read that throws, and a schema answer with no field list all give no member. id, created_at and updated_at are always counted as shown. That is correct, because the engine answers them on every object and a schema need not list them. A read that answers is untouched, because the catch is never reached. The get_record miss on a served object sends no field names, so it carries no member and stays a plain RECORD_NOT_FOUND.
  • Built only from the sent names and the served schema: right, at rule level. notRecordedMembersOf reads two things: the names the caller sent (objectName, and the field names gathered from where, fields, orderBy, groupBy and each aggregation's field and filter) and bridge.describeObject, which is the describe_object answer for this caller on both doors. The refusal's code, message and status do not take part in the members. ifNotRecorded is one constant sentence per language, and it names nothing. So nothing the served schema shows is named or counted, and an object or field the caller cannot see gets members that are byte-identical to those for one that does not exist. The CONTROL pins in mcp-not-recorded.test.ts compare the members across three refusal kinds for a field and for an object. runtime/src/domains/mcp-not-recorded.test.ts checks, over the real security layer on the HTTP bridge, that the served schema shows neither a denied field nor an unknown one, and that describeObject answers null for an object the caller cannot read, as it does for an unknown name. On the stdio door, describeObject reads the caller's view (callerObjectView at origin/main). That view treats an object the principal may not read as a name it does not hold, and it projects out any field the principal cannot read. So the same rule holds there, read but not pinned (N2).
  • Gathering the sent names: right in where, too wide elsewhere (S1). whereFieldNames goes into $and, $or, $nor and $not, skips every other $ key and reads a dotted key by its head. Entries in fields, orderBy, groupBy and an aggregation's field are taken whole, so a dotted entry there is named as a whole string (S1).
  • pickSentenceLocale and platformLocaleNamedBy in @objectstack/core: right, and the move does not change behaviour. platformLocaleNamedBy is the service-analytics function moved verbatim. pickSentenceLocale is the old loop, generic over the languages a producer writes. datasetToolSentenceLocale now passes Object.keys(COPY), which is the same set as the old hasOwnProperty test against COPY, and keeps its signature and return type. @objectstack/service-analytics already depends on @objectstack/core, and @objectstack/core already depends on @objectstack/spec. No other export of @objectstack/core uses either name. Ablations show the service-analytics locale pins and the new core prefix pin both turn red without the picker.
  • userTextLocales() on both bridges: right. McpDataBridge gains an optional member, so an existing implementer still compiles. The HTTP bridge answers userTextLocalesOf(ec), the request's ladder. The stdio bridge answers the principal's ladder and then the i18n service's default. A throwing or missing i18n service adds no rung. A missing member, or one that throws, is answered in en. The tripwire and stored-metadata rosters each list the member once, and it reads no record.
  • What the built entries reach: nothing removed, renamed or narrowed. @objectstack/core's . entry gains two exports. @objectstack/mcp's entry gains an optional member on the exported McpDataBridge type. NotRecordedMembers and the widened codedErrorResult stay module-level and are not on the entry. @objectstack/runtime's bridge object gains one member. In @objectstack/service-analytics, datasetToolSentenceLocale is unchanged, and the function that moved out was module-private. Every input accepted before is still accepted, and every member answered before is still answered.
  • SQL push-down: no finding. The diff adds no data query, no id materialisation and no in-app join. A refused read now makes one schema read and one locale read, and only when it was refused.

Findings:

  • S1 (should-fix): a dotted entry outside where is named as not recorded, and the sentence then misleads. whereFieldNames reads owner.region by its head, owner. But queryRecordsSentFields and aggregateRecordsSentFields take fields, orderBy, groupBy and an aggregation's field whole. Since finding: SqlDriver's #3821 recovery ladder widens an unresolvable projection to every field #7589, the engine refuses a dotted projection with INVALID_FIELD 400 (assertProjectionHasNoDottedPaths, engine-top-level.ts at origin/main). That refusal's message tells the caller to name the whole column. So query_records with fields set to owner.name, on an object whose owner lookup the caller is served, now answers notRecorded naming owner.name. The ifNotRecorded sentence then tells the model to report the data as not recorded and not to answer with another field. That is the wrong answer this card exists to prevent, and it contradicts the remedy given in the refusal beside it. A dotted orderBy entry has the same effect whenever the read is refused for another reason. To close it, read every sent name by its head, as where does (or leave dotted names out). Then add one pin with a dotted fields entry on a served lookup. The security rule is not affected: a dotted name is still built only from what was sent. The original reviewer reads the delta.
  • N1 (nit): the core jsdoc says more than is true. The jsdoc on pickSentenceLocale says it is "ONE picker for every executor that hands a caller a finished sentence". Other copies of the same table lookup remain at origin/main: platformLocaleNamedBy in packages/lint/src/finding-user-text.ts, which does not depend on core, and driverCatalogLocaleOf in @objectstack/service-datasource. The changeset states the scope correctly: the dataset tools and the MCP record tools. Prose only.
  • N2 (nit): the stdio door's half of the rule is read, not pinned. The runtime pin covers the HTTP bridge over the real security layer. On stdio, only userTextLocales is pinned. I read that the stdio describeObject follows the same rule (①). A stdio twin of the runtime pin's schema and refusal checks would keep it held. The code is right today, so this has no correctness or contract effect.

② Semver level

  • Changeset .changeset/35138-mcp-not-recorded.md: right. It bumps @objectstack/mcp, @objectstack/runtime, @objectstack/core and @objectstack/service-analytics at patch. Those are exactly the four published packages whose source changes. A new public export of @objectstack/core is a widening outside the metadata protocol. AGENTS.md Post-Task Checklist item 3 says that Metadata-protocol: none takes patch, and that a non-protocol widening ships patch. CI Check Changeset succeeded on this head.
  • Clause-②: yes (widening): right. It starts its line in both the PR body and the changeset, and the arm is from the closed pair. New answer members present only on a refused read, a new optional bridge member and two new exports are all widenings. No input is newly refused, and nothing is removed or renamed. Claim 6975089907 and amendment 2 declared Clause-②: yes.
  • Metadata-protocol: none: right. No spec key, accepted value or metadata type is added. The type stays local to packages/mcp, and the sentence lives in the executor (ADR-0149 M1).
  • Changeset prose against the diff: right, with S1.
    • "the refusal now carries two members beside it, on the HTTP and the stdio server alike": one handler in registerObjectTools, two bridges.
    • "for the field names the call sent that the schema does not show, in the order sent": true. For a dotted name outside where, this is the S1 case.
    • "both members are built from the names the caller sent and from the caller's served schema, and nothing else": true (①).
    • "The refusal itself (isError, its code, message and status) is unchanged, byte for byte": true.
    • "A read that answers, a refusal about a field the caller's schema shows, a server fault, and a refusal whose schema read cannot be made carry no member": true, where every name sent is one the schema shows.
    • "id, created_at and updated_at ... are never named": true.
    • "The dataset tools' nextStep and sourceLine ... use the same picker, with unchanged behaviour": true. Both go through datasetToolSentenceLocale.
    • "the HTTP bridge answers the request's ladder, the stdio bridge the principal's ladder and then the i18n service's default. A bridge without it is answered in en": true.

③ Boundary flags

  • Open question (a description sentence and an ask-card question for the members): answered A in 6979387847. It becomes a follow-up PR on mcp: the result members the hosted ask tools add over the framework tools are either moved into the framework or stated as hosted-only, one by one #35138 under its own amendment, after this PR lands. This PR stays as it is.
  • Out-of-scope note (the same two items, carrier mcp: the result members the hosted ask tools add over the framework tools are either moved into the framework or stated as hosted-only, one by one #35138): answered by the same follow-up.
  • Deviation, the stdio locale ladder reads the principal's ladder before the i18n default: answered in 6979387847 and right. It keeps nextStep and ifNotRecorded in one language for one stdio caller, and the pin covers both rungs.
  • Deviation, the members do not depend on the refusal's code: answered and right. This is how the rule is met (①).
  • Deviation, the test-double edit in stdio-data-bridge.not-found.test.ts: answered. The HTTP twin now serves task from describeObject, as the stdio side does. Without that, a record miss there would read as an unknown object and break the PARITY pin. Test only.
  • Deviation, model-free commit trailers: process only.
  • NOT-MEASURED check:dual-build-cjs-loads: answered. CI Lint · repo & tooling gates carries it and succeeded on this head.
  • NOT-MEASURED check:type-check-debt at the merge head (local timeout): answered. CI Type Check · debt ledger succeeded on this head.
  • security_findings: withheld: answered in 6979387847, which says the seat handles it outside this record. It is not judged here.
  • Ablations: ten mutations, each turned a pin red and was restored to the HEAD blob. The core prefix ablation first stayed green, and the dev added prefix-only codes until it went red. No ablation covers dotted names (S1) or the stdio schema (N2).
  • Overlap: feat(mcp): aggregate_records orders, cuts and counts groups in the database #35193 (mcp: aggregate_records can order and cut its groups and says how many groups there were #35144, area o1-C) conflicts textually in mcp-http-tools.ts, the tripwire test and runtime/src/domains/mcp.ts. Whichever lands second merges main, and the merge queue re-tests the result.
  • Docs: no page in content/docs states the error body of these three tools, so no page becomes untrue. The follow-up for the description sentence is the right carrier.
  • Process notes: the PR is a draft. Author: objectstack-fleet[bot] (relay), assignee os-warren, so no extra author note is owed. S1 needs a new head, and the original reviewer reads the delta. Before landing, the seat must also see the 32 running runs finish green on the final head (①).

Implemented-by: claude/issue-35138-not-recorded
Reviewed-by: session_01JQwxbYRqkDAGuse5Wqbohi

VERDICT: PASS

A dotted name in fields, orderBy, groupBy or an aggregation's field was
taken whole, so a name reaching a related field through a served head was
named as not recorded. Each sent name is now read by its first segment at
the one place the members are decided. Adds a pin for the dotted case and a
stdio twin over the shared ADR-0106 case table: the answer names only what
the caller can see. Softens the picker's jsdoc to its stated scope.

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl and removed size/l labels Nov 18, 2026
…stdio bridge makes

Claude-Session: https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Contract review

Served-tier: TIER_DEFAULT
Head-sha: df09a1b979dfbadd6417fe19127a4c047811e6ae
Local-runs: none

Delta review: record 6979581416 on ee702119c1 gave PASS with S1 open and nits N1 and N2. This delta covers that head to this one. Inputs: the delta ee702119c1..df09a1b979 (3 commits, no merge of main, 4 files: the changeset, packages/core/src/sentence-locale.ts, packages/mcp/src/mcp-http-tools.ts and packages/mcp/src/mcp-not-recorded.test.ts), the round-2 os-dev report 6981260016, and this head's check-runs. Code outside the delta was read at origin/main only.

Face: unchanged. The delta touches no packages/spec/src/** path and no governed path, and the Clause-②: yes (widening) and Metadata-protocol: none lines in the changeset are unchanged. So this is still the declaration face at TIER_DEFAULT, with no ④.

① Derived judgments

  • CI on this head is complete and green. 68 check-runs: 57 success, 11 skipped, 0 failure, 0 in progress. Test Core, Test UI, Build Core, every Type Check · lane and every Lint · lane succeeded. Lint · repo & tooling gates carries the dev's NOT-MEASURED check:dual-build-cjs-loads, and it succeeded.
  • S1: closed. notRecordedMembersOf now maps every sent name through sentFieldHead (the first path segment) before comparing it with the served schema. It drops an empty head, then deduplicates in the order first sent. Every channel goes through this one place: where (which now pushes the whole key), fields, orderBy, groupBy, and each aggregation's field and filter. A dotted name whose head the schema shows now gives no member. A dotted name whose head the schema does not show names only the head. The new pin covers all six channels with a served head, plus one unknown head. The dev's ablation (whole names restored) turned five pins red.
  • The rule still holds after the change. The members are still built only from the sent names (now their heads) and the caller's served schema. A head is a prefix of the caller's own string. Nothing after the first dot is ever named. So nothing the schema shows is named, and a name the caller cannot see still gets the same members as one that does not exist.
  • N2: closed. The stdio twin runs the real createStdioDataBridge, its own caller view and the real registerObjectTools over the shared ADR-0106 case table (OBJECT_SCHEMA_MASK_CASES with its securityDoubleFor). For every field case and every object case with masking on, the members for what the caller cannot see equal, byte for byte, the members for a name that does not exist (with the name swapped). A field the caller can see, and a dotted name through it, give no member. The dev's second ablation (stdio describeObject served the declared object instead of the caller's view) turned the three field cases red. I agree with area answer A: the twin pins the stdio door's schema half on the table every object-schema exit is judged by. The runtime twin already covers the real security layer on the HTTP door, and adding a plugin-security devDependency is outside the file surface. Both test imports already resolve: @objectstack/metadata-core (its ./testing entry, which three other stdio test files in packages/mcp already import) and @modelcontextprotocol/sdk are dependencies of @objectstack/mcp. The twin's engine double now carries only find, count and aggregate. Removing findOne is test-only, and Lint · ESLint succeeded.
  • N1: closed. The pickSentenceLocale jsdoc now names its two consumers, the dataset tools and the MCP record tools, and no longer claims every executor.
  • Built entries: nothing new. sentFieldHead is module-private. No export, signature or answer key changes in the delta. whereFieldNames is still module-private, and its names reach the members only through notRecordedMembersOf, where sentFieldHead applies.
  • SQL push-down: no finding. The delta adds no data read.

② Semver level

  • Unchanged and right. The changeset still bumps the same four packages at patch with the same two declaration lines. Check Changeset succeeded on this head.
  • The changeset's new sentence matches the code. It says every sent name is read by its head on all six channels, and that a dotted name whose head the schema shows is never named.
  • The PR body is one round behind (N3). Its "What changes" bullet can still be read as head-reading where only. Its quick-read and Tests sections still count 14 cases in mcp-not-recorded.test.ts, where this head has 22. The changeset is what ships, and it matches this head. The PR body ships nothing and does not hold the declaration lines that changed, since they did not change. This is the prose face only.

③ Boundary flags

  • Deviation, the stdio twin runs on the case table's security double, not the real SecurityPlugin: answered (area A, ① N2). Accepted.
  • Deviation, the PR body is not edited: N3.
  • NOT-MEASURED check:dual-build-cjs-loads: answered by CI on this head (①).
  • security_findings: withheld: unchanged. The seat handles it outside this record.
  • Overlap: feat(mcp): aggregate_records orders, cuts and counts groups in the database #35193 still conflicts in the same three files. The dev reports this round did not change that, and whoever lands second merges main.
  • Findings: No must-fix, no should-fix. One new nit:
    • N3 (nit, prose face): the PR body's member description and test counts describe round 1. The seat may update the body without moving the head. It has no correctness or contract effect.
  • Process notes: the PR is a draft. Author: objectstack-fleet[bot] (relay), so no extra author note is owed. Only a nit remains, so this is the final round unless the head moves for a reason other than prose.

Implemented-by: claude/issue-35138-not-recorded
Reviewed-by: session_01JQwxbYRqkDAGuse5Wqbohi

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Final head for L1 · 2026-11-18T14:23Z

Head-sha: df09a1b979 · all check-runs success or skipped (57 success, 11 skipped, 0 red; Lint · repo & tooling gates carries the locally NOT-MEASURED check:dual-build-cjs-loads) · NOT governed, +1015 / −45. Delivers #35138 PR 3 (a refused record read says what is not recorded, in the caller's language), so the PR says Refs #35138, not Fixes. It merges cleanly into origin/main 084156de5e (K = 5, after #35202).
Owed: L1 (first read; area o1-B requests it from L1-a). Clause-②: yes (widening), Metadata-protocol: none: TIER_DEFAULT record 6979581416 (PASS at ee702119c1, S1 open) and its delta record 6981334691 at this head: PASS, with S1 (every sent name is read by its first part), N1 and N2 closed. N3 (nit, prose): the PR body's "What changes" bullet reads as if only where uses the first part, and it counts 14 tests where there are 22. The changeset states it correctly, and the relay cannot edit a PR body, so this comment is the correction. Inputs: claim 6975089907, amendment 2 6976973578, dev reports 6979330524 and 6981260016, area note 6979387847 (the stdio-twin question is answered A, and the delta agrees).
Follow-up on this card after this lands: PR 3b, the tool-description sentence and the ask-card question for notRecorded.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 review (#35138, PR 3) · 2026-11-18T14:25Z

L1: ACCEPT
Head-sha: df09a1b
Read: the full diff at this head against merge base ba6556c (13 files, +1015/−45), with claim amendment 2 6976973578 and its rule, contract record 6979581416 and its delta 6981334691, and the final-head note 6981360244.

Fixes vs Part of. This is PR 3 of the W0 plan. The body says Refs #35138, and no closing keyword appears in the body or the changeset, so a merge does not close the card. Refs has the same effect as the checklist's Part of.

Claim file surface. Amendment 2 gives PR 3 a list of files, and all 13 paths fall inside it.

  • packages/core/src/**: the new sentence-locale.ts with its test, and the index.ts export.
  • dataset-next-step.ts, switched to the shared picker.
  • mcp-http-tools.ts: the record and aggregate handlers, plus get_record, the third record read.
  • stdio-data-bridge.ts and the HTTP bridge (runtime/src/domains/mcp.ts): the userTextLocales member.
  • Their tests: the two new pin files, the not-found twin, the stdio engine-read census, and the write-response tripwire's recipe table, which lists every bridge face.
  • One changeset.

dataset-tools.ts was allowed but not touched.

The seat's rule (10:04Z) against the diff. notRecordedMembersOf reads two things only: the names the caller sent and bridge.describeObject, the caller's served schema.

  • An object the caller's schema does not show answers { object }, whether it is absent or merely unreadable.
  • A field is named only when the head of the sent name is not in the served field list. id, created_at and updated_at are never named.
  • A dotted name whose head is shown is never named, on every channel (S1 of the record, closed at this head).
  • A schema read that throws, or one with no field list, gives no member.
  • The refusal (error) is spread unchanged beside the new members, and a server fault carries none. A readGuard refusal, such as a system object, returns before the try and carries none.

Each changeset sentence against the diff. The changeset is new and is not on main. Four packages are bumped at patch, which is right for a widening with Metadata-protocol: none.

  • "query_records, aggregate_records or get_record": all three catch arms now go through recordReadErrorResult. get_record sends no field names, so it answers only the object case.
  • "Read by its head on every channel": where goes through $and, $or, $nor and $not, and skips other $ keys. fields, orderBy, groupBy and the aggregation field and filter are all mapped through sentFieldHead, deduplicated in the order first sent.
  • "One sentence in en, zh-Hans, zh-Hant and ja": NOT_RECORDED_SENTENCE names nothing. What is not recorded is carried only by notRecorded.
  • "pickSentenceLocale … the dataset tools … unchanged behaviour": platformLocaleNamedBy is moved verbatim. datasetToolSentenceLocale now passes Object.keys(COPY), which is the same set the old hasOwnProperty check read, with the same en floor.
  • "userTextLocales() … the HTTP bridge the request's ladder, the stdio bridge the principal's ladder then the i18n default; a bridge without it answers in en": HTTP returns userTextLocalesOf(ec). Stdio returns userTextLocalesOf(principal) plus metaRequestLocale inside a try. A missing member or a throw gives [], which reads as en.

Tests. mcp-not-recorded.test.ts has 22 cases, and the runtime pin mcp-not-recorded.test.ts runs the HTTP bridge over the real security layer. The stdio twin runs the real createStdioDataBridge over the shared ADR-0106 mask cases (N2 of the record, closed). The core picker test covers prefix lookup.

Clause-②: yes (widening). Record 6979581416 is PASS, and delta 6981334691 is PASS at this same head, with S1, N1 and N2 closed. N3 is PR-body prose, which 6981360244 corrects.

Governance. check-governed-merges.mjs --pr 35198: NOT governed, 0 of 13 paths on the register, 1060 changed lines.

CI at this head, from check-runs: 57 success and 11 skipped, with none failed or in progress. The PR is mergeable clean.

Must-fix

None.

Should-fix

None.

Notes

  • N1, the search companion key. whereFieldNames treats every non-$ key as a field name. A where that carries the search companion __search (SEARCH_COMPANION_FIELD) on a read refused for another reason would name __search in notRecorded, because no served field lists it. This happens only on a refusal, and the name is the caller's own string. If the seat wants it held, add __search to ALWAYS_ADDRESSABLE_COLUMNS or skip it in whereFieldNames on a later card. I add no ask here.
  • N2, merge order. This PR and feat(mcp): aggregate_records names a lookup group's record beside its id, read as the caller #35202 both touch the aggregate_records handler in mcp-http-tools.ts. Whichever merges main second brings a merge back to me as a delta.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Landing · 2026-11-18T14:27Z

Probe Reading
check-governed-merges.mjs --pr 35198 NOT governed · +1015 / −45, 0 of 13 paths on the register, Clause-②: yes (widening) (claim 6975089907, amendment 2 6976973578)
Contract review (条款②) TIER_DEFAULT record 6979581416 (PASS at ee702119c1, S1 open) and delta record 6981334691 at df09a1b979: PASS, with S1, N1 and N2 closed; N3 is PR-body prose, corrected by 6981360244
Head / review df09a1b979 · L1-a ACCEPT 6981423771 at this head (no must-fix, no should-fix), the review of record · all check-runs success or skipped (57 success, 11 skipped, 0 red)
Freshness K = 5, merges cleanly into origin/main 084156de5e, which already holds #35202 (the other aggregate-handler PR), so no main merge was taken and the L1 head stands. overlap-check.mjs: origin/main and #35179 clean; #35193 (#35144, area o1-C) conflicts in mcp-http-tools.ts, the tripwire test and runtime/src/domains/mcp.ts, and merges main second

Open findings: delta nit N3 (body prose, corrected in 6981360244); L1 notes N1 (a where carrying the search companion key on a read refused for another reason names it in notRecorded; carried to this card's PR 3b follow-up) and N2 (merge order, settled because #35202 is already on main).

State: ready + auto-merge armed by area o1-B (lease o1-B, claim 6975089907). This is #35138 PR 3 and says Refs #35138, so the card stays open with pm:dispatched until its last row lands.

Dev-effort: high · Rounds: 2

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 14:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

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

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

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

  • Test Core (10/10) — 失败步骤: Run this shard's tests

    @objectstack/driver-sql:test:  FAIL  src/sql-driver-11389-date-tz-skew.test.ts > #11389 — the process-zone axis is non-vacuous > restores the ambient zone after a sweep
      ↳ 失败原因: @objectstack/driver-sql:test: Error: Test timed out in 5000ms.
    

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

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

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

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

历史信号:

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

分诊清单:

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

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Queue red: triage and one re-queue · 2026-11-18T14:52Z

Signature (new; triage comment 6982087591, run 44324504354, queue commit 67d8e9434b): Test Core (10/10) › @objectstack/driver-sql › src/sql-driver-11389-date-tz-skew.test.ts › "#11389 — the process-zone axis is non-vacuous › restores the ambient zone after a sweep" › Error: Test timed out in 5000ms. No other shard failed; the aggregate Test Core job is red only because of it.

Initial judgment: load or timing, not this PR. The three facts:

  1. Import closure against the diff. The test reaches @objectstack/core through sql-driver-*.ts, and this PR adds one line to packages/core/src/index.ts: export * from './sentence-locale.js'. That module declares functions only; it has no top-level statement, so loading it runs nothing. Nothing else in the diff is in the closure (packages/drivers/** untouched). The intersection is nominal and cannot move a process-zone sweep.
  2. Queue base, same shard: Test Core (10/10) is green on main 084156de5e.
  3. First error is a timeout, not an assertion.

Head unchanged (df09a1b979, L1-a ACCEPT 6981423771). Re-queued once on this reading. If the same signature fires again, the area stops and hands it to the seat for a second diagnosis; no further re-queue.

@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 8856afc Nov 18, 2026
69 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35138-not-recorded branch November 18, 2026 15:27
os-warren pushed a commit that referenced this pull request Nov 18, 2026
…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>
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 size/xl 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.

2 participants