Repository navigation
fix(mcp, lint): create_record and update_record over stdio answer droppedFields and no longer echo a dropped value; a flow write to a roll-up summary field draws a warning - #35807
Conversation
…nd echo no dropped value Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…ors; changeset for the stdio droppedFields answer Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check8 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin f7bad6e656a20564f1dff73dedeff7f01e255856 && git checkout f7bad6e656a20564f1dff73dedeff7f01e255856
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1d7015aeeaa942c37af86c3c93d000fab7024880 6946a720608e3b13ff69b5ca967d536cf5ca24df && git checkout -B drift-repro 1d7015aeeaa942c37af86c3c93d000fab7024880 && git merge --no-ff 6946a720608e3b13ff69b5ca967d536cf5ca24df
node scripts/docs-audit/affected-docs.mjs --json 1d7015aeeaa942c37af86c3c93d000fab7024880 |
…true draws the flow-update-summary-field warning Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
…os lint --strict note Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH Seat checkL1: ACCEPT (L1-a, for area d7-B) at head
Declarations
Code
Tests and controls
Prose, sentence by sentence
Nit (not owed)
Gates and routingAfter CI is green at Generated by Claude Code |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract-review-claim: session_01L9qibwJEh7hMPPvagWM1g7 · head e9c4f91 · 2026-11-20T10:22Z The L2 is owed at |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: This is the L2 owed by the Security-touching is Check-runs on the head, read at 10:27Z: 29 success, 16 skipped, 31 in progress (Build Core, Test Core 1-10, Test UI 1-16, Type Check workspace, consumer and UI, Lint lanes, Check Changeset, Build Docs, E2E UI). None is red. This verdict assumes the in-progress runs finish green; a red one voids it. ① Derived judgments
② Semver level
③ Boundary flagsDev report 7035378530:
Dev report 7036824115:
Dev report 7037040186:
SQL push-down: no finding. The bridge adds no id materialisation, no extra read and no in-app join; Findings:
S1 (should-fix) — the changeset's account of where the new warning bites omits Implemented-by: VERDICT: PASS |
…dvisories for the roll-up warning Claude-Session: https://claude.ai/code/session_01L9qibwJEh7hMPPvagWM1g7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-tesla · session_01L9qibyQBB3KuDoNobNq9LH Seat check (delta)L1: ACCEPT (L1-a, for area d7-B) at head Two conditions remain:
Correction to my ACCEPT 7037086085I wrote that the finding left " The delta (2 files, +5 / −3, prose only)
Gates and routingThe prose and changeset families exit 0 (55 of 56; Generated by Claude Code |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Contract reviewServed-tier: This is the delta review of record 7037237162, which reviewed head
① Derived judgmentsEach new sentence, checked against the code:
② Semver levelUnchanged and right:
The round adds prose only, so nothing it changes is published as code. ③ Boundary flags
No must-fix, no should-fix. S1: closed Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-tesla · session_01L9qibwJEh7hMPPvagWM1g7 Landing · 2026-11-20T11:06Z · head
State: |
Requested by Tesla · project thread
Fixes #35114
Clause-②: yes
Metadata-protocol: none
维护者速读
What changes
N1 — the stdio MCP bridge reports the drop.
packages/mcp/src/stdio-data-bridge.ts:createandupdatenow pass anonFieldsDroppedlistener toengine.insert/engine.updateand answerdroppedFieldsexactly as the protocol'screateData/updateDataanswer it behind the HTTP bridge: the engine's events as emitted, present only when at least one key was dropped (droppedFieldsMember).recordno longer echoes a dropped caller value (withoutDroppedKeys): oncreatethe payload fills only keys the write result omits and the engine did not drop; onupdatethe read-path row stands for every dropped key.update_recordansweredbiggest: 99andlocked: 'forged'over the stored5and'kept'.McpDataBridge.create/updatereturnunknown, and the tool answers the object as JSON. The member added is the oneCreateDataResponseSchema/UpdateDataResponseSchemaalready declare for the HTTP answer. Output addition only; no tool input changes.N2 — the two missing doors are named in
content/docs/data-modeling/fields.mdx(the summary paragraph's door list). Measured onorigin/mainef39b2c191by reading:packages/rest/src/form-routes.ts): the context is{ publicFormGrant, permissions, anonymous }, neverisSystem, socreateDataruns the engine's insert strip; the answer is{ id, fields? }only (rest(public forms):POST /forms/:slug/submitanswers the anonymous submitter with the whole stored record, so any field a hook derives from existing data (a duplicate match, an owner) reaches the internet #22437), so the drop is not shown to the submitter (public-form-submit-answer.test.tsalready pins thatdroppedFieldsdoes not reach the answer);overrides(packages/metadata-protocol/src/protocol-data-crud.tscloneData): the source copy omitssummaryfields,overridesare assigned after that, and the insert runs with theonFieldsDroppedlistener, so a roll-up set throughoverridesis dropped and named in the clone'sdroppedFields.The paragraph also says the MCP door covers create and update over HTTP and stdio. Triage 6969043738 ruled that N2 must not edit the consumed
.changeset/34672-*; this PR does not touch it, and the new changeset does not restate the 18.6.0 entry (see Acceptance notes).N3, docs half —
content/docs/protocol/objectql/security.mdx. The staticreadonlysection now names the implicit roll-up lock: everysummaryfield is read asreadonly: trueon create and update, dropped and reported underreadonly, refused understrictReadonlyWrites, and that includes a flow'screate_record/update_recordwithoutrunAs: 'system'. Rule 1 (system context) still lets seed data, package installs and the recompute write it.N3, lint half — a warning, by the area ruling (claim amendment 7035408057, option B). In
packages/lint/src/validate-readonly-flow-writes.ts, acreate_record/update_recordnode that does not run asrunAs: 'system'and writes asummaryroll-up that does not declarereadonly: truenow drawsflow-update-summary-field(FLOW_UPDATE_SUMMARY_FIELD) atwarning. Its message says the engine drops the value on create and update alike, and its hint names the node to remove the field from.summaryFieldIndex(stack)over the objects as served. The sharedbuildReadonlyIndexand the hook and action readonly rules are unchanged.readonly: truestill takes the static branch, so it is stillflow-update-readonly-fieldaterror. The same two gates as that branch hold:runAs: 'system'is not reported, and a create on an insert-strip-exempt object (sys_, platform-internalmanagedBy) is not judged.@objectstack/lintbarrel (index.ts), andos explain flow-update-summary-fieldhas an entry inrule-explanations.ts. Both files are outside the claim's file surface; the rule-explanations test requires every entry to be a barrel-exported id.security.mdxnames the warning..changeset/35114-stdio-mcp-dropped-fields.md:@objectstack/mcppatch and@objectstack/lintpatch. UnderClause-②: yes, per claim amendment 2 (7036853719): the new warning code and the new@objectstack/lintexport widen the public surface, following the precedent of thefield/missing-value-domainchangeset. No build fails. Like every warning, it makesos validate --strictandos lint --strictexit 1, with no per-rule switch. The metadata save and publish answers carry it underadvisoriesand never refuse on it: on a flow save whose user-run node writes such a roll-up, and on an object save that makes a field such a roll-up while a live user-run flow of the same package writes it. Read in the tree:validate.ts(--stricttreats warnings as errors;strictFailingcounts every non-infofinding),authoring-rules.ts(validateReferenceIntegrity,commands: ALL), andreference-integrity-suite.ts(validateReadonlyFlowWrites,runtimeTypes: ['flow', 'object'],subjects: ['flows']). Inruntime-gate.ts, a non-error finding goes toadvisories, on the subject pass too.security.mdxnames both--strictruns beside "never blocks a build".Tests
packages/mcp/src/stdio-data-bridge.dropped-fields.test.ts(new): a realObjectQLover a row-keeping driver, the real stdio bridge, driven through thecreate_record/update_recordtools:readonly: truecolumn and amaxroll-up, both sent, are named indroppedFields(reasonreadonly), and neither value is inrecordor stored; control: a create sending neither answers nodroppedFields;recordcarries the stored'kept'/5, and the store is unchanged; control: an update sending neither answers nodroppedFields.packages/lint/src/validate-readonly-flow-writes.test.ts, a new top-leveldescribefor the roll-up:create_recordandupdate_record, a user-run write of the roll-up draws exactly one finding:warning,flow-update-summary-field, the exact path andwhere; the message says both verbs, on one line of at most 200 characters;readonly: truefield (a roll-up and a text field) is stillflow-update-readonly-fieldaterror; a non-summary field draws nothing; arunAs: 'system'write of the roll-up on either verb draws nothing;os explainentry names both verbs and says it never blocks a build.Reverse verification and ablations (one-off, not kept)
stdio-data-bridge.tstoef39b2c191(blob5cf5d500c8, hash-checked before the run; restored withgit checkout HEAD --, blobbd2c6d16c6equal to HEAD,git diff HEADempty):Tests 2 failed | 2 passed (4). The two pins were red (expected [] to deeply equal [ 'dfx_acct.biggest:readonly', … ]) and the two controls green.scripts/ablation-replace.mjs(anchor 1 to 0, blobbd2c6d16c6to3d2bfef8e1, restored equal to HEAD):update_recordwent red withbiggest: 99/locked: "forged"received;Tests 1 failed | 3 passed (4).bd2c6d16c6toc70446bc08, restored equal to HEAD): stayed green,4 passed. The real engine's write result names every declared field (nullwhere nothing was stored; a probe printed the result's keys), so on create the result already overwrites the echo. The create-side guard covers a write result that leaves such a key out; the test header says so.} else if (summaryFields?.has(fieldName) && !isSystemRun) {prefixed withfalse &&; blob848807de9cto546efd3591, restored equal to HEAD): both verb pins red,Tests 2 failed | 61 passed (63), every control green.848807de9cto92cb50ff77, restored equal to HEAD): bothrunAs: 'system'controls red,Tests 2 failed | 61 passed (63).Acceptance notes
CHANGELOG.mdentry is amended in that entry, in a dedicated docs-only PR. So the 18.6.0 door list is not restated here; amending the released@objectstack/objectqlentry is a separate docs-only PR if the seat wants it.userTextParamsand no.user-text.tscatalog entry. A finding without them has no user sentence, so a save door shows its developermessage(finding-user-text.ts: "a finding withoutuserTextParamssimply has no user sentence"). Translating it into the eleven platform locales is not in this card.warnings,withheldMentionsandnoticemembers. That is part of the divergence the bridge's header already lists ("spec-shaped receipts"). Not widened here.withoutDroppedKeyscomment says astored_expressionkey's value comes from the write result. That holds on create; on update the bridge answers the value read before the write. That is no worse than before, when the caller's own value was echoed.message.Verification
pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/stdio-data-bridge.dropped-fields.test.ts. ExpectTests 4 passed (4). Thenpnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-readonly-flow-writes.test.ts. ExpectTests 63 passed (63).packages/mcp/src/stdio-data-bridge.ts(create/updateand the two helpers abovecreateStdioDataBridge), then the roll-up branch inpackages/lint/src/validate-readonly-flow-writes.ts(summaryFieldIndexand theelse ifbefore thereadonlyWhenbranch), then the two new test blocks.Local gate readings
Gates at head
d416d0fd72, in worktreeobjectstack-issue-35114of objectstack-ai/objectstack; branch baseef39b2c191.pnpm --filter '@objectstack/lint...' --filter '@objectstack/mcp...', thenpnpm --filter @objectstack/lint test:Test Files 222 passed (222),Tests 9343 passed (9343). Thenpnpm --filter @objectstack/lint typecheck: tsc clean,check:test-typecheck: OK. One lock run,VERDICT command-exit 0.@objectstack/mcp(source unchanged sincea2176dc97d):pnpm --filter @objectstack/mcp testgaveTest Files 81 passed (81),Tests 1447 passed (1447), and typecheck was clean, ata2176dc97d.dispatch-gates --commands, 100 families for these 9 paths), exit code captured before any pipe:packages/lint/distwas not built; they were rerun after the build and exited 0.check:type-check-debtfirst missed its lock turn; it was rerun under the lock and exited 0.pnpm --filter @objectstack/spec run check:skill-examplesandpnpm check:dual-build-cjs-loads.dispatch-gates --ran:100 derived famil(ies) accounted for — 98 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).node scripts/pm/overlap-check.mjsbefore each push:VERDICT clean exit 0.6946a72060:dispatch-gates --commandsfor the changeset andsecurity.mdxgave 56 families. 55 exit 0. One exit 3, NOT MEASURED:check:skill-examples, with nopackages/client*/dist.--ranaccounted for all 56.overlap-checkgaveVERDICT clean exit 0.test:repoand the repo-wide scans belong to CI and were not run locally.Generated by Claude Code