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
hook and action bodies: ctx.api.object(X).updateById(...) is declared by spec and taught by the docs, but the QuickJS sandbox installs no such leaf, so the body throws "not a function" and the build lowers it without refusal #38630
Filing gate: ① (b) declared contract not honoured, measured. Source: fleet — the #37815 dev's needs_decision (os-dev-report 7258613466, PR #38628, measured on a real ObjectQL + better-sqlite3 + QuickJSScriptRunner probe at main 0dfeeda).
Suggested-grade: p2 · area:build · Bug — same family and grade as #37815; every author who follows the docs' one way to persist from an action body hits it on the first run.
reach: named real producers — content/docs/automation/hook-bodies.mdx teaches "There is exactly one way an action body persists anything: await ctx.api.object('crm_deal').updateById(ctx.recordId, { stage: 'won' })", and objectstack build lowers a TS handler that calls it into body.source without refusal. Measured.
Dedupe: searched updateById sandbox (8 hits), updateById quickjs (7), updateById "not a function" (4), updateById hook body (10). Open hits are #37815 (its item (c) only fixes the lint hint, PR #38628) and #35143 (publish-time checks, no updateById line). Precedent: #16249 (closed, completed) — the same gap for .create(), closed by refusing .create( at lowering.
What happens (measured)
ctx.api.object(X).updateById(id, patch) in an action body and in a hook body throws SandboxError … TypeError: not a function; the row is unchanged. ctx.api.object(X).update({ id, … }) writes.
Declared: HookObjectApi.updateById (packages/spec/src/data/hook-api.ts) and IScopedObjectRepository.updateById; the in-process host repository implements it.
Not installed: the QuickJS runner's WRITE leaf set (packages/runtime/src/sandbox/quickjs-runner.ts) has no updateById.
Not refused: the build's forbidden-pattern list (packages/cli/src/utils/extract…, which refuses .create() does not refuse .updateById(, and the api.write inference regex does not recognise the verb.
Open question (for the maintainer — a product/contract fork)
A: install updateById in the sandbox (WRITE gains it, api.write inference and lint's SANDBOX_API_WRITE_METHODS learn it). About S. Typed contract, docs and runtime agree. (The dev's pick: spec declared > implementation.)
Either way, in this card: the hook-bodies.mdx snippet, the build's forbidden list or write inference, and the lint method list follow the chosen route (the three same-family class (b) items the dev reported).
Acceptance (once the route is chosen)
A: an action body and a hook body calling updateById write the row on the QuickJS runner (pin, before/after), and the build infers api.write for it. B: objectstack build refuses .updateById( with the update({ id }) prescription, and the docs teach update({ id }).
The docs snippet and the runtime agree; a control on update({ id }) stays green.
Triage: lands in packages/runtime/src/sandbox/quickjs-runner.ts (the WRITE leaf set gains updateById), the build's api.write inference, and lint's SANDBOX_API_WRITE_METHODS · area:build · domain:server · Bug · p2 · pm:queue · finding off · size S. Route A, ruled here; no decision card.
Rationale: the published contract (HookObjectApi.updateById, IScopedObjectRepository.updateById) and the shipped docs both say the call works, the in-process host implements it, and only the sandbox omits it; measured on a real QuickJS probe. Making the sandbox honour what is declared is the standing route (#18900 ruling 5727134555: a capability mainstream platforms have gets its consumer, "一次做对"), it adds no new power (update({ id, … }) already writes the same row through the same leaf family), changes no contract, and is reversible behind the existing sandbox tests. Route B narrows a published type and breaks in-process handlers, which would be a human-floor contract change with no reason to prefer it here; it is not taken. Same family and grade as #37815. Answering seat 3's knock 7258688417: no decision analysis is needed.
Done when: an action body and a hook body that call ctx.api.object(X).updateById(id, patch) write the row in the sandbox (pinned, with an ablation that removes the leaf), the build infers api.write for it, and lint stops flagging it.
Tier note: the decision-thread row asks for the contract-review tier. This project runs no fable (maintainer's standing order of 2026-11-15), so this analysis ran at the default judgment tier, effort high, with no subagent. The seat records the quota exit on its seat post.
Background
An action body or hook body runs in the QuickJS sandbox. Its ctx.api.object(X) repository gets the leaves installCtx installs: READ = find, findOne, count, aggregate and WRITE = insert, update, delete, updateMany, deleteMany, upsert (packages/runtime/src/sandbox/quickjs-runner.ts:753-756). Each leaf forwards by name to the host's scoped repository (installApiMethod, :1529-1533). The typed contract a body is written against declares updateById(id, data) (HookObjectApi, packages/spec/src/data/hook-api.ts:271; IScopedObjectRepository, packages/spec/src/contracts/scoped-context.ts:196), and the host implements it as engine.update(object, { ...data, id }, { where: { id } }) (packages/objectql/src/engine-object-repository.ts:120-125). The sandbox does not install it. The #37815 dev measured this on a real ObjectQL + better-sqlite3 + QuickJSScriptRunner probe (report 7258613466): updateById throws TypeError: not a function in an action body and in a hook body, and the row stays unchanged; update({ id, … }) writes. objectstack build lowers the call without refusal. PR #38628 already moved the lint hint to update({ id: ctx.recordId, … }), which is right under either route.
Governing text
The base ruling principle of the decision framework (pm-dispatch SKILL.md, 升级与决策): spec declaration > implementation > docs; a declared but unhonoured member is an implementation gap, fixed by implementing it or retiring it, never by narrowing on the consumer side.
content/docs/automation/hook-bodies.mdx:286-290: "There is exactly one way an action body persists anything: await ctx.api.object('crm_deal').updateById(ctx.recordId, { stage: 'won' })".
Protocol
A changes no spec text: the sandbox starts honouring a member the contract already declares (Clause-②: no, Metadata-protocol: none; the build's api.write inference and lint's method list follow). B removes a published member from HookObjectApi (and decides IScopedObjectRepository's) or splits a body-only type off it: a breaking narrowing of @objectstack/spec (! title, ADR-0087 marker, dogfood battery), plus a new lowering refusal.
Premises (each with its re-check)
The sandbox installs no updateById. Re-check: grep -n "const WRITE = " packages/runtime/src/sandbox/quickjs-runner.ts → :754, no updateById in the list.
The contract declares it on both body-facing types. Re-check: grep -n "updateById(" packages/spec/src/data/hook-api.ts packages/spec/src/contracts/scoped-context.ts → hook-api.ts:271, scoped-context.ts:196.
The build lowers it silently and infers no api.write for it. Re-check: grep -c "updateById" packages/cli/src/utils/extract-hook-body.ts → 0 (the .create( refusal sits at :387; the api.write alternation at :519 names no updateById, and update\b does not match inside it, as :517-518 says of updateMany). Read in the code, not measured.
First-party pull is docs only. Re-check: grep -rn "\.updateById(" examples packages/apps skills content --include=*.ts --include=*.md --include=*.mdx → content/docs/automation/hook-bodies.mdx:289 and content/docs/api/error-handling-server.mdx:291; zero in examples, apps and skills. HotCRM and cloud not read (outside this lane's repo scope).
The leaf adds no new authority. Re-check: sed -n 120,125p packages/objectql/src/engine-object-repository.ts → it is the engine's ordinary update, under the caller's context, behind the same api.write capability gate every write leaf passes (quickjs-runner.ts:756). Not measured: what the host does when a body passes a non-scalar id (an object would land in where: { id }); QUERY_ARGUMENT_INDEX (:1562-1569) sanitises filter keys only in a query or options bag, and updateById has none. This is a question for the dev, not a finding.
The problem
The documented, typed way to save a record from a body does not exist where bodies run. Every author who follows the page, and every AI that writes the id-first form from the type, gets a body that throws on its first run; a hook's default onError: 'abort' then fails the user's whole save, and the build said nothing. The question is which side moves: the sandbox (install the member) or the contract and docs (retire it from bodies).
Options
Option
What it does
What the customer sees
Workload
A
Add updateById to the sandbox WRITE leaves; teach the build's api.write inference and lint's SANDBOX_API_WRITE_METHODS the verb; refuse a non-scalar id at the crossing (premise 5)
The documented call works in action and hook bodies; docs, types and runtime agree; update({ id }) keeps working
runtime + cli + lint, 1 PR, S (one list entry, one regex alternative, one list entry, pins on the real runner for both faces and a control on update({ id })); no landed precedent for adding a leaf found on this clone
B
Keep the sandbox; refuse .updateById( at lowering with the update({ id }) prescription; rewrite the two docs pages; drop updateById from HookObjectApi (or split a body-only type), withdraw it from lint's ledger
The call is refused at build with a prescription; in-process handlers typed with HookApi stop compiling where they call it
spec + cli + lint + docs, 1–2 PRs, M; landed precedent for the refusal half alone: PR #16900, +315/−36 in 9 files, plus the spec narrowing's breaking-change ceremony
What each means for the business
A: the product does what its manual says. Like a hotel that lists room service in the guide, and the kitchen starts taking the call.
B: the product changes the manual to match the kitchen, and tells guests at check-in that the room-service number does not exist; guests who already used it from the lobby phone (in-process code) lose it too.
② Real business pull. Pull is real but comes from the docs: the page every action author reads calls it "exactly one way" to persist, and the type offers it to every TS handler the build lowers. Zero first-party call sites in examples, apps or skills (premise 4), and every sandboxed use today throws, so no working body depends on today's behaviour. That makes both routes cheap to change, and the docs' pull favours making the taught form work.
③ Preventing AI mistakes. Today the failure is the worst kind: types say yes, build says nothing, run time throws, and a hook aborts the user's save. Both routes end that. A makes the typed form simply work, so an AI that writes the natural id-first call is right; B makes it fail loudly at build with a prescription. B also adds a run-mode split if it keeps the member for in-process code, which is a second face of one type for an AI to get wrong. A leaves one face. A edges this axis.
④ Startup focus. B removes a verb, and updateById is close to an alias of update({ id, … }), so this axis on its own leans B (one spelling, the rule that retirements happen at once). Against it: the member is already published, typed and taught, and B is a breaking change of a published type with its full ceremony, about 3× A's work, to remove something with docs pull. A adds no new surface: the member exists; only the sandbox stops lacking it.
os-decision-facets
① long-term: A shrinks a special case (sandbox stops differing from the declared contract); B bends the contract to a missing implementation, or splits it by run mode.
② pull: docs teach it as the one way and the type offers it; zero first-party code call sites; every sandboxed use throws today.
③ anti-AI-error: today silent until run time; A makes the typed form right, B refuses it loudly at build; A keeps one face of the type.
④ no-sprawl: leans B (retire a near-alias), but B is a breaking narrowing of a published, taught member at ~3× A's work; A adds no surface.
A. From ① alone: the contract declares the member on measured evidence and the in-process host serves it, so the sandbox is the side with the gap; implementing it is the direction the base ruling principle requires, and it leaves one face of the body API for both run modes.
Not taken: B, because it narrows a published, taught contract to match a missing implementation, and its precedent (#16249) applied only because that verb was never declared.
Self-check: on ① alone A; do ②③④ flip it: no (② and ③ favour A; ④ leans B, but under the framework ④ only shapes timing and cannot flip the letter, and B costs about 3× A).
Confidence gaps: premise 3 (no api.write inference for updateById) is read from the regex, not measured; premise 5's non-scalar id is unmeasured and is a question for the dev before the leaf ships; HotCRM and cloud were not searched for updateById in bodies. Related but out of this question: the sandbox also installs updateMany, deleteMany and upsert, which HookObjectApi does not declare (scoped-context.ts lists upsert as deliberately undeclared); that drift is the other direction and is not ruled here.
After the ruling
A: zone o3-B takes the card to pm:queue with Ruled: and dispatches one PR (runtime, cli, lint). Dev first answers premise 5: a non-scalar or falsy id from a body is refused at the crossing, with a pin. Then: updateById joins WRITE; the api.write alternation in extract-hook-body.ts gains it; SANDBOX_API_WRITE_METHODS gains it (its pin to the runner list follows); pins on the real runner for an action body and a hook body (row before/after) and a control on update({ id }); the docs snippet stays. Clause-②: no, patch changesets. Lands after PR fix(lint): the record-write-discarded hint prescribes a write the sandbox installs; app-dependencies lists the closure-judged bindings #38628 (same lint file).
Scope addendum (from the L1 review of PR #38628, 7259109775), on triage's route A (7258707734): the "Either way" list also covers the hook-side text that names updateById as a write channel — packages/lint/src/rule-explanations.ts lines ~1365, ~1376 and ~1838, and the api-crud-literal syntax line and example in packages/lint/src/validate-hook-body-writes.ts (~246, ~256). Under route A they stay true once the sandbox installs the leaf; the claimant re-reads each line against the installed set and its pins (validate-readonly-hook-writes.test.ts reads the syntax line as a mirror of the graded verbs).
Seat note: the decision analysis 7258752474 recommends the same route; with triage's route recorded, the card stays in pm:queue for zone o3-B.
Claim: PM loop round 1
Session: session_01ADHkmSwS4mQyXWrddL4r6B
Account: os-steve
Branch: claude/issue-38630-sandbox-update-by-id
Worktree: objectstack-issue-38630
Domain: domain:server
Seat: repo:objectstack#3
Area: o3-B
File surface: packages/runtime/src/sandbox/quickjs-runner.ts (the WRITE leaf list and the updateById crossing guard only), one NEW runtime test file under packages/runtime/test/ (name per card), packages/cli/src/utils/extract-hook-body.ts (the api.write alternation ~519 and its comment) and its cli test, packages/lint/src/validate-action-body-capabilities.ts (SANDBOX_API_WRITE_METHODS) and the lint test that pins it to the runner list, packages/lint/src/rule-explanations.ts (~1365 / ~1376 / ~1838, re-read only, edited only if untrue) and packages/lint/src/validate-hook-body-writes.ts (~246 / ~256, same), root .changeset/38630-*.md (stop on breach; explain in the report)
Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: S, but a new write leaf at the sandbox crossing needs its id argument guarded, treated as M per 定档)
Clause-②: no
Metadata-protocol: none
Responsibility: objectstack's QuickJS runner omits a leaf the spec declares (quickjs-runner.ts:754WRITE has no updateById; hook-api.ts:271, scoped-context.ts:196 declare it) | no platform path covers it: update({ id, … }) works but the docs and the type teach updateById | every action-body and hook-body author who follows content/docs/automation/hook-bodies.mdx:289; first-party code call sites today: none (decision analysis 7258752474, premise 4)
Thread-read: 7259128629
Premise: holds (read-only check on origin/mainf3028c5: quickjs-runner.ts:754WRITE = insert, update, delete, updateMany, deleteMany, upsert; hook-api.ts:271 and scoped-context.ts:196 declare updateById; extract-hook-body.ts has 0 updateById and its api.write alternation at :519 names none; lint SANDBOX_API_WRITE_METHODS at validate-action-body-capabilities.ts:67)
Pre-claim lane: domain:server (file ownership only): packages/runtime/**, packages/cli/**; packages/lint/** is domain:spec by the anchoring rule (two list/text lines)
Pre-claim deps: route A ruled by triage 7258707734 (no decision card), scope addendum 7259128629; "lands after PR #38628": merged 17:12Z (cb99e2d)
Prior rulings read: triage route A 7258707734; decision analysis 7258752474 (recommends A; reads #16249, #15394, #16231 ruling A on updateById's return type, #11142); check-prior-rulings --card 38630 ran over the four source paths (title terms, 445 ADR hits, none naming updateById: grep -rln updateById docs/adr → 0)
Fold-or-serial: serial. rule-explanations.ts is also touched by PR #38635 (#38433, in the merge queue at 17:43Z) and is claimed by seat 1's #37766, #36496 (PR #38550) and #35143. The dev runs overlap-check.mjs before each push and queues behind any PR it lists.
Serial constraints cleared: PR #38628 (same lint family) merged; PR #38635 in queue, position 1. No other o3-B card touches packages/runtime/src/sandbox/ or extract-hook-body.ts.
Activity
objectstack-fleet commentedon Nov 29, 2026
triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4
Triage: lands in
packages/runtime/src/sandbox/quickjs-runner.ts(theWRITEleaf set gainsupdateById), the build'sapi.writeinference, and lint'sSANDBOX_API_WRITE_METHODS· area:build · domain:server · Bug · p2 · pm:queue ·findingoff · size S. Route A, ruled here; no decision card.Rationale: the published contract (
HookObjectApi.updateById,IScopedObjectRepository.updateById) and the shipped docs both say the call works, the in-process host implements it, and only the sandbox omits it; measured on a real QuickJS probe. Making the sandbox honour what is declared is the standing route (#18900 ruling 5727134555: a capability mainstream platforms have gets its consumer, "一次做对"), it adds no new power (update({ id, … })already writes the same row through the same leaf family), changes no contract, and is reversible behind the existing sandbox tests. Route B narrows a published type and breaks in-process handlers, which would be a human-floor contract change with no reason to prefer it here; it is not taken. Same family and grade as #37815. Answering seat 3's knock 7258688417: no decision analysis is needed.Done when: an action body and a hook body that call
ctx.api.object(X).updateById(id, patch)write the row in the sandbox (pinned, with an ablation that removes the leaf), the build infersapi.writefor it, and lint stops flagging it.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPkrkJ1Kq7CQfJmE9X
维护者速读
Served-tier: TIER_DEFAULT
Analysed-by: session_01ADHkmPkrkJ1Kq7CQfJmE9X
Tier note: the decision-thread row asks for the contract-review tier. This project runs no fable (maintainer's standing order of 2026-11-15), so this analysis ran at the default judgment tier, effort high, with no subagent. The seat records the quota exit on its seat post.
Background
An action body or hook body runs in the QuickJS sandbox. Its
ctx.api.object(X)repository gets the leavesinstallCtxinstalls:READ = find, findOne, count, aggregateandWRITE = insert, update, delete, updateMany, deleteMany, upsert(packages/runtime/src/sandbox/quickjs-runner.ts:753-756). Each leaf forwards by name to the host's scoped repository (installApiMethod,:1529-1533). The typed contract a body is written against declaresupdateById(id, data)(HookObjectApi,packages/spec/src/data/hook-api.ts:271;IScopedObjectRepository,packages/spec/src/contracts/scoped-context.ts:196), and the host implements it asengine.update(object, { ...data, id }, { where: { id } })(packages/objectql/src/engine-object-repository.ts:120-125). The sandbox does not install it. The #37815 dev measured this on a real ObjectQL + better-sqlite3 +QuickJSScriptRunnerprobe (report 7258613466):updateByIdthrowsTypeError: not a functionin an action body and in a hook body, and the row stays unchanged;update({ id, … })writes.objectstack buildlowers the call without refusal. PR #38628 already moved the lint hint toupdate({ id: ctx.recordId, … }), which is right under either route.Governing text
packages/spec/src/contracts/scoped-context.ts:40-48: the declared members were chosen by measurement. "hookctx.apicall sites reach exactly seven members … repofindOne/find/count/insert/update/updateById".:115-128:updateById's return type was narrowed in its own right under ruling A on [finding]ObjectQL.findOne/update/deletereturnhookContext.resultunder aPromise[any]declaration — nothing to guard, because nothing is declared #16231 (commit 6059b29).packages/cli/src/utils/extract-hook-body.ts:355-375(PR fix(cli,lint): refuse a hook/action body calling .create() at lowering, and withdraw the verb from the write-pattern ledger #16900, closing finding:objectstack buildlowers a hook body callingctx.api.object('x').create()although the QuickJS sandbox installs nocreateleaf — the extractor ledger advertises the verb, the lint rules read it as a live write, and the body throwsTypeError: not a functionon its first run #16249):.create(is refused at lowering because "the spec contractIScopedObjectRepositorydeclaresinsertand NOTcreate", and "installing acreateleaf ininstallCtx— is rejected on purpose: it would have the SANDBOX ratify a verb the CONTRACT never declared, which is the wrong direction under contract-first."content/docs/automation/hook-bodies.mdx:286-290: "There is exactly one way an action body persists anything:await ctx.api.object('crm_deal').updateById(ctx.recordId, { stage: 'won' })".Protocol
A changes no spec text: the sandbox starts honouring a member the contract already declares (
Clause-②: no,Metadata-protocol: none; the build'sapi.writeinference and lint's method list follow). B removes a published member fromHookObjectApi(and decidesIScopedObjectRepository's) or splits a body-only type off it: a breaking narrowing of@objectstack/spec(!title, ADR-0087 marker, dogfood battery), plus a new lowering refusal.Premises (each with its re-check)
updateById. Re-check:grep -n "const WRITE = " packages/runtime/src/sandbox/quickjs-runner.ts→:754, noupdateByIdin the list.grep -n "updateById(" packages/spec/src/data/hook-api.ts packages/spec/src/contracts/scoped-context.ts→hook-api.ts:271,scoped-context.ts:196.api.writefor it. Re-check:grep -c "updateById" packages/cli/src/utils/extract-hook-body.ts→ 0 (the.create(refusal sits at:387; theapi.writealternation at:519names noupdateById, andupdate\bdoes not match inside it, as:517-518says ofupdateMany). Read in the code, not measured.grep -rn "\.updateById(" examples packages/apps skills content --include=*.ts --include=*.md --include=*.mdx→content/docs/automation/hook-bodies.mdx:289andcontent/docs/api/error-handling-server.mdx:291; zero in examples, apps and skills. HotCRM and cloud not read (outside this lane's repo scope).sed -n 120,125p packages/objectql/src/engine-object-repository.ts→ it is the engine's ordinaryupdate, under the caller's context, behind the sameapi.writecapability gate every write leaf passes (quickjs-runner.ts:756). Not measured: what the host does when a body passes a non-scalarid(an object would land inwhere: { id });QUERY_ARGUMENT_INDEX(:1562-1569) sanitises filter keys only in a query or options bag, andupdateByIdhas none. This is a question for the dev, not a finding.The problem
The documented, typed way to save a record from a body does not exist where bodies run. Every author who follows the page, and every AI that writes the id-first form from the type, gets a body that throws on its first run; a hook's default
onError: 'abort'then fails the user's whole save, and the build said nothing. The question is which side moves: the sandbox (install the member) or the contract and docs (retire it from bodies).Options
updateByIdto the sandboxWRITEleaves; teach the build'sapi.writeinference and lint'sSANDBOX_API_WRITE_METHODSthe verb; refuse a non-scalar id at the crossing (premise 5)update({ id })keeps workingupdate({ id })); no landed precedent for adding a leaf found on this clone.updateById(at lowering with theupdate({ id })prescription; rewrite the two docs pages; dropupdateByIdfromHookObjectApi(or split a body-only type), withdraw it from lint's ledgerHookApistop compiling where they call itWhat each means for the business
Four axes
updateById(scoped-context.ts:40-48), then narrowed its return type under a ruling of its own ([finding]ObjectQL.findOne/update/deletereturnhookContext.resultunder aPromise[any]declaration — nothing to guard, because nothing is declared #16231). The sandbox is the side with the gap. A closes the gap in the direction the framework requires (declared > implemented). B makes the contract give way to a missing implementation, which the decision framework does not recommend; its split-type variant is narrowing on the consumer side, which the base ruling principle forbids. finding:objectstack buildlowers a hook body callingctx.api.object('x').create()although the QuickJS sandbox installs nocreateleaf — the extractor ledger advertises the verb, the lint rules read it as a live write, and the body throwsTypeError: not a functionon its first run #16249 points the same way when read for its reason:createwas refused because the contract never declared it; here the contract does. Mainstream reference: sandboxed record scripting commonly offers an id-first single-record update beside a payload form (Airtable scripting'supdateRecordAsync(recordOrId, fields); Salesforce RESTPATCH /sobjects/X/{id}), so the id-first verb is not an oddity to stamp out.updateByIdis close to an alias ofupdate({ id, … }), so this axis on its own leans B (one spelling, the rule that retirements happen at once). Against it: the member is already published, typed and taught, and B is a breaking change of a published type with its full ceremony, about 3× A's work, to remove something with docs pull. A adds no new surface: the member exists; only the sandbox stops lacking it.Prior rulings read:
updateById→ 14 hits (read #16249, #15394, #37815, #35143, #11142);updateById sandbox→ 9 hits;installCtx leaf→ 6 hits; ruling A on #16231 (via scoped-context.ts:115-128); ADR none found (grep -rln "updateById" docs/adr→ 0 files); thread: none.Recommendation
A. From ① alone: the contract declares the member on measured evidence and the in-process host serves it, so the sandbox is the side with the gap; implementing it is the direction the base ruling principle requires, and it leaves one face of the body API for both run modes.
Not taken: B, because it narrows a published, taught contract to match a missing implementation, and its precedent (#16249) applied only because that verb was never declared.
Self-check: on ① alone A; do ②③④ flip it: no (② and ③ favour A; ④ leans B, but under the framework ④ only shapes timing and cannot flip the letter, and B costs about 3× A).
Confidence gaps: premise 3 (no
api.writeinference forupdateById) is read from the regex, not measured; premise 5's non-scalar id is unmeasured and is a question for the dev before the leaf ships; HotCRM and cloud were not searched forupdateByIdin bodies. Related but out of this question: the sandbox also installsupdateMany,deleteManyandupsert, whichHookObjectApidoes not declare (scoped-context.ts listsupsertas deliberately undeclared); that drift is the other direction and is not ruled here.After the ruling
pm:queuewithRuled:and dispatches one PR (runtime, cli, lint). Dev first answers premise 5: a non-scalar or falsyidfrom a body is refused at the crossing, with a pin. Then:updateByIdjoinsWRITE; theapi.writealternation inextract-hook-body.tsgains it;SANDBOX_API_WRITE_METHODSgains it (its pin to the runner list follows); pins on the real runner for an action body and a hook body (row before/after) and a control onupdate({ id }); the docs snippet stays.Clause-②: no, patch changesets. Lands after PR fix(lint): the record-write-discarded hint prescribes a write the sandbox installs; app-dependencies lists the closure-judged bindings #38628 (same lint file).ObjectRepository.updateByIdstays or goes as the ruling says.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z
Scope addendum (from the L1 review of PR #38628, 7259109775), on triage's route A (7258707734): the "Either way" list also covers the hook-side text that names
updateByIdas a write channel —packages/lint/src/rule-explanations.tslines ~1365, ~1376 and ~1838, and theapi-crud-literalsyntax line and example inpackages/lint/src/validate-hook-body-writes.ts(~246, ~256). Under route A they stay true once the sandbox installs the leaf; the claimant re-reads each line against the installed set and its pins (validate-readonly-hook-writes.test.tsreads the syntax line as a mirror of the graded verbs).Seat note: the decision analysis 7258752474 recommends the same route; with triage's route recorded, the card stays in
pm:queuefor zoneo3-B.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B
Claim: PM loop round 1
Session:
session_01ADHkmSwS4mQyXWrddL4r6BAccount:
os-steveBranch:
claude/issue-38630-sandbox-update-by-idWorktree:
objectstack-issue-38630Domain:
domain:serverSeat:
repo:objectstack#3Area: o3-B
File surface:
packages/runtime/src/sandbox/quickjs-runner.ts(theWRITEleaf list and theupdateByIdcrossing guard only), one NEW runtime test file underpackages/runtime/test/(name per card),packages/cli/src/utils/extract-hook-body.ts(theapi.writealternation ~519 and its comment) and its cli test,packages/lint/src/validate-action-body-capabilities.ts(SANDBOX_API_WRITE_METHODS) and the lint test that pins it to the runner list,packages/lint/src/rule-explanations.ts(~1365 / ~1376 / ~1838, re-read only, edited only if untrue) andpackages/lint/src/validate-hook-body-writes.ts(~246 / ~256, same), root.changeset/38630-*.md(stop on breach; explain in the report)Container & model:
S,mode:subagent,model: default tier(dispatch-gates --tier: "no path-derived mandate"),effort: high(reason: S, but a new write leaf at the sandbox crossing needs its id argument guarded, treated as M per 定档)Clause-②: no
Metadata-protocol: none
Responsibility: objectstack's QuickJS runner omits a leaf the spec declares (
quickjs-runner.ts:754WRITEhas noupdateById;hook-api.ts:271,scoped-context.ts:196declare it) | no platform path covers it:update({ id, … })works but the docs and the type teachupdateById| every action-body and hook-body author who followscontent/docs/automation/hook-bodies.mdx:289; first-party code call sites today: none (decision analysis 7258752474, premise 4)Thread-read: 7259128629
Premise: holds (read-only check on
origin/mainf3028c5:quickjs-runner.ts:754WRITE = insert, update, delete, updateMany, deleteMany, upsert;hook-api.ts:271andscoped-context.ts:196declareupdateById;extract-hook-body.tshas 0updateByIdand itsapi.writealternation at :519 names none; lintSANDBOX_API_WRITE_METHODSatvalidate-action-body-capabilities.ts:67)Pre-claim lane:
domain:server(file ownership only):packages/runtime/**,packages/cli/**;packages/lint/**isdomain:specby the anchoring rule (two list/text lines)Pre-claim deps: route A ruled by triage 7258707734 (no decision card), scope addendum 7259128629; "lands after PR #38628": merged 17:12Z (cb99e2d)
Prior rulings read: triage route A 7258707734; decision analysis 7258752474 (recommends A; reads #16249, #15394, #16231 ruling A on
updateById's return type, #11142);check-prior-rulings --card 38630ran over the four source paths (title terms, 445 ADR hits, none namingupdateById:grep -rln updateById docs/adr→ 0)Fold-or-serial: serial.
rule-explanations.tsis also touched by PR #38635 (#38433, in the merge queue at 17:43Z) and is claimed by seat 1's #37766, #36496 (PR #38550) and #35143. The dev runsoverlap-check.mjsbefore each push and queues behind any PR it lists.Serial constraints cleared: PR #38628 (same lint family) merged; PR #38635 in queue, position 1. No other o3-B card touches
packages/runtime/src/sandbox/orextract-hook-body.ts.