You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp: one read that answers "each X with its latest Y" and reads several related objects, in place of a chain of calls the client stitches #35145
Filing gate: ④ a child of the cross-lane parent #34659 (the 「MCP 二期与问数」 epic), filed on the maintainer's word in this session's chat, 2026-11-18, verbatim: 「你要评估,云端哪些要迁移到开源项目,相关卡片要么关闭要么等待」, after 「开源项目能做的尽量在开源项目做,云端等开源项目完全优化好再开工」. Source of the inventory: a reading of the hosted tree at cloud main 0aabf9aa against this repository's main b1eb500d, 2026-11-18. The open repository's agents cannot read the hosted tree, so what each item does is written here.
Why
"Each sales rep's latest deal" needs, today, one query per rep or a client that sorts and deduplicates rows itself. Clients get it wrong quietly: they take the first page, or the latest row overall.
Who acts: the server lane (packages/mcp, the engine's read path). Reader: every MCP client asking a per-group-latest or a joined question.
Evidence
The hosted ask tools carry a latestPer form on their record read and a read that returns several related objects in one call; the open MCP tools have neither (packages/mcp/src/mcp-http-tools.ts:2907-3124).
The hosted ask set has two question kinds for exactly this (owner_latest, join), 9 of 56 questions.
Scope
Reading first: what the engine can already do in one statement (a window or a semi-join) for "latest per group" and for a parent with its children, and through which existing query members.
Then expose it on the open door as one bounded read, under the caller's row and field security, with the same row cap and truncated contract as query_records.
No slower path for a driver that cannot: a stable refusal.
First touch: p2 · domain:server · pm:queue. It is a new capability inside epic #34659, filed on the maintainer's 「开源项目能做的尽量在开源项目做,云端等开源项目完全优化好再开工」 (cloud#4842 comment 6971980045). Grading principle of 2026-11-18, item 5: new capability, p2, the grade its in-flight siblings carry; the grade of the epic's children is with the maintainer.
The card requires the read to run under the caller's row and field security, with the query_records row cap. The reviewer checks that bound before ACCEPT.
Claim: PM loop round 1 (area o1-D, repo:objectstack#1; seat 1 assigned this #35159 child to this area on the maintainer's 2026-11-18 priority word 「#35159 问数底座 这个子专题优先,其他专题不再接新卡」) · 2026-11-18T08:58Z
Session: session_01JQwxbaX2qDxUq9sF93EqqL
Account: os-warren
Branch: claude/issue-35145-mcp-latest-per-and-related-read
Worktree: objectstack-issue-35145
Domain: domain:server
Seat: repo:objectstack#1
File surface: reading phase: none written. Build phase: packages/mcp/src/** (one bounded read on the open MCP door), packages/objectql/src/** and packages/drivers/*/src/** only where the engine's existing query members need a driver push-down or a stable refusal, their tests, examples/app-crm pins, docs, one changeset. A change to packages/spec (a new query member) is out of this lane: the dev stops and reports it as a fork. Stop on breach and report
Container & model: M, mode:subagent, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
Clause-②: yes (widening): a new read form on the published MCP tool surface. Judged from the card content; the build confirms it
Metadata-protocol: none
Responsibility: n/a — not a defect card (new capability in epic #34659 / sub-epic #35159)
Thread-read: 6972038283
Premise: unmeasured by construction. The card is reading-first: what the engine already does in one statement for "latest per group" and for "a parent with its children", and through which query members. The build goes ahead only on existing members, under the caller's row and field security, with query_records' row cap and truncated contract, and with a stable refusal for a driver that cannot push it down
Pre-claim lane: packages/mcp, packages/objectql — whole-repo lane (domain:server)
Pre-claim deps: none open. Related, not blocking: #33619 (multi-hop), #33626 (cross-object cap), #35113 (the ask cards that will carry both kinds)
Prior rulings read: the maintainer's words quoted on the card and in triage 6972038283 (bound: caller's row and field security, the query_records cap); the sub-epic priority word above
Serial constraints cleared: no open PR touches packages/mcp/src/. Siblings #35137 and #35144 in the same sub-epic (seat's area o1-C, not yet claimed) will very likely touch packages/mcp/src/mcp-http-tools.ts too. Whichever pushes second merges main and re-runs the overlap check, and the dev re-reads their claims before pushing
{
"issue": 35145,
"status": "done",
"branch": "claude/issue-35145-mcp-latest-per-and-related-read",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35199",
"session": "session_01JQwxbaX2qDxUq9sF93EqqL",
"premise_still_valid": true,
"summary": "PR 1 of 2 for #35145: query_records takes latestPer {by 1..3, orderBy 1..3} and answers one row per group. Ties go to id in the direction of the last key; an empty order value ranks last. The request rides an in-process symbol through runtime callData and protocol findData into engine.find; it is never a wire or query key, and spec is unchanged. The engine refuses the request before any read for: a driver outside the allowlist (driver-sql, sqlite-wasm, Turso local/replica), a federated object, an afterFind hook, object middleware, and computed, JSON, multi-value or dotted fields. Partition and order keys join the judged orderBy, so FLS judges them. The directive attaches only on the composed AST at the executor boundary. driver-sql adds an id IN (ROW_NUMBER over the tenant-scoped, where-filtered select, rn=1) predicate, and findWithWindowFunctions is not used. limit counts groups; there is no total. truncated: true comes from #35185's servedQueryPage, reused from main: the door reads its own +1 group and answers hasMore. Per the seat's updates, the branch merged #35185's branch and then origin/main after it landed (c787255a49), with no rebase. Deviations: (1) scripts/check-tenant-chokepoint.mjs gained a one-line DECLARED_WATCH_HINTS entry for the new sql-driver-latest-per.ts module, which the gate's self-test demands; this is outside the amendment's file surface. (2) A sqlite-wasm test file under packages/drivers/driver-sqlite-wasm pins the allowlisted driver. (3) The PR body says 'Part of #35145' where the dispatch said 'Refs #35145'; os-dev.md names Part of as the non-closing form, and neither closes the card. Overlap: the open PRs #35179 (o1-C withheldFields) and #35193 conflict in packages/mcp/src/mcp-http-tools.ts; whoever lands second merges main.",
"tests": "Final head 303482dda2b, under os-verify-lock, VERDICT command-exit 0: mcp full suite 73/73 files, 1292/1292 tests. objectql latest-per + federated-injected-column-readers: 28/28. driver-sql sql-driver-latest-per: 16 passed, 1 skipped (SQLite and a local Postgres 16 cell at Asia/Shanghai; MySQL NOT MEASURED, no server here; CI's live-dialect job runs it on push and schedule). driver-turso remote refusal: 2/2. driver-sqlite-wasm: 2/2. metadata-protocol findData latest-per: 5/5. dogfood latest-per-over-mcp: 7/7, with armed controls for a real two-org wall, the hidden row being newest at rest, and the RLS binding. Full suites of all 7 touched packages ran at 837e5b6bb38, before the two merges: driver-sql 5567 passed/131 skipped; metadata-protocol 23187 passed; driver-turso 2565 passed; sqlite-wasm 768 passed; runtime 11546 passed; objectql and mcp each had 1 ledger failure (the federated-reader and stdio read-site ledgers), both declared in this branch and green on the final head. Ablation at a40fc2c4ce8 (driver code unchanged since): ablation-replace changed the latestPer guard in sql-driver-crud.ts to '&& false' (anchor 1->0, blob ddd18cc->453444f). The driver test went red, 5 failed / 3 held; the 3 that held are the tenant wall, the control and the malformed directive, which do not depend on the predicate. Restored blob == HEAD and git diff HEAD empty. driver-sql test imports src, so no dist build was involved.",
"gates": "dispatch-gates --commands at 303482dda2b: 124 families, all run locally, each exit captured before any pipe, all 0. check:type-check-debt was re-run under the lock (the first try was a queue-timeout behind my battery): OK, 0 tsc errors. check:pm-dispatch-gates exit 0 at d8341c37620; its inputs are unchanged since. --ran reconciliation: 124 derived, 124 run, 0 unrun. check-platform-checklist --changed-from origin/main: OK, 0 anchors lost. Fixed along the way: check:dispatcher-error-vocabulary (refusal helper now stamps literal codes), check:query-options-erasure (typed BaseEngineOptions instead of as any), check:tenant-chokepoint (declared hint), check:test-source-alias (module-top @objectstack/lint import). PR check-runs: in_progress at report time, not awaited.",
"dogfood_battery": "303482dda2b · os-verify-lock VERDICT command-exit 0 (held 48m55s) · Test Files 481 passed, 3 skipped (484) · Tests 4132 passed, 18 skipped (4150) · no failures (run although the title has no ! and the Clause-② arm is widening, because the dispatch asked for it)",
"mcp_calls": "0",
"api_writes": "3 — via the fleet-write relay: POST /repos/objectstack-ai/objectstack/pulls (draft #35199), POST /repos/objectstack-ai/objectstack/issues/35199/assignees (os-warren), and this os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35145/comments; plus git push (not REST)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
{
"issue": 35145,
"status": "done",
"branch": "claude/issue-35145-mcp-related-read",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35225",
"session": "session_01JQwxbaX2qDxUq9sF93EqqL",
"premise_still_valid": true,
"summary": "PR 2 of 2 for #35145 (Fixes #35145). query_records gains expand: up to 3 lookup/master-detail/user/tree fields of the queried object, one level, judged against the object as the caller is served it; resolved through findData and the engine's existing expansion path (one batched id IN read per field via engine.find, target's own permissions/RLS/FLS); combines with latestPer. get_record gains related: up to 3 strict entries {object, field?, fields?, orderBy?, limit?} (no caller filter); link field inferred when the child has exactly one reference to the parent; record read first, then each list is one query_records-shaped bridge read filtered only by the parent link ($contains for multi-value), capped at min(20, maxQueryLimit) with a limit+1 probe through the shared servedQueryPage (truncated: true). Rule: every object expand or related reaches passes the MCP read guard; a refused target refuses the whole call with PERMISSION_DENIED/403 before any read (new module packages/mcp/src/mcp-relation-reads.ts); other pre-read refusals INVALID_FIELD/400, OBJECT_NOT_FOUND/404 (child definition not served), NOT_IMPLEMENTED/501 (no definition member). HTTP bridge forwards expand (runtime domains/mcp.ts, one line); the stdio bridge serves expand built as the data door builds it (stdioExpandMap). #35199 and #35179 landed mid-build and were merged in (no rebase); #35179's withheldFields is applied to the record and to each related list (one call each). Changeset: mcp + runtime patch. Deviation: a related object the member lacks object permission on answers OBJECT_NOT_FOUND (its definition is not served), not PERMISSION_DENIED; pinned and noted in Acceptance notes.",
"tests": "Final head fb450168623. mcp full suite (inside the battery hold): Test Files 76 passed (76), Tests 1374 passed (1374). mcp-relation-reads.test.ts: 26/26. Dogfood related-read-over-mcp: 9/9 (alone after the #35179 merge; also inside the final battery). runtime + mcp typecheck exit 0; runtime MCP test files 22 files / 464 tests passed at e7b33863c37 (runtime unchanged since). Ablation of the target read-guard check (judgeTarget admit line -> admit all, ablation-replace anchor 1->0, blob 75852d2->f0913ec; judgeTarget unchanged since): unit leg 2 failed/23 passed, exactly the two guard pins; dogfood leg through dist (mcp rebuilt, ablation-dist-preflight marker in 2 built files) 1 failed/8 passed, exactly THE RULE pin; restore: blob == HEAD, git diff HEAD empty, dist preflight --absent and whole tree clean.",
"gates": "dispatch-gates --repo objectstack-ai/objectstack --commands at fb450168623: 99 families, all run locally, each exit captured before any pipe: 99 exit 0 after one re-run (check:type-check-debt answered queue-timeout exit 3 behind my battery hold; re-run under os-verify-lock: exit 0, 0 raw tsc errors). --ran reconciliation: 99 derived, 99 run, 0 NOT-MEASURED, 0 UNRUN. Fixed on the way: check:dispatcher-error-vocabulary (refusal helper stamps literal codes). overlap-check at fb450168623: VERDICT clean exit 0 (origin/main and #35193 merge cleanly). No exported symbol renamed or deleted, so check-platform-checklist --changed-from was not owed. PR check-runs: not awaited (in_progress at report time).",
"dogfood_battery": "fb450168623 · os-verify-lock VERDICT command-exit 0 (held 52m02s) · Test Files 482 passed, 3 skipped (485) · Tests 4091 passed, 68 skipped (4159) · no failures (run on the dispatch's order; no ! and a widening arm). An earlier battery at c0e19020664 had one 5 s timeout in bare-name-one-holder-flow-family.dogfood.test.ts (unrelated install-local test, box loaded by the concurrent gate sweep); that file alone re-ran 16/16 green.",
"mcp_calls": "0",
"api_writes": "3 — via the fleet-write relay: POST /repos/objectstack-ai/objectstack/pulls (draft #35225) with its assignee leg POST /repos/objectstack-ai/objectstack/issues/35225/assignees (os-warren); and this os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35145/comments; plus git push (not REST)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": []
}
{
"issue": 35145,
"status": "done",
"branch": "claude/issue-35145-mcp-related-read",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35225",
"session": "session_01JQwxbaX2qDxUq9sF93EqqL",
"head": "977e416ad0a",
"premise_still_valid": true,
"summary": "Rework round for #35225, new head 977e416ad0a (0e7914f180e plus a merge of origin/main, no rebase). M1: the query_records expand text now says only a field whose object this door does not serve refuses the call, and that a record the caller may not read on a served object is not expanded and keeps its stored id. Docs and changeset say the same. A dogfood pin covers crm_activity.contact onto crm_contact (guard-admitted, unreadable by the member): the call is answered, the field holds the stored id, there is no contact data, and the account on the same rows still expands. (a) Each related list now carries the same delegation-narrowing notice query_records adds (diagnoseDelegation on the child object, then withDelegationNotice; a failed diagnosis leaves the list as is), with 2 unit pins. (b) The two stdio-bridge docblock lines have their ' * ' prefix back. (c) The unit count is now 28 everywhere in the body. M2: PR-body guards is success on 0e7914f180e and on 977e416ad0a. CI verdict for Test Core (9/10) on 3d6e7691fe: the failure was THIS PR's. The repo pin packages/core/src/security/second-object-read-exposure.pin.test.ts requires every non-test caller of referenceTargetOf to be classified, and the two new callers (stdio-data-bridge.ts stdioExpandMap, mcp-relation-reads.ts) were not. Fixed in 0e7914f180e by classifying them: stdioExpandMap is decided/get, pinned by mcp-relation-reads.test.ts; mcp-relation-reads.ts executes and is decided in protocol-query-validation.ts. Test Core 9/10 is success on 0e7914f180e and 977e416ad0a, and CI was not re-run. PR body: not PATCHed by me (os-dev forbids a subagent PATCH; the dispatch asked to update it). The full replacement body is at /tmp/claude-0/-home-user/83e4c799-6343-563a-a13e-0223174ca760/scratchpad/issue-35145/pr-body-r2.md for the seat to apply.",
"tests": "At 977e416ad0a under os-verify-lock (VERDICT command-exit 0): mcp src/mcp-relation-reads.test.ts Tests 28 passed (28); dogfood related-read-over-mcp (10) + latest-per-over-mcp (7) Test Files 2 passed (2), Tests 17 passed (17); core --project repo second-object-read-exposure.pin.test.ts Tests 4 passed (4); @objectstack/mcp typecheck (tsc --noEmit + check:test-typecheck OK) exit 0. At 0e7914f180e: core --project repo 8 files / 108 tests passed; spec test:repo 91 files / 1558 tests passed; runtime/objectql/rest/types test:repo all passed. At 3d6e7691fee: mcp full suite 76 files / 1376 tests passed. No ablation this round: judgeTarget is unchanged, and the round-1 ablation (unit 2F/23P, dogfood via dist 1F/8P, restore verified) still stands. Dogfood battery not re-run: the rework touches mcp package code/text, docs, changeset, one dogfood file and one core repo pin, and the two dogfood files that read it ran above.",
"gates": "dispatch-gates --commands at 977e416ad0a: 101 families (the same list as at 0e7914f180e). All 101 ran locally, each exit captured before any pipe, all exit 0. check:skill-examples and check:dual-build-cjs-loads first answered exit 3 (PREREQUISITE NOT MET) at 0e7914f180e; they are exit 0 after building client-react, embedder-openai, knowledge-memory, knowledge-ragflow, scenarios and studio, plus spec, whose dist had been emptied in this worktree. --ran with exit codes: '101 derived, 101 run, 0 NOT-MEASURED (a DERIVED zero)', exit 0. CI check-runs on 977e416ad0a: 70 completed, 60 success, 10 skipped by selectors, 0 failure. PR-body guards (claim · duplicate · Part-of · single-writer path) success; Check Changeset success; Test Core and shards 1-10 success; Lint & Repo Gates and its Lint · lanes success; Dogfood Regression Gate success. overlap-check at 977e416ad0a: VERDICT overlap exit 1. origin/main (f2078e36743, an unrelated plugin-detail commit not merged in) merges cleanly; #35193 now conflicts in packages/mcp/src/stdio-data-bridge.ts (it changed since round 1), and the second of the two to land resolves it.",
"dogfood_battery": "n/a this round: no ! in the title and no (narrowing) arm (Clause-②: yes (widening)); last full battery at fb450168623: 482 passed / 3 skipped files, 4091 passed / 68 skipped tests",
"mcp_calls": "0",
"api_writes": "1 — POST issue comment on #35145 (delta os-dev-report) via post-stamped.mjs and the fleet-write relay; git push of 977e416ad0a is not a REST write",
"open_questions": [],
"deviations": [
"packages/core/src/security/second-object-read-exposure.pin.test.ts is outside the claimed file surface. It was edited because the pin requires every new referenceTargetOf caller to be classified, and that was the Test Core 9/10 failure. The seat should add it to the claim's file surface.",
"The dispatch asked me to update the PR body; os-dev forbids a subagent PATCH. The replacement body is in the scratchpad file named in summary, for the seat."
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #35193 · overlap: conflicts with this branch in packages/mcp/src/stdio-data-bridge.ts; the second to land resolves it · noted, not filed"
]
}
The ask cards that exercise both read kinds are #35113's to carry. Non-blocking nits from the reviews (a list refusal names no entry fields; records nested under expand carry no withheldFields of their own) stay as review notes. This stroke removes pm:dispatched and the lease label and clears the assignee; the domain and priority labels stay.
Activity
objectstack-fleet commentedon Nov 18, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
First touch: p2 ·
domain:server·pm:queue. It is a new capability inside epic #34659, filed on the maintainer's 「开源项目能做的尽量在开源项目做,云端等开源项目完全优化好再开工」 (cloud#4842 comment 6971980045). Grading principle of 2026-11-18, item 5: new capability, p2, the grade its in-flight siblings carry; the grade of the epic's children is with the maintainer.The card requires the read to run under the caller's row and field security, with the
query_recordsrow cap. The reviewer checks that bound before ACCEPT.objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Claim: PM loop round 1 (area o1-D, repo:objectstack#1; seat 1 assigned this #35159 child to this area on the maintainer's 2026-11-18 priority word 「#35159 问数底座 这个子专题优先,其他专题不再接新卡」) · 2026-11-18T08:58Z
Session:
session_01JQwxbaX2qDxUq9sF93EqqLAccount:
os-warrenBranch:
claude/issue-35145-mcp-latest-per-and-related-readWorktree:
objectstack-issue-35145Domain:
domain:serverSeat:
repo:objectstack#1File surface: reading phase: none written. Build phase:
packages/mcp/src/**(one bounded read on the open MCP door),packages/objectql/src/**andpackages/drivers/*/src/**only where the engine's existing query members need a driver push-down or a stable refusal, their tests,examples/app-crmpins, docs, one changeset. A change topackages/spec(a new query member) is out of this lane: the dev stops and reports it as a fork. Stop on breach and reportContainer & model:
M,mode:subagent,model: TIER_DEFAULT(dispatch-gates --tier: no path-derived mandate),effort: highClause-②: yes (widening): a new read form on the published MCP tool surface. Judged from the card content; the build confirms it
Metadata-protocol: none
Responsibility:
n/a — not a defect card(new capability in epic #34659 / sub-epic #35159)Thread-read: 6972038283
Premise: unmeasured by construction. The card is reading-first: what the engine already does in one statement for "latest per group" and for "a parent with its children", and through which query members. The build goes ahead only on existing members, under the caller's row and field security, with
query_records' row cap andtruncatedcontract, and with a stable refusal for a driver that cannot push it downPre-claim lane:
packages/mcp,packages/objectql— whole-repo lane (domain:server)Pre-claim deps: none open. Related, not blocking: #33619 (multi-hop), #33626 (cross-object cap), #35113 (the ask cards that will carry both kinds)
Prior rulings read: the maintainer's words quoted on the card and in triage 6972038283 (bound: caller's row and field security, the
query_recordscap); the sub-epic priority word aboveSerial constraints cleared: no open PR touches
packages/mcp/src/. Siblings #35137 and #35144 in the same sub-epic (seat's area o1-C, not yet claimed) will very likely touchpackages/mcp/src/mcp-http-tools.tstoo. Whichever pushes second merges main and re-runs the overlap check, and the dev re-reads their claims before pushing5 remaining items
objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
os-dev-report
{ "issue": 35145, "status": "done", "branch": "claude/issue-35145-mcp-latest-per-and-related-read", "pr": "https://github.com/objectstack-ai/objectstack/pull/35199", "session": "session_01JQwxbaX2qDxUq9sF93EqqL", "premise_still_valid": true, "summary": "PR 1 of 2 for #35145: query_records takes latestPer {by 1..3, orderBy 1..3} and answers one row per group. Ties go to id in the direction of the last key; an empty order value ranks last. The request rides an in-process symbol through runtime callData and protocol findData into engine.find; it is never a wire or query key, and spec is unchanged. The engine refuses the request before any read for: a driver outside the allowlist (driver-sql, sqlite-wasm, Turso local/replica), a federated object, an afterFind hook, object middleware, and computed, JSON, multi-value or dotted fields. Partition and order keys join the judged orderBy, so FLS judges them. The directive attaches only on the composed AST at the executor boundary. driver-sql adds an id IN (ROW_NUMBER over the tenant-scoped, where-filtered select, rn=1) predicate, and findWithWindowFunctions is not used. limit counts groups; there is no total. truncated: true comes from #35185's servedQueryPage, reused from main: the door reads its own +1 group and answers hasMore. Per the seat's updates, the branch merged #35185's branch and then origin/main after it landed (c787255a49), with no rebase. Deviations: (1) scripts/check-tenant-chokepoint.mjs gained a one-line DECLARED_WATCH_HINTS entry for the new sql-driver-latest-per.ts module, which the gate's self-test demands; this is outside the amendment's file surface. (2) A sqlite-wasm test file under packages/drivers/driver-sqlite-wasm pins the allowlisted driver. (3) The PR body says 'Part of #35145' where the dispatch said 'Refs #35145'; os-dev.md names Part of as the non-closing form, and neither closes the card. Overlap: the open PRs #35179 (o1-C withheldFields) and #35193 conflict in packages/mcp/src/mcp-http-tools.ts; whoever lands second merges main.", "tests": "Final head 303482dda2b, under os-verify-lock, VERDICT command-exit 0: mcp full suite 73/73 files, 1292/1292 tests. objectql latest-per + federated-injected-column-readers: 28/28. driver-sql sql-driver-latest-per: 16 passed, 1 skipped (SQLite and a local Postgres 16 cell at Asia/Shanghai; MySQL NOT MEASURED, no server here; CI's live-dialect job runs it on push and schedule). driver-turso remote refusal: 2/2. driver-sqlite-wasm: 2/2. metadata-protocol findData latest-per: 5/5. dogfood latest-per-over-mcp: 7/7, with armed controls for a real two-org wall, the hidden row being newest at rest, and the RLS binding. Full suites of all 7 touched packages ran at 837e5b6bb38, before the two merges: driver-sql 5567 passed/131 skipped; metadata-protocol 23187 passed; driver-turso 2565 passed; sqlite-wasm 768 passed; runtime 11546 passed; objectql and mcp each had 1 ledger failure (the federated-reader and stdio read-site ledgers), both declared in this branch and green on the final head. Ablation at a40fc2c4ce8 (driver code unchanged since): ablation-replace changed the latestPer guard in sql-driver-crud.ts to '&& false' (anchor 1->0, blob ddd18cc->453444f). The driver test went red, 5 failed / 3 held; the 3 that held are the tenant wall, the control and the malformed directive, which do not depend on the predicate. Restored blob == HEAD and git diff HEAD empty. driver-sql test imports src, so no dist build was involved.", "gates": "dispatch-gates --commands at 303482dda2b: 124 families, all run locally, each exit captured before any pipe, all 0. check:type-check-debt was re-run under the lock (the first try was a queue-timeout behind my battery): OK, 0 tsc errors. check:pm-dispatch-gates exit 0 at d8341c37620; its inputs are unchanged since. --ran reconciliation: 124 derived, 124 run, 0 unrun. check-platform-checklist --changed-from origin/main: OK, 0 anchors lost. Fixed along the way: check:dispatcher-error-vocabulary (refusal helper now stamps literal codes), check:query-options-erasure (typed BaseEngineOptions instead of as any), check:tenant-chokepoint (declared hint), check:test-source-alias (module-top @objectstack/lint import). PR check-runs: in_progress at report time, not awaited.", "dogfood_battery": "303482dda2b · os-verify-lock VERDICT command-exit 0 (held 48m55s) · Test Files 481 passed, 3 skipped (484) · Tests 4132 passed, 18 skipped (4150) · no failures (run although the title has no ! and the Clause-② arm is widening, because the dispatch asked for it)", "mcp_calls": "0", "api_writes": "3 — via the fleet-write relay: POST /repos/objectstack-ai/objectstack/pulls (draft #35199), POST /repos/objectstack-ai/objectstack/issues/35199/assignees (os-warren), and this os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35145/comments; plus git push (not REST)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
os-dev-report
{ "issue": 35145, "status": "done", "branch": "claude/issue-35145-mcp-related-read", "pr": "https://github.com/objectstack-ai/objectstack/pull/35225", "session": "session_01JQwxbaX2qDxUq9sF93EqqL", "premise_still_valid": true, "summary": "PR 2 of 2 for #35145 (Fixes #35145). query_records gains expand: up to 3 lookup/master-detail/user/tree fields of the queried object, one level, judged against the object as the caller is served it; resolved through findData and the engine's existing expansion path (one batched id IN read per field via engine.find, target's own permissions/RLS/FLS); combines with latestPer. get_record gains related: up to 3 strict entries {object, field?, fields?, orderBy?, limit?} (no caller filter); link field inferred when the child has exactly one reference to the parent; record read first, then each list is one query_records-shaped bridge read filtered only by the parent link ($contains for multi-value), capped at min(20, maxQueryLimit) with a limit+1 probe through the shared servedQueryPage (truncated: true). Rule: every object expand or related reaches passes the MCP read guard; a refused target refuses the whole call with PERMISSION_DENIED/403 before any read (new module packages/mcp/src/mcp-relation-reads.ts); other pre-read refusals INVALID_FIELD/400, OBJECT_NOT_FOUND/404 (child definition not served), NOT_IMPLEMENTED/501 (no definition member). HTTP bridge forwards expand (runtime domains/mcp.ts, one line); the stdio bridge serves expand built as the data door builds it (stdioExpandMap). #35199 and #35179 landed mid-build and were merged in (no rebase); #35179's withheldFields is applied to the record and to each related list (one call each). Changeset: mcp + runtime patch. Deviation: a related object the member lacks object permission on answers OBJECT_NOT_FOUND (its definition is not served), not PERMISSION_DENIED; pinned and noted in Acceptance notes.", "tests": "Final head fb450168623. mcp full suite (inside the battery hold): Test Files 76 passed (76), Tests 1374 passed (1374). mcp-relation-reads.test.ts: 26/26. Dogfood related-read-over-mcp: 9/9 (alone after the #35179 merge; also inside the final battery). runtime + mcp typecheck exit 0; runtime MCP test files 22 files / 464 tests passed at e7b33863c37 (runtime unchanged since). Ablation of the target read-guard check (judgeTarget admit line -> admit all, ablation-replace anchor 1->0, blob 75852d2->f0913ec; judgeTarget unchanged since): unit leg 2 failed/23 passed, exactly the two guard pins; dogfood leg through dist (mcp rebuilt, ablation-dist-preflight marker in 2 built files) 1 failed/8 passed, exactly THE RULE pin; restore: blob == HEAD, git diff HEAD empty, dist preflight --absent and whole tree clean.", "gates": "dispatch-gates --repo objectstack-ai/objectstack --commands at fb450168623: 99 families, all run locally, each exit captured before any pipe: 99 exit 0 after one re-run (check:type-check-debt answered queue-timeout exit 3 behind my battery hold; re-run under os-verify-lock: exit 0, 0 raw tsc errors). --ran reconciliation: 99 derived, 99 run, 0 NOT-MEASURED, 0 UNRUN. Fixed on the way: check:dispatcher-error-vocabulary (refusal helper stamps literal codes). overlap-check at fb450168623: VERDICT clean exit 0 (origin/main and #35193 merge cleanly). No exported symbol renamed or deleted, so check-platform-checklist --changed-from was not owed. PR check-runs: not awaited (in_progress at report time).", "dogfood_battery": "fb450168623 · os-verify-lock VERDICT command-exit 0 (held 52m02s) · Test Files 482 passed, 3 skipped (485) · Tests 4091 passed, 68 skipped (4159) · no failures (run on the dispatch's order; no ! and a widening arm). An earlier battery at c0e19020664 had one 5 s timeout in bare-name-one-holder-flow-family.dogfood.test.ts (unrelated install-local test, box loaded by the concurrent gate sweep); that file alone re-ran 16/16 green.", "mcp_calls": "0", "api_writes": "3 — via the fleet-write relay: POST /repos/objectstack-ai/objectstack/pulls (draft #35225) with its assignee leg POST /repos/objectstack-ai/objectstack/issues/35225/assignees (os-warren); and this os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35145/comments; plus git push (not REST)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Claim: PM loop round 1, second branch (area o1-D, repo:objectstack#1) · 2026-11-18T17:09Z. This adds PR 2's branch to the claim 6973844822 and its amendment 6974061928; file surface, Clause-② and premise are unchanged.
Session:
session_01JQwxbaX2qDxUq9sF93EqqLAccount:
os-warrenBranch:
claude/issue-35145-mcp-related-readWorktree:
objectstack-issue-35145-pr2Domain:
domain:serverSeat:
repo:objectstack#1File surface: per amendment 6974061928 (PR 2 of 2:
expandonquery_records,relatedonget_record, draft #35225)Clause-②: yes (widening)
Metadata-protocol: none
Thread-read: 6979530359
Premise: holds (PR 1 #35199 merged)
objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
os-dev-report
{ "issue": 35145, "status": "done", "branch": "claude/issue-35145-mcp-related-read", "pr": "https://github.com/objectstack-ai/objectstack/pull/35225", "session": "session_01JQwxbaX2qDxUq9sF93EqqL", "head": "977e416ad0a", "premise_still_valid": true, "summary": "Rework round for #35225, new head 977e416ad0a (0e7914f180e plus a merge of origin/main, no rebase). M1: the query_records expand text now says only a field whose object this door does not serve refuses the call, and that a record the caller may not read on a served object is not expanded and keeps its stored id. Docs and changeset say the same. A dogfood pin covers crm_activity.contact onto crm_contact (guard-admitted, unreadable by the member): the call is answered, the field holds the stored id, there is no contact data, and the account on the same rows still expands. (a) Each related list now carries the same delegation-narrowing notice query_records adds (diagnoseDelegation on the child object, then withDelegationNotice; a failed diagnosis leaves the list as is), with 2 unit pins. (b) The two stdio-bridge docblock lines have their ' * ' prefix back. (c) The unit count is now 28 everywhere in the body. M2: PR-body guards is success on 0e7914f180e and on 977e416ad0a. CI verdict for Test Core (9/10) on 3d6e7691fe: the failure was THIS PR's. The repo pin packages/core/src/security/second-object-read-exposure.pin.test.ts requires every non-test caller of referenceTargetOf to be classified, and the two new callers (stdio-data-bridge.ts stdioExpandMap, mcp-relation-reads.ts) were not. Fixed in 0e7914f180e by classifying them: stdioExpandMap is decided/get, pinned by mcp-relation-reads.test.ts; mcp-relation-reads.ts executes and is decided in protocol-query-validation.ts. Test Core 9/10 is success on 0e7914f180e and 977e416ad0a, and CI was not re-run. PR body: not PATCHed by me (os-dev forbids a subagent PATCH; the dispatch asked to update it). The full replacement body is at /tmp/claude-0/-home-user/83e4c799-6343-563a-a13e-0223174ca760/scratchpad/issue-35145/pr-body-r2.md for the seat to apply.", "tests": "At 977e416ad0a under os-verify-lock (VERDICT command-exit 0): mcp src/mcp-relation-reads.test.ts Tests 28 passed (28); dogfood related-read-over-mcp (10) + latest-per-over-mcp (7) Test Files 2 passed (2), Tests 17 passed (17); core --project repo second-object-read-exposure.pin.test.ts Tests 4 passed (4); @objectstack/mcp typecheck (tsc --noEmit + check:test-typecheck OK) exit 0. At 0e7914f180e: core --project repo 8 files / 108 tests passed; spec test:repo 91 files / 1558 tests passed; runtime/objectql/rest/types test:repo all passed. At 3d6e7691fee: mcp full suite 76 files / 1376 tests passed. No ablation this round: judgeTarget is unchanged, and the round-1 ablation (unit 2F/23P, dogfood via dist 1F/8P, restore verified) still stands. Dogfood battery not re-run: the rework touches mcp package code/text, docs, changeset, one dogfood file and one core repo pin, and the two dogfood files that read it ran above.", "gates": "dispatch-gates --commands at 977e416ad0a: 101 families (the same list as at 0e7914f180e). All 101 ran locally, each exit captured before any pipe, all exit 0. check:skill-examples and check:dual-build-cjs-loads first answered exit 3 (PREREQUISITE NOT MET) at 0e7914f180e; they are exit 0 after building client-react, embedder-openai, knowledge-memory, knowledge-ragflow, scenarios and studio, plus spec, whose dist had been emptied in this worktree. --ran with exit codes: '101 derived, 101 run, 0 NOT-MEASURED (a DERIVED zero)', exit 0. CI check-runs on 977e416ad0a: 70 completed, 60 success, 10 skipped by selectors, 0 failure. PR-body guards (claim · duplicate · Part-of · single-writer path) success; Check Changeset success; Test Core and shards 1-10 success; Lint & Repo Gates and its Lint · lanes success; Dogfood Regression Gate success. overlap-check at 977e416ad0a: VERDICT overlap exit 1. origin/main (f2078e36743, an unrelated plugin-detail commit not merged in) merges cleanly; #35193 now conflicts in packages/mcp/src/stdio-data-bridge.ts (it changed since round 1), and the second of the two to land resolves it.", "dogfood_battery": "n/a this round: no ! in the title and no (narrowing) arm (Clause-②: yes (widening)); last full battery at fb450168623: 482 passed / 3 skipped files, 4091 passed / 68 skipped tests", "mcp_calls": "0", "api_writes": "1 — POST issue comment on #35145 (delta os-dev-report) via post-stamped.mjs and the fleet-write relay; git push of 977e416ad0a is not a REST write", "open_questions": [], "deviations": [ "packages/core/src/security/second-object-read-exposure.pin.test.ts is outside the claimed file surface. It was edited because the pin requires every new referenceTargetOf caller to be classified, and that was the Test Core 9/10 failure. The seat should add it to the claim's file surface.", "The dispatch asked me to update the PR body; os-dev forbids a subagent PATCH. The replacement body is in the scratchpad file named in summary, for the seat." ], "security_findings": "none", "out_of_scope_findings": [ "carrier: #35193 · overlap: conflicts with this branch in packages/mcp/src/stdio-data-bridge.ts; the second to land resolves it · noted, not filed" ] }objectstack-fleet commentedon Nov 18, 2026
repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL
Close-out · 2026-11-18T19:12Z. Fixed in two PRs:
latestPeronquery_records: feat(mcp, objectql, driver-sql): query_records latestPer, each X with its latest Y in one call #35199, merged as1caee8cbd363e06692317cabd3c5746ba0b976be. Reviews: L1 ACCEPT 6980390292, contract review PASS 6979718064. Main's live PostgreSQL + MySQL job was green on that merge.expandonquery_recordsandrelatedonget_record: feat(mcp): query_records expand and get_record related, every reached object judged by the read guard #35225, merged asdbb2f6805b0c191d6ca6660e018e103dc6edb795. Reviews: L1 REWORK 6985771362 then delta ACCEPT 6988064360; contract review PASS 6985818359 then delta PASS 6988113126.The ask cards that exercise both read kinds are #35113's to carry. Non-blocking nits from the reviews (a list refusal names no entry fields; records nested under
expandcarry nowithheldFieldsof their own) stay as review notes. This stroke removespm:dispatchedand the lease label and clears the assignee; the domain and priority labels stay.