Skip to content

fix(spec, core, plugin-security, plugin-approvals, plugin-audit, service-analytics): platform refusals carry a userMessage in the caller's language - #34811

Merged
objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-0h7006
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 12 commits into
mainfrom
claude/project-thread-0h7006

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34699 (server rows 1, 3, 4 and 5 as narrowed by the card's Premise corrected; the ui rows live on #34740)

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

维护者速读

  • 改了什么:记录锁定、记录不存在(或无权访问)、按无权字段查询、超出委派管理范围这四类平台拒绝,现在都带一句面向最终用户的 userMessage,按请求语言(否则工作区默认语言,再否则英文)给出;数据、动作执行、流程启动三个入口对同一条"记录不存在"给同一种语言;code、状态码与 message 不变。
  • 为什么改:中文用户此前看到的是英文的诊断句(含 API 名、id、字段名);控制台本来就优先显示 userMessage,缺的是服务端没给。
  • 风险与回滚:只新增一个字段,不改既有字段;回滚 = 还原本 PR。新句子不点名字段、id 或对象,不泄露存在性(不存在与无权读同一句)。
  • 先看:packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts(两处标注)、packages/core/src/utils/record-not-found.ts、packages/spec/src/system/operation-message.ts(新增三键四语)。
  • 两分钟验证:pnpm --filter @objectstack/plugin-security exec vitest run src/platform-refusal-user-message.test.ts,预期 10 条全绿,其中 zh-CN 用例断言中文句子。
  • 需要你做的:无,席位落地。本 PR 非受管(check-governed-merges.mjs --pr 34811 判 NOT governed,0/43 路径,849 行),L1 通过、席位契约复审(contract review owed)PASS 且 CI 全绿后,由 o3-J 区落地。

What changes

The platform answers four refusals with an end user's sentence on userMessage, in the caller's language: the request locale, else workspaceLocale, else en (the ladder the operation-message catalog already uses). code, HTTP status and message do not move; the operator half stays in message.

Row Refusal Key Producers marked
1 per-row record lock (RECORD_LOCKED) existing lock sentence plugin-approvals lifecycle-hooks.ts: only the per-row lock; the three operator-facing bound refusals stay unmarked
3 RECORD_NOT_FOUND record_not_found (new) recordNotFoundError in @objectstack/core, now taking the caller; every call site that has a context passes it
4 masked-field query refusal (PERMISSION_DENIED) query_field_not_readable (new) all four producers: the security middleware's filter-oracle guard, plugin-approvals payload-predicate-guard.ts, plugin-audit parent-field-query-guard.ts, service-analytics field-read-admission.ts; the aggregate-role refusals stay unmarked (they are not row queries)
5 DELEGATION_SCOPE_VIOLATION delegation_scope_violation (new) the security middleware's delegated-administration gate catch
  • packages/spec/src/system/operation-message.ts: three placeholder-free keys in en, zh-CN, ja-JP, es-ES. None names a field, id, object or wire code. record_not_found reads the same for a missing row and an unreadable one (ruling 5985885287, existence hiding).
  • packages/core/src/utils/operation-user-message.ts (new, exported): operationUserMessage(key, caller) resolves the ladder against BUILTIN_OPERATION_MESSAGES and renders through renderOperationMessage with the built-in catalog. It is for producers that hold no i18n service, so it consults no deployment errors.KEY override; the security middleware's markings go through its own userFacingDenialMessage, which does. The caller is typed object (any context) and its locale / workspaceLocale are read defensively.
  • mapDataError and the batch-row classifier already relay a declared userMessage; nothing in the transport changed.
  • Docs: the flat RECORD_NOT_FOUND body examples in content/docs/protocol/kernel/http-protocol.mdx and error-handling.mdx now show userMessage.
  • The action and flow-start doors: refuseDeniedSubjectLoad and refuseDeniedSubjectLoadBeforeDispatch (runtime/src/action-execution.ts) take the caller, and every caller that holds the execution context passes it: the declarative update arm, the hand-off pre-check, the flow-start row admission (refuseUnreadableFlowStartRecords, shared by POST /automation/:name/trigger, the declared type: flow endpoint and the action door's flow branch) and the dispatch arm of every other action (action-dispatch.ts). So a routed row the caller cannot read, or an id that names nothing, answers the zh-CN sentence there exactly as the data door does for the same miss.
  • The bulk update faces' existence check: assertRecordExists (metadata-protocol/src/protocol-record-reads.ts, reached when the engine's update resolved null instead of refusing) takes the row's write context from protocol-batch-data.ts.
  • Not given a caller: the MCP-only sites (runtime/src/domains/mcp.ts's refuseDeniedSubjectLoad call and the MCP metadata door). Their not-found carries the English userMessage; the MCP data doors relay it, the MCP metadata door carries no userMessage channel and answers as before.
  • Clause-② widening. @objectstack/core gains two public exports, operationUserMessage and the type UserMessageCaller, and recordNotFoundError an optional third parameter; @objectstack/spec gains three catalog keys, record_not_found, query_field_not_readable and delegation_scope_violation; the /data 404 body and the batch rows gain a userMessage key. Nothing is removed or narrowed. The changeset carries the same two declaration lines and stays patch (Metadata-protocol: none).

Tests

New:

  • plugin-security/src/platform-refusal-user-message.test.ts (10): real ObjectQL over a real SqlDriver with the real SecurityPlugin; zh-CN, workspace fallback and en for rows 3, 4, 5, plus relay through the real mapDataError, plus a CONTROL that a readable query is admitted. The delegated gate is a stub that throws the gate's real error class (the gate's own verdicts are pinned in delegated-admin-gate.test.ts).
  • core/src/utils/operation-user-message.test.ts (7): the ladder and the not-found envelope.
  • spec/src/system/operation-message.test.ts: every locale defines the three keys, no placeholders, no wire vocabulary, distinct texts, zh-CN render, unknown-locale fallback, deployment override.
  • zh-CN cases added to payload-predicate-guard.test.ts, activity-predicate-guard.test.ts, field-read-admission-gate.test.ts, record-lock-user-facing-message.test.ts.
  • runtime/src/flow-start-record-admission.test.ts (3, this round): the action door (POST /actions, a routed row the zh-CN caller cannot read) and the flow-start door (POST /automation/:name/trigger, a row key the zh-CN caller cannot read) answer the zh-CN record_not_found sentence with code, status and message unchanged and no run; CONTROL: the same start by a caller with no locale answers the English sentence.
  • metadata-protocol/src/protocol.bulk-record-not-found.test.ts (2, this round): an engine whose update resolves null for a missing row; updateManyData and batchData update give the zh-CN caller the zh-CN sentence on the row, CONTROL a caller with no locale the English one.

Forced changes (tests that pin the exact error shape, now expecting the added field):

  • metadata-protocol/src/protocol.batch-row-driver-text.test.ts, protocol.batch-row-http-status.test.ts: the not-found batch row now carries userMessage.
  • runtime/src/batch-row-http-status-real-driver.integration.test.ts: same.
  • plugin-approvals/src/record-lock-batch-row-status.integration.test.ts: the lock row carries userMessage; its own-property list ends statusCode, userMessage.
  • rest/src/record-field-access-route.test.ts: the stub of the read path's not-found is now built by the real recordNotFoundError, so the "same 404 as the read path" comparison compares like with like.
  • mcp/src/mcp-coded-refusal.test.ts (data-door sites) and mcp/src/stdio-data-bridge.not-found.test.ts: the MCP not-found envelope carries the English userMessage.
  • runtime/src/duplicate-record-user-message-doors-33790.test.ts CONTROL: "a row whose producer marked nothing" used an id naming no row, which is now marked; it moves to a write naming an undeclared field. Its assertion (no userMessage) is unchanged.

Ablation (each leg red, then restored; git diff HEAD empty on the touched source afterwards):

Leg Mutation Result
1 filter-oracle guard rethrows without the marking 3 failed / 10
2 delegation marking disabled 3 failed / 10
3 recordNotFoundError marking deleted 2 failed / 7 (core)
4 record lock lockedError(sentence) without the user half 2 failed / 19
5 (this round) refuseDeniedSubjectLoad drops its caller (recordNotFoundError(objectName, recordId ?? '')), via scripts/ablation-replace.mjs (anchor 1 → 0, blob d9aad0e27984 → 9e3e53af6067) 2 failed / 35 (flow-start-record-admission.test.ts: the action-door and flow-start-door pins; the CONTROL stays green); restored, blob == HEAD d9aad0e27984, git diff HEAD empty; green leg 35 / 35

Acceptance notes

Verification

This round (head 1130a716e0)

origin/main merged at c7362a7650 (clean, no generated artifact deferred). After the merge, the dependency closure of @objectstack/runtime was rebuilt, and later every package under packages/ (turbo run build --concurrency=2, lock verdict exit 0). The suites and typechecks below ran under the shared verify lock, and the exit codes are the commands' own.

Package suites and typechecks
Command Head Result
pnpm --filter @objectstack/metadata-protocol typecheck 5ea3c15d15, again at 1130a716e0 exit 0
pnpm --filter @objectstack/runtime typecheck (includes check:test-typecheck) 5ea3c15d15, again at 1130a716e0 exit 0
pnpm --filter @objectstack/metadata-protocol test 5ea3c15d15 exit 0 · Test Files 348 passed, 9 skipped · Tests 23093 passed, 45 skipped
pnpm --filter @objectstack/runtime test (project local) 5ea3c15d15 exit 0 · Test Files 613 passed · Tests 11411 passed, 23 skipped
mcp mcp-coded-refusal.test.ts + stdio-data-bridge.not-found.test.ts 5ea3c15d15 exit 0 · 186 / 186
rest record-field-access-route.test.ts 5ea3c15d15 exit 0 · 5 / 5
flow-start-record-admission.test.ts · protocol.bulk-record-not-found.test.ts 1130a716e0 exit 0 · 35 / 35 · 27 / 27

1130a716e0 changes only those two test files (one module-top import each), so the two files and both typechecks were re-run there.

Derived gates

node scripts/pm/dispatch-gates.mjs --commands (no paths) derives 128 families for this PR's change set; the list is the same at 5ea3c15d15 and at 1130a716e0. First pass at 5ea3c15d15: 124 exit 0; three exited 3, PREREQUISITE NOT MET, because packages had no dist/ (spec check:skill-examples, check:dual-build-cjs-loads, check:i18n); check:test-source-alias exited 1 on the two new pin files (their source under test loads @objectstack/lint and @objectstack/metadata inside a function). 1130a716e0 adds the module-top imports the gate asks for. After the full package build, all four were re-run at 1130a716e0: each exit 0. The ratchet families check:type-check-coverage and check:type-check-debt, and check:cross-package-test-inputs, were re-run at 1130a716e0: exit 0. Reconciliation: dispatch-gates.mjs --ran with an exit code on every line → 128 derived, 128 run, 0 NOT-MEASURED. check-nul-bytes.mjs: OK. No exported symbol was renamed or removed, so check-platform-checklist.mjs was not owed. CI runs the full farm on the PR.

Earlier rounds (through head d50700b)

Package suites (shared box, under the verify lock): core, plugin-security, plugin-approvals, plugin-audit, service-analytics, service-print, metadata-protocol, rest, objectql (13603 tests), runtime, spec (27174 tests). The first run surfaced the six forced shape pins above; each failing file was re-run green after its fix.

Merge-tree against the open PRs that share a file (none shares a hunk), and against main:

Against Head git merge-tree
#34734 (action-execution.ts) 08a588b12b exit 0, 0 conflicts
#34709 (engine-update.ts) 13741cb992 exit 0, 0 conflicts
#34565 (engine-delete-and-aggregate.ts) 779d1aa330 exit 0, 0 conflicts
origin/main 6dd5716329 exit 0

Derived gates: node scripts/pm/dispatch-gates.mjs --commands derives 102 for this file surface. After a full turbo run build, all 102 ran at 21b0016086: 101 exit 0, and check:test-source-alias exit 1 on three test files this change edits (their source under test loads a dependency inside a function body). f3d1774be2 adds the module-top imports the gate asks for; the gate then exits 0 and the three files re-run green. f8ef82d7bb adds the two doc examples, which derive 23 more docs gates: all 23 exit 0, and the four earlier doc-reading gates (check:doc-authoring, check-affected-docs, check-drift-comment, spec check:docs) re-ran exit 0. Reconciliation: dispatch-gates.mjs --ran → 125 derived, 125 run, 0 NOT-MEASURED. CI's workspace type check then caught a weak-type error (a context declaring neither locale field was refused for the caller type) in plugin-audit and the rest test; 1fce1406e2 types the caller as object, and turbo run typecheck over the 11 touched packages passes (52/52 tasks). CI's Test Core shard 9 then caught the two MCP shape pins above; d50700b346 updates them. Before that push, the two MCP files re-ran green, and the other packages whose tests name the not-found refusal ran locally, all exit 0: plugin-auth, service-settings, downstream-contract, client, driver-sql, organizations, plugin-sharing, http-conformance, scenarios, service-mailbox, service-storage, verify, plugin-hono-server, types. check-platform-checklist.mjs --changed-from origin/main: OK, 21 anchors judged, 0 lost. eslint --no-inline-config on the changed .ts files: exit 0.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (Only catalog strings added.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (eslint run on the changed files.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (No generated artifact moves: the keys are catalog strings, not schema.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX

…ice-analytics): platform refusals carry a userMessage in the caller's language

The 404 RECORD_NOT_FOUND, the 403 unreadable-query-field refusal (all four
producers), the 403 DELEGATION_SCOPE_VIOLATION and the per-row 409
RECORD_LOCKED now mark the end user's sentence as userMessage, rendered
from three new keys of the shared operation-message catalog (en, zh-CN,
ja-JP, es-ES) in the request locale, else the workspace default. Code,
status and message are unchanged.

Claude-Session: https://claude.ai/code/session_01ADHkmPhCxzY1uTqhToLhkv
Co-authored-by: Claude <noreply@anthropic.com>
Tests that pin the exact shape of a not-found row now expect the end
user's sentence beside code, message and status. The REST field-access
route test builds the read path's not-found with the real producer, and
the runtime CONTROL for an unmarked row moves to a write naming an
undeclared field, since a missing id is now marked.

Claude-Session: https://claude.ai/code/session_01ADHkmPhCxzY1uTqhToLhkv
Co-authored-by: Claude <noreply@anthropic.com>
…lection

The three test files edited for the not-found userMessage reach a source
that imports a dependency inside a function body; each now loads it at
module top, as check:test-source-alias asks of a file a change edits.

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

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 11 package(s): @objectstack/core, @objectstack/metadata-protocol, @objectstack/objectql, @objectstack/plugin-approvals, @objectstack/plugin-audit, @objectstack/plugin-security, @objectstack/rest, @objectstack/runtime, @objectstack/service-analytics, @objectstack/service-print, @objectstack/spec, touching 63 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.

31 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 d576509c80575197b3218aeb1f55884e5ed06ea6.

⛔ 11 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
  • 1 cross-cutting symbol(s) contributed no route anchor: updateData (4 routes)
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 192 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 d576509c80575197b3218aeb1f55884e5ed06ea6 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json d576509c80575197b3218aeb1f55884e5ed06ea6

⚠️ 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 d576509c80575197b3218aeb1f55884e5ed06ea6 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

The flat RECORD_NOT_FOUND body now includes userMessage in the caller's
language; the two pages that print that body show it.

Claude-Session: https://claude.ai/code/session_01ADHkmPhCxzY1uTqhToLhkv
Co-authored-by: Claude <noreply@anthropic.com>
An interface of two optional fields is a weak type: TypeScript refuses a
context that declares neither (hook and middleware contexts, test
callers) for it. The caller is now typed `object` and its two locale
fields are read defensively, which the ladder already did.

Claude-Session: https://claude.ai/code/session_01ADHkmPhCxzY1uTqhToLhkv
Co-authored-by: Claude <noreply@anthropic.com>
The MCP data doors relay a declared userMessage; with no caller locale in
reach the not-found refusal's is the English one. The metadata door
carries no userMessage channel, so its sites keep the three-field answer.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR

席位核对

L1 first review (full) · REWORK · Head-sha: d50700b3468c39cc4a5dd8871f050c1e673e97bb · card #34699 rows 1, 3, 4, 5 (Fixes #34699) · read 2026-11-17T13:23Z

There is no earlier L1 or contract-review record on any head. Inputs:

  • claim 6944041623, area hand-off 6948383268, takeover 6949036026;
  • the card's Premise corrected 6943926042;
  • the PR body;
  • the net diff from merge-base f6f5b50a (38 files, +647 / -49);
  • check-runs on this head.

The four markings read correct where they are made. The sentences name no field, id or API name. record_not_found reads the same for a missing row and a hidden one, which is what ruling 5985885287 requires. code, status and message do not move. One row is incomplete, and the surface needs paper.

Must-fix

M1. Seven paths fall outside the claimed surface, and the card has no amendment for them. Claim 6944041623 names the catalog, the core helper, the listed recordNotFoundError call sites, the four query-field producers, the middleware, lifecycle-hooks.ts, tests beside each, and the changeset. The diff also moves:

  • content/docs/protocol/kernel/error-handling.mdx and http-protocol.mdx (the two RECORD_NOT_FOUND body examples);
  • packages/mcp/src/mcp-coded-refusal.test.ts and stdio-data-bridge.not-found.test.ts (forced shape pins; packages/mcp is not in the claim at all);
  • packages/runtime/src/batch-row-http-status-real-driver.integration.test.ts and duplicate-record-user-message-doors-33790.test.ts (forced; neither sits beside action-execution.ts);
  • packages/rest/src/record-field-access-route.test.ts (forced; it tests record-field-access-route.ts, which is not a listed call site).

I read protocol.batch-row-*.test.ts and record-lock-batch-row-status.integration.test.ts as beside protocol-batch-data.ts and lifecycle-hooks.ts. Each of the seven is forced by the added field or documents it. Please post one amendment on #34699 that names them with their reasons, plus any path the S1 fix moves. The card thread is gone, so the area posts it.

Should-fix

S1. Row 3 is incomplete on the action and flow-start doors, and the body says the caller is out of reach there when it is not. refuseDeniedSubjectLoad (packages/runtime/src/action-execution.ts:4231) still calls recordNotFoundError(objectName, recordId ?? '') with no caller. So a zh-CN user who runs an action on a record they cannot read, or on an id that names nothing, reads the English sentence. Three of its five callers hold the caller's context:

  • refuseDeniedSubjectBeforeHandOff holds wiring.ec (:3396);
  • refuseUnreadableFlowStartRecords holds executionContext (:4525);
  • executeDeclarativeUpdateAction holds wiring.ec (:4804).

refuseDeniedSubjectLoadBeforeDispatch (:4369) takes none in its parameters, and runtime/src/domains/mcp.ts:2311 is the MCP door the body already excludes. The body's "Not given a caller: … refuseDeniedSubjectLoad … (no caller context in reach)" is wrong for the three callers above. The data door's own miss on the same object (callData, :701) now answers in zh-CN. Both answers are still the same for a missing row and a hidden one on each door, so this is not an existence oracle, only English where the card asks for the caller's language. Please do one of these:

(a) is a one-parameter change in a claimed file and closes the row the card names.

Nits

Checklist (the rest holds)

  • Changeset: it names all 11 published packages whose src moved (spec, core, objectql, metadata-protocol, runtime, rest, plugin-security, plugin-approvals, plugin-audit, service-analytics, service-print). packages/mcp moved only tests. patch with Metadata-protocol: none is the right level. The spec api-surface baseline does not move, which fits: the three keys are catalog strings, not exports.
  • Catalog: the three keys are in en, zh-CN, ja-JP and es-ES, with no placeholders and no wire vocabulary. The test pins every locale, distinct texts, the fallback and a deployment override.
  • Producers: the middleware marks the query-field refusal through its own userFacingDenialMessage (the deployment errors.<key> override applies) and marks only PermissionDeniedError. The delegated gate catch marks only a DelegationScopeViolationError answer, so the not-found that readDoorAnswerForGateRefusal can return keeps its own sentence. The three non-security producers leave the aggregate role unmarked, as the changeset says. The per-row record lock passes the localized sentence as userMessage without the RECORD_LOCKED: prefix, and the bound refusals mark none.
  • Docs made false: none. The two doc examples and the http-protocol ladder sentence match operationUserMessage.
  • Tests: the new plugin-security file runs real ObjectQL, a real SqlDriver and the real SecurityPlugin, with zh-CN, workspace and en legs and a CONTROL. I read the six forced shape changes: each adds only the new key, except the data: the duplicate refusal reaches the writer's locale only on the /data door — the action door and updateMany answer the English developer sentence #33790 CONTROL, which moves to a write that still marks nothing and keeps its assertion. The body's ablation table shows each leg red.
  • Gates at this head: latest attempt per check, 70 runs: 58 success, 12 skipped, none failed.
  • Overlap: the takeover's overlap check against main and fix(audit): a search the server widens never names a column the caller may not query #34817 / fix(objectql)!: a predicate update judges each matched row against the parent roll-ups the rows before it move #34709 reads clean.

Owed, for the seat: a contract review at CONTRACT_REVIEW_TIER. It is owed for the non-test packages/spec/src/system/operation-message.ts path (three new catalog keys) and the core public export, and the claim and the body both say so. Please rule N1 there. On Tier H: check-governed-merges.mjs --pr 34811 reads NOT governed (0 of 38 paths, 696 lines). But the body's 维护者速读 tells the maintainer "Tier H 交 os-zhuang 批", and the claim's lane line says "seat Tier H". Please settle which applies and have the body say it. This comment readies, queues and arms nothing.

…found refusals answer in the caller's language

refuseDeniedSubjectLoad, refuseDeniedSubjectLoadBeforeDispatch and the bulk
faces' assertRecordExists take the caller's execution context, and every
caller that holds one passes it, so their RECORD_NOT_FOUND userMessage
follows the request locale, then workspaceLocale, then en, as the data
door's own miss does. code, status and message do not move.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
…d exports and catalog keys

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
…new pin files

check:test-source-alias asks each edited test file whose source under test
loads a workspace dependency inside a function body to load it at module top.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR

席位核对

L1 delta review · ACCEPT (code); landing waits on gates · Head-sha: 1130a716e03ac4a5d701a143b5e821b892f9e104 · card #34699 rows 1, 3, 4, 5 · read 2026-11-17T16:17Z

This reviews the delta from L1 6949320766 (REWORK at d50700b3: M1, S1, N1, N2). Inputs:

  • dev report 6953246841 and claim amendment 6952327352;

  • the main merge c7362a76;

  • the delta c7362a76..1130a716 (8 files, +140 / -17), read line by line;

  • the PR body;

  • check-runs on this head.

  • Merge: the net diff over the PR's files from the merge-base to d50700b3 is line-identical to main..c7362a76.

  • S1 is closed, by route (a), and more completely than L1 asked. refuseDeniedSubjectLoad and refuseDeniedSubjectLoadBeforeDispatch each take an optional caller and hand it to recordNotFoundError. It is passed from:

    • refuseDeniedSubjectBeforeHandOff (ec, both arms);
    • refuseUnreadableFlowStartRecords (executionContext);
    • executeDeclarativeUpdateAction (ec);
    • action-dispatch.ts:701 (ec).

    L1 had read …BeforeDispatch as holding no caller. Its caller in dispatchAdmittedAction does hold one, and that is the path of every script, body and flow action, so passing it there is right. Only runtime/domains/mcp.ts:2311 (the MCP door, excluded in the body) still passes none. The caller decides the language only, and the sentence is one text for a hidden row and a missing one, so no door becomes an existence oracle. The new docblock states this.

  • N2 is closed, folded in. assertRecordExists (the body in protocol-record-reads.ts and the private wrapper in protocol.ts) takes the caller, and both bulk call sites in protocol-batch-data.ts pass the row's context.

  • N1, as the seat ruled: Clause-②: yes (widening) in the changeset and the body. The changeset now names the widening: the three catalog keys, operationUserMessage, UserMessageCaller, and the optional third parameter of recordNotFoundError. patch with Metadata-protocol: none stays right.

  • Pins:

    • flow-start-record-admission.test.ts: zh-CN on the action door (POST /actions) and the flow-start door (POST /automation/:name/trigger), plus an English CONTROL for a caller with no locale.
    • protocol.bulk-record-not-found.test.ts: zh-CN on updateManyData and the batchData update, plus an English CONTROL.

    The body reports the ablation 2 red with the CONTROL green. I did not re-run it.

  • M1 is closed. Amendment 6952327352 names L1's seven paths, each with its reason, and the five this round adds: action-dispatch.ts, protocol-record-reads.ts, protocol.ts and the two new test files. The delta moves no other out-of-surface path.

  • Body: the false "no caller context in reach" line is gone. The maintainer summary now says NOT governed (0/43 paths, 849 lines), as the seat ruled, with no Tier H.

No new findings.

Gates at this head, as read now. Landing waits for these:

  • Test UI (3/16) and Test UI (11/16) are red, each on one test in ui/ packages this PR does not touch:

    • form-field-tabs.test.tsx "a failed submit that jumps to an off-screen tab scrolls it into view";
    • AppContent.objectScope-12811.test.tsx "does not hold the route for its lookup targets".

    The diff moves nothing under ui/, and Test UI is green on the last four main commits. I read these as unrelated flakes. They need a rerun to green on this head before landing.

  • Test Core (1/10) and (10/10) were still running.

  • Every other check is success or skipped.

This ACCEPT does not stand in for those gates.

Owed, for the seat: the contract review at CONTRACT_REVIEW_TIER on this head, which you said you would run once after the S1 fix. This comment readies, queues and arms nothing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfr1xZSFZzCR8HnqXX

Red read · PR #34811 · head 1130a716 · CI run 44119242256 · 2026-11-17T16:18Z

Test UI (3/16) and Test UI (11/16) each fail on one ui/ test that this PR does not touch: the form-field-tabs off-screen tab scroll test, and AppContent.objectScope-12811 (lookup targets). The second is the known flake anchored at #34765. The PR's diff has no ui/** path; it is runtime, metadata-protocol, mcp tests, rest test, spec catalog keys and docs. Both shards are green on main. Judged flakes (L1 6953842787 reads them the same way). The failed jobs are re-run once when the run completes. A second failure is real.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1130a716e03ac4a5d701a143b5e821b892f9e104
Local-runs: none
Scope: packages/spec/src/system/operation-message.ts + packages/core/src/utils/operation-user-message.ts, packages/core/src/utils/record-not-found.ts, packages/core/src/index.ts, packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts, packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/plugins/plugin-approvals/src/payload-predicate-guard.ts, packages/plugins/plugin-audit/src/parent-field-query-guard.ts, packages/services/service-analytics/src/field-read-admission.ts, packages/runtime/src/action-execution.ts, packages/runtime/src/action-dispatch.ts, packages/metadata-protocol/src/protocol-record-reads.ts, packages/metadata-protocol/src/protocol.ts, packages/metadata-protocol/src/protocol-batch-data.ts

First seat contract review of this PR: no earlier contract-review record exists on the PR or on card #34699 at any head, so this is a review of the whole net diff against main (43 files, +785 / -64), not a delta. Read 2026-11-17T16:20Z. Inputs: card #34699 with all 8 comments, the PR body, the net diff, the check-runs on this head. The remainder of the diff (tests, the one-argument call sites in objectql, rest, service-print, own-row-delete-routes, protocol-data-crud, protocol-data-writes, the two docs examples, the changeset) is the lane seat's ACCEPT (L1 delta 6953842787).

① Derived judgments

  • Catalog accept-set: BUILTIN_OPERATION_MESSAGES gains record_not_found, query_field_not_readable, delegation_scope_violation in all four locales (en, zh-CN, ja-JP, es-ES). Additive; no existing key or text moves. Right.
  • Public surface, @objectstack/core: new exports operationUserMessage and type UserMessageCaller (through export * in index.ts); recordNotFoundError gains an optional third parameter. Every two-argument caller still compiles and still gets a refusal. Right, a widening.
  • Wire: 404 RECORD_NOT_FOUND (every door built on recordNotFoundError, batch rows included), the 403 PERMISSION_DENIED predicate refusal from its four producers, 403 DELEGATION_SCOPE_VIOLATION and the per-row 409 RECORD_LOCKED each gain one key, userMessage. code, status and message are byte-identical on every one: read at each throw site, none of the four message templates is edited. Right.
  • Narrowing check, the question the order put: nothing a caller could see before is taken away or reworded. The only caller-visible change besides the added key is which text a client that prefers userMessage shows. On doors that pass no caller (the MCP data doors mcp-http-tools.ts:3120, stdio-data-bridge.ts:1357/1391, and runtime/domains/mcp.ts) the not-found now carries the English sentence where it carried none. That adds a key and removes nothing; the body discloses it. No narrowing.
  • Existence hiding: record_not_found is one text for a missing row and a hidden one. On each door both answers are built from the same context (the middleware's hidden-row arms and the engine's missing-row arms both pass opCtx.context; the action and flow-start doors route both through refuseDeniedSubjectLoad), so the language cannot tell the two apart either. Right against ruling 5985885287.
  • Language source, the other question: every marked refusal reads its locale off the operation's execution context and nothing else. operationUserMessage takes caller.locale, then caller.workspaceLocale, then en; the middleware's two markings take denialLocalesOf(opCtx.context); the record lock takes refusalLocalization(ctx, …) as before. That context is filled by assembleExecutionContext (locale: requestLocale ?? localization.locale, workspaceLocale: localization.locale). No marking reads a process default, an env value or the row. An anonymous caller has neither rung and reads en, which is the existing ladder, not this PR's.
  • Non-exported signatures widened by an optional parameter (snapshotQueryRefusal, parentFieldQueryRefusal, fieldReadDeniedError, refuseDeniedSubjectLoad, refuseDeniedSubjectLoadBeforeDispatch, assertRecordExists): none is named on its package index. Internal, right.

② Semver level

Clause-②: yes (widening). Declared on the PR body and in the changeset, identically, with Metadata-protocol: none.

  • Correct: the diff adds exports and keys and removes or tightens nothing (① above), so yes (widening) is the true arm and (narrowing) is not owed.
  • Complete as to what the order asked: the changeset names the three catalog keys, operationUserMessage, UserMessageCaller and the optional third argument of recordNotFoundError; its bullets name the four refusals that gain userMessage. I found no further export: the diff touches no package.json, no other package index, and no spec api-surface baseline (the keys are entries of an existing exported constant, so none moves).
  • Level: patch on the 11 published packages whose src moved (packages/mcp moves tests only). An added optional parameter, two added exports and added catalog strings with Metadata-protocol: none fit patch under the repo's convention, as data: the duplicate refusal reaches the writer's locale only on the /data door — the action door and updateMany answer the English developer sentence #33790 did. Check Changeset: success.

③ Boundary flags

  • Dev flags and open_questions: report 6953246841 carries open_questions: []. Report 6946285187's one question (contract review owed, Tier H) is answered: this record is the contract review; Governed Surface Queue Guard is success and the takeover reads the PR NOT governed, so no Tier H approval is owed beyond it.
  • Out-of-scope note 1 (the MCP run_action hand-off pre-check subjectVerdictRefusal rebuilds the refusal from message, status and code, so userMessage does not reach that MCP answer): read at action-dispatch.ts:352. It is the state before this PR, on a door outside the card's rows. Accepted as noted; a follow-up card if the MCP door is to answer the sentence.
  • Out-of-scope note 2 (fix(audit): a search the server widens never names a column the caller may not query #34817 conflicts on plugin-audit/src/parent-field-query-guard.ts): a landing-order matter for the area, not a contract one.
  • Deviation (the fourth call site, action-dispatch.ts:701): right. Without it the REST action door for script, body and flow actions would answer English, the row the card names.
  • SQL push-down: the diff adds no query, no id materialisation and no in-app join. Each change is a parameter, a property on an error, or a string. Nothing to find.
  • Gates, as concluded on this head at the read: success on Lint & Repo Gates and all its parts, TypeScript Type Check and all its parts, Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Build Core, Build Docs, Check Documentation Links, Build & E2E UI, Live E2E UI, Test Core 1 through 9 of 10, and 14 of 16 Test UI shards. NOT concluded green: Test UI (3/16) and Test UI (11/16) are failure (and so the Test UI roll-up), on tests under ui/, where this diff has no path; Test Core (10/10) was in_progress. This PASS is the design verdict and does not stand in for them: landing waits on the two UI shards re-run to green and on Test Core (10/10) concluding success. A second red on either UI shard is a real failure, not a flake.

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/system/operation-message.ts (hits). Against the card as narrowed by Premise corrected 6943926042 (rows 1, 3, 4, 5 through the existing userMessage channel and this catalog, no second channel) and against its first consumers:

  • The three keys are placeholder-free in every locale, and each producer renders them with no params, so no {{…}} can reach a user. The zh-CN texts read as natural end-user sentences and name no field, id, API name or wire code.
  • record_not_found says both causes and decides neither, in all four locales. That is what the ruling requires of a text shown for both.
  • delegation_scope_violation names no business unit or permission set; the gate's reason stays in message.
  • Tried to break query_field_not_readable on the aggregate role, where "remove that condition" would be wrong advice. It holds: plugin-security refuses an aggregate over a hidden field earlier, at step 2.5b (:1704), unmarked; step 2.9, the marked one, is reached by a hidden field in where, having, orderBy, a find's groupBy or an aggregation's filter, which are conditions. The other three producers skip the marking on their aggregate arm, each pinned by a test.

Implementing files, sentence by sentence:

  • operation-user-message.ts: the ladder is the one the docblock states and the one denialLocaleOf uses (first rung the built-in catalog carries, matched by resolveBundleLocale, else en through renderOperationMessage's own fallback). A non-string or empty rung is skipped; null and no caller give en. Agrees.
  • record-not-found.ts: message, code, status, object unchanged; userMessage always set. Agrees with the jsdoc and the docs examples.
  • security-plugin-authz-middleware.ts: the filter-oracle marking wraps only assertReadableQueryFields and only a PermissionDeniedError; the delegated marking applies only when the answer is still a DelegationScopeViolationError, so the not-found that readDoorAnswerForGateRefusal may substitute keeps its own sentence (an out-of-scope row the caller cannot read does not become distinguishable). Both go through userFacingDenialMessage, so a deployment override applies there.
  • lifecycle-hooks.ts: only the per-row lock passes the sentence as userMessage, without the RECORD_LOCKED: prefix; the bound refusals, which name an API name, mark none. Agrees with the docblock.
  • payload-predicate-guard.ts, parent-field-query-guard.ts, field-read-admission.ts: marked on the predicate arm only, from the operation's own context.
  • action-execution.ts, action-dispatch.ts, protocol-record-reads.ts, protocol.ts, protocol-batch-data.ts: the caller is passed at all four action and flow-start sites and at both bulk assertRecordExists calls, and it selects the language only. L1's M1 and S1 are closed as L1 6953842787 reads them; I found no site holding a context that passes none.

Nits (no effect on correctness or the contract; left as accepted deviations, since a fix in these files moves the head):

  • N1 (nit) — the new jsdoc bullet for query_field_not_readable in operation-message.ts calls it "plugin-security's" refusal for a query that "filters, sorts, groups or aggregates". Four producers render the key, and the aggregate role is the one arm none of them marks. The catalog texts are right; the comment overstates. Fold into the next edit of that block.
  • N2 (nit) — a deployment's errors.query_field_not_readable override reaches the security middleware's marking only; the approvals, audit and analytics producers, and every record_not_found, render the built-in text because operationUserMessage holds no i18n service. The helper's docblock and the changeset both say so ("where the producer holds an i18n service"), so nothing published is false. Worth a follow-up card: one refusal can read in two wordings in a deployment that overrides it.
  • N3 (nit) — UserMessageCaller is exported as object, the loosest type that compiles, and operationUserMessage re-reads the two rungs that userTextLocalesOf (core/src/security/assemble-execution-context.ts) already returns. The docblock gives the reason for the type; reusing the existing reader is a tidy-up for a later touch.

Implemented-by: claude/project-thread-0h7006
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

…aram

protocol.ts sits under a facade line ceiling of 11705 (ruling 6897467376),
and an open sibling PR takes the remaining headroom. Drop the delegation-side
comment; the facet body in protocol-record-reads.ts already says what
`caller` decides. No behaviour change.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfr1xZSFZzCR8HnqXX
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi8zDwpH6wX7ZPUcHR

席位核对

L1 delta review (main merge + line trim) · ACCEPT; landing waits on gates · Head-sha: d0668d12a8e6ec3a02a2efd20560e87fa6f90cba · card #34699 rows 1, 3, 4, 5 · read 2026-11-17T17:11Z

This reviews the delta from L1 6953842787 (delta ACCEPT at 1130a716). It has two parts:

  • Main merge aaffb2ca. The PR's net diff over its files, from merge-base to 1130a716, is line-identical to main..aaffb2ca. The merge moved no hunk of this PR.
  • d0668d12. It deletes the PR's one-line comment on the private assertRecordExists delegation in packages/metadata-protocol/src/protocol.ts. The facet body in protocol-record-reads.ts still carries the same explanation. protocol.ts now changes by +3 / -3 against main (11694 lines), so this PR adds no line to the facade. feat(i18n): a dependent package's fieldPatches text is translated from that package's own translations #34784 (which takes the file to exactly its 11705-line ceiling) and this PR can then land in either order without turning check:facade-delegation-only red. There is no behaviour change.

There is nothing new to review. The rerun on 1130a716 came back green, per the area. That covers the two Test UI shards L1 flagged as unrelated.

Gates at this head: CI was still running when this was read (24 of 47 checks in progress, none failed). This ACCEPT does not stand in for green.

Owed, for the seat: your contract review on the post-S1 code, if it has not been posted yet. This delta adds no code to it. This comment readies, queues and arms nothing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfr1xZSFZzCR8HnqXX

Red read · PR #34811 · head d0668d12 · CI run 44133621775 · 2026-11-17T17:33Z

Test UI (10/16) never reached its tests. The step "Fetch this commit's history and the base branch" (scripts/ci/fetch-history.sh, git fetch --unshallow) timed out after 14 minutes on its first attempt, and the runner reaped the orphaned git-remote-https. The Test UI aggregate is red only because of that shard. This is a runner fetch timeout, not this PR. It is the same failure #34719 hit at 17:00Z, and that PR's rerun went green. It is a different shard from the two re-run at 1130a716. The failed jobs are re-run once when the run completes. A second failure gets read again, not re-run.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d0668d12a8e6ec3a02a2efd20560e87fa6f90cba
Local-runs: none
Scope: packages/spec/src/system/operation-message.ts + packages/core/src/utils/operation-user-message.ts, packages/core/src/utils/record-not-found.ts, packages/core/src/index.ts, packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts, packages/plugins/plugin-approvals/src/lifecycle-hooks.ts, packages/plugins/plugin-approvals/src/payload-predicate-guard.ts, packages/plugins/plugin-audit/src/parent-field-query-guard.ts, packages/services/service-analytics/src/field-read-admission.ts, packages/runtime/src/action-execution.ts, packages/runtime/src/action-dispatch.ts, packages/metadata-protocol/src/protocol-record-reads.ts, packages/metadata-protocol/src/protocol.ts, packages/metadata-protocol/src/protocol-batch-data.ts

Delta review over the seat's full contract review 6953960778 (PASS at head 1130a716e03ac4a5d701a143b5e821b892f9e104), whose judgments are the baseline and are adopted here except where a line below says otherwise. Read 2026-11-17T17:36Z. Inputs: card #34699 with all 8 comments (none newer than the baseline), the PR body, the net diff against main d576509c80575197b3218aeb1f55884e5ed06ea6 (43 files, +784 / -64), the check-runs on this head. The remainder of the diff (tests, the one-argument call sites, the two docs examples, the changeset) stays the lane seat's ACCEPT.

The hop 1130a716 to d0668d12 is two commits, both read:

  • aaffb2caaf, a merge of origin/main d576509c into 1130a716. Its tree is 0c9c7c3e024f944e377a6e27e928e84cf35f71c5, and git merge-tree --write-tree 1130a716 d576509c (object arithmetic only, no worktree) gives the same tree with exit 0. The merge is conflict-free and carries no hand edit.
  • d0668d12, one deletion in packages/metadata-protocol/src/protocol.ts: the comment line [#34699] caller is the row's write context … above the assertRecordExists host. No code token moves.
  • Cross-check: the changed lines of the net diff at the baseline (7752cac7..1130a716) and at this head (d576509c..d0668d12) differ by that one comment line and nothing else. The PR's net effect on protocol.ts is now +3 / -3, zero lines added.

① Derived judgments

Unchanged from the baseline, each still right on this head: the catalog gains three keys in four locales and moves no existing text; @objectstack/core gains operationUserMessage, type UserMessageCaller and an optional third parameter on recordNotFoundError; the four refusals gain one wire key, userMessage, with code, status and message byte-identical; no narrowing; existence hiding holds in text and in language; every marking reads its locale off the operation's execution context alone.

  • The hop adds no accept-set or public-surface change of its own: a deleted comment publishes nothing.
  • Main's carried-in changes (22 commits, 7752cac7..d576509c) against this PR's surface: one commit, aa0fde3ddf (feat(flow designer): the publish checks show before the publish, worded for the builder #34850), touches a file of this diff, protocol.ts, in the draft-publish host and the getMetaItem / readMetaItem request types. Those hunks are disjoint from assertRecordExists and from the @objectstack/core import line, and share no symbol with it. Across the whole of main's delta, no added or removed line names recordNotFoundError, operationUserMessage, UserMessageCaller, refuseDeniedSubjectLoad, assertRecordExists, the four predicate-refusal builders, userFacingDenialMessage, denialLocalesOf, BUILTIN_OPERATION_MESSAGES, renderOperationMessage, the three new keys or RECORD_NOT_FOUND. So main brings no new caller that would pass no context, no new producer of these refusals, and no new pin of their shape. The userMessage that feat(flow designer): the publish checks show before the publish, worded for the builder #34850 adds is RuntimeAuthoringIssueSchema.userMessage on the authoring-diagnostics path, a different envelope from the data-door refusals here; the two do not meet.

② Semver level

Clause-②: yes (widening). Unchanged on the PR body and in the changeset, with Metadata-protocol: none; the hop touches neither the changeset nor anything published, so patch on the same 11 packages still matches the diff. Check Changeset: success on this head.

③ Boundary flags

  • Dev flags and open_questions: none new since the baseline (the newest report, 6953246841, carries open_questions: []); the baseline's answers stand.
  • The reason for commit d0668d12 (keep protocol.ts at its check:facade-delegation-only ceiling after main's feat(flow designer): the publish checks show before the publish, worded for the builder #34850 grew the file): consistent with the tree, where the PR now adds no line to the file, and the lint jobs that run the repo gates are success on this head.
  • SQL push-down: the hop adds no query, no id materialisation and no in-app join. Nothing to find.
  • Gates as concluded on this head (run 44133621775 and its siblings; 70 check-runs: 58 success, 10 skipped, 2 failure, 0 pending). Success: every Lint · job and Lint & Repo Gates, every Type Check · job, Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, Build Core, Build Docs, Build UI Deps, Build & E2E UI, Live E2E UI, Check Documentation Links, Dogfood Regression Gate, Test Core 1 through 10 of 10, and 15 of 16 Test UI shards. The two shards red at the baseline head, Test UI (3/16) and (11/16), are success here.
  • NOT green: Test UI (10/16) is failure, and so the Test UI roll-up. Read in the job log: the step Fetch this commit's history and the base branch (scripts/ci/fetch-history.sh, attempt 1 of 3 of a git fetch --unshallow) timed out after 14 minutes; every later step, the shard's test run included, is skipped. No test of that shard ran, so the shard is unmeasured on this head, neither a pass nor a test failure, and nothing in it points at this diff. This PASS is the design verdict and does not stand in for it: landing waits on a re-run of Test UI (10/16) concluding success on this same head. A red there after the tests actually run is a real failure to read, not a flake.

④ Design judgment

No must-fix, no should-fix.

packages/spec/src/system/operation-message.ts (hits): byte-identical to the baseline head; main's delta does not touch it. The baseline's reading holds unchanged: three placeholder-free keys in four locales, no field, id, object or wire vocabulary, record_not_found one sentence for both causes, query_field_not_readable rendered on the predicate arms only.

Implementing files: twelve of the thirteen are byte-identical to the baseline head in this PR's hunks and untouched by main. The thirteenth, protocol.ts, loses a comment and gains main's unrelated hunks; assertRecordExists(object, id, caller?) still hands caller to the moved body in protocol-record-reads.ts, and both bulk call sites in protocol-batch-data.ts still pass the row's write context. The deleted comment's content is still stated where the body lives, so no contract sentence is lost. The hop changes no judgment of the baseline.

Nits carried from the baseline, unchanged and still open as accepted deviations (no effect on correctness or the contract; a fix in these files moves the head):

  • N1 (nit) — the jsdoc bullet for query_field_not_readable in operation-message.ts names plugin-security alone and says "aggregates"; four producers render the key and none marks the aggregate role. Fold into the next edit of that block.
  • N2 (nit) — a deployment errors.KEY override reaches the security middleware's markings only; producers on operationUserMessage render the built-in text. Stated in the helper's docblock and the changeset; a follow-up card.
  • N3 (nit) — UserMessageCaller is object, and the helper re-reads the rungs userTextLocalesOf already returns. A tidy-up for a later touch.

Implemented-by: claude/project-thread-0h7006
Reviewed-by: session_01WGufzgh1zkZzDXL36ckWAG

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfr1xZSFZzCR8HnqXX

Landing · PR #34811 (card #34699, p1) · head d0668d12a8 · 2026-11-17T18:16Z

  • Records: L1-e ACCEPT 6953842787 and the seat's contract review PASS at 1130a716 (L1 REWORK 6949320766 closed: S1 caller param, N1 Clause-② widening, N2 assertRecordExists). aaffb2ca is a clean merge of origin/main (K was 22, no generated path of this PR). d0668d12 deletes the delegation-side comment line in packages/metadata-protocol/src/protocol.ts, so the PR adds no line to that facade file (ceiling 11705, ruling 6897467376; main now sits at 11705 after feat(i18n): a dependent package's fieldPatches text is translated from that package's own translations #34784). L1-e delta ACCEPT 6955263624 and seat delta contract review PASS 6955934775, both at d0668d12.
  • check-governed-merges.mjs --pr 34811: NOT governed (0 of 43 paths on the register), +784 / -64. Clause-②: yes (widening), not a narrowing, so there is no battery gate. CI at d0668d12: 60 success, 10 skipped, 0 failed, after one rerun of Test UI (10/16) (runner history-fetch timeout, red read 6955830030). K is 11.
  • Textual overlap with fix(audit): a search the server widens never names a column the caller may not query #34817 (security, another agent's) on plugin-audit parent-field-query-guard.ts was flagged to the seat earlier. Whichever lands second merges main.
  • Readied and auto-merge armed in this stroke.

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 protocol:system size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants