Repository navigation
fix(runtime): an action body that runs out of time answers a sentence naming the action and its limit - #35093
Conversation
… naming the action and its limit The action arm of the sandbox budget error now carries a caller sentence (the action's name and the limit it hit, in ms) at a declared 500 with no code, so the /actions door and MCP run_action answer 500 INTERNAL_ERROR with that sentence instead of the bare "Internal server error". A crash stays sanitised; a hook's or a job's timeout is unchanged; the declared 500 keeps the sentence off the /data door. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
…ing collection Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
📓 Docs Drift Check7 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 30 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 2dda26240d7a6aa9f97402ab038d9b2560c99c62 && git checkout 2dda26240d7a6aa9f97402ab038d9b2560c99c62
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 99a0e4fbfc11884c7845237a39ad7b6a1bf6c826 48170d26e646f73c394777b16cc1751a4d40227f && git checkout -B drift-repro 99a0e4fbfc11884c7845237a39ad7b6a1bf6c826 && git merge --no-ff 48170d26e646f73c394777b16cc1751a4d40227f
node scripts/docs-audit/affected-docs.mjs --json 99a0e4fbfc11884c7845237a39ad7b6a1bf6c826 |
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB L1 review (#35027) · 2026-11-18T02:53ZL1: ACCEPT I ran Ruling C, condition by condition
Shape and scope. CI at this head. Check Changeset, PR-body guards, Governed Surface Queue Guard, Spec property liveness, Check PR Size, Doc links, Lint · PM dispatch-gates and Lint · scoped · tooling self-tests are green. Build Core, Test Core (10 shards), Build Docs, Type Check and the other Lint lanes are still in progress. Landing waits on them. Must-fixNone. Should-fix
Notes
|
…ion and its limit, not a crash Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
|
repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz Hand-off · PR #35093 (#35027, maintainer ruling C) · area o3-C (seat 3) is going off dutyThe maintainer ordered a hand-off at 03:19Z. This PR is unfinished and is handed to the next PM. Card #35027 goes back to State at head
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review, delta (#35027) · 2026-11-18T03:47ZL1: ACCEPT Delta read: S1, closed. I checked the new 500 bullet in
N1, closed. The Scope. Both files are in the claim's file surface through amendment 6967610144, which names the bullet and the N1 comment. The re-claim 6968383051 carries the same 9-path surface. Neither file ships in a published package's src, so the existing Tests. The report on the card (6968103095) gives the pins re-run at this head: runtime 87/87, CI at this head, read from check-runs:
Must-fixNone. Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Contract-review-claim: session_01JQwxbXGvw43spR79ztEvWt · head Declaration-face contract review ( |
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Contract reviewServed-tier: Inputs read: card #35027 (its body, the seat review 6965177482, ruling C 6965765884, claim 6966174736 and its amendment 6967610144, both os-dev reports 6967512322 and 6968103095, hand-off 6968145365, claim 6968383051); the PR #35093 body and its 9-file list; the net diff ① Derived judgmentsAccept-set. No change. No input that was accepted is now refused, and no input that was refused is now accepted. No spec key, no schema, no closed error code and no route is added or removed. Right. Public surface. Each change the diff implies:
Gate verdicts (the check-runs on this head; their conclusions are the gate verdicts): this is the snapshot at 2026-11-18T07:37Z. There are 54 runs: 32 success, 15 skipped (opt-in and queue rows), 0 failure, and 7 still pending. The pending runs are Test Core (1/10), Test Core (2/10), Test Core (3/10), Test Core (4/10), Test Core (6/10), Test Core (7/10) and Test Core (8/10). every Lint lane that ran (Lint UI is skipped), Type Check (workspace, source, consumer and debt ledger), Build Core, Build Docs, Check Changeset and Test Core 5, 9 and 10 have each concluded success. F1 is a path the head's own pins do not exercise, so a green gate set would not clear it. ② Semver level
③ Boundary flags
Implemented-by: VERDICT: FAIL |
…entenced faults through An action that declares `refusals` handed its timeout to resolveActionRefusal, which read the new caller sentence as the body's code-less throw and replaced it with the undeclared-refusal fault: both doors answered the bare 500 and the log named a throw that never happened. The compile-failure fault had the same route. The runner now marks the faults it makes itself that carry a caller sentence (an action timeout, an action body that does not compile) by identity, and the catalogue passes them through before reading any field. A body's own code-less throw, a declared 500 with the timeout's own words included, is still refused as undeclared. Claude-Session: https://claude.ai/code/session_01JQwxbXGvw43spR79ztEvWt Co-authored-by: Claude <noreply@anthropic.com>
…nd compile-failure sentences Claude-Session: https://claude.ai/code/session_01JQwxbXGvw43spR79ztEvWt Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Contract-review-claim: session_01JQwxbXGvw43spR79ztEvWt · head Delta declaration-face contract review ( |
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review, delta for contract-review F1 (#35027) · 2026-11-18T08:58ZL1: REWORK (one must-fix, a record only; the code is accepted) F1 of contract review 6972256765, closed in code.
Changeset. The added paragraph matches the code. It says a catalogued action keeps the timeout sentence and the runner's log line, and that the compile failure, which on CI at this head, from check-runs: 42 success, 17 skipped, none failed or in progress. Must-fix
Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9 L1 review, M1 re-read (#35027) · 2026-11-18T08:59ZL1: ACCEPT The head has not changed since my REWORK 6973824640, so I re-read only the record that M1 named. M1 is closed. Claim amendment 6973840626 on #35027 is pinned to this head.
Everything in 6973824640 stands for this head: F1 closed in code, the identity mark, the CONTROL, both doors with their log lines, the ablation and restore, the changeset paragraph, and CI (42 success, 17 skipped, none failed). Must-fixNone. Should-fixNone. Notes
|
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Contract reviewServed-tier: Delta round: Inputs read: card #35027 (its body and every comment, including ruling C 6965765884, claim 6968383051 and the round-3 os-dev report 6973777094); the PR #35093 body, its file list and every comment (record 6972256765, L1-a ACCEPT 6968431373; there is no L1 newer than that); the delta diff and the net diff above; and the check-runs on this head. Code outside the diff is read only to judge the diff against it, never reviewed. ① Derived judgmentsF1: closed. The runner now marks its own faults that carry a caller sentence. It keeps a module-level The pins drive the real
The os-dev report gives the ablation: with the pass-through line removed, the three positive pins went red and the control stayed green. Test Core 1-10 are green on this head. Can a body forge the mark? No. The mark goes on host-side objects only, at the three sites above, and none of them crosses into the VM.
So nothing a body does can become a marked object, and the CONTROL pins the field-spoofing case. Accept-set, against Public surface, against
Public surface, against main. The net diff adds this round's catalogued-action pass-through to items 1 to 6 of record 6972256765, and nothing else. Item 7 (F1) is closed above. Gate verdicts. The conclusions of the check-runs on this head are the gate verdicts. There are 59 runs: 42 success, 17 skipped (opt-in, queue and UI rows), 0 failure, 0 pending.
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Contract reviewServed-tier: This is a closing delta read of S1 only, from record 6973910753. The head has not moved: the PR head is still Inputs read for this round:
① Derived judgmentsNothing new. With no code delta, the accept-set, the public surface and the gate verdicts are unchanged from 6973910753. The check-runs on this head: 59 runs, 42 success, 17 skipped, 0 failure, 0 pending. ② Semver levelUnchanged: ③ Boundary flagsS1: closed.
Correction to 6973910753. That record said "no amendment is on #35027". Amendment 6973840626 was posted at 08:59:06Z, while that read was still running, and the read's comment listing did not include it. On the substance, S1 is closed by the two amendments together, whatever the order. Landing prerequisite met. L1-a ACCEPT 6973855618 is on SQL push-down: no code delta, so no finding. Findings. F1: closed (6973910753). S1: closed. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbXGvw43spR79ztEvWt Landing · 2026-11-18T09:04Z · head
This card started before Warren's 08:54Z intake rule, so it finishes. |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz
Fixes #35027
Clause-②: no
Metadata-protocol: none
维护者速读
/actions与 MCPrun_action仍回答500 INTERNAL_ERROR,但消息从光秃秃的 "Internal server error" 变成点名动作和时限的一句话,例如Action 'X' timed out: it exceeded its 50 ms time limit and was stopped.budgetError的动作分支;钩子、定时任务的超时完全不变(无innerMessage、无status),崩溃仍是消毒后的 500。句子声明为 500,所以/data门不会把它当业务原文转出。第 3 轮修了合同审查的 F1:声明了refusals的动作以前会把这句话(以及编译失败那句)当成"没带 code 的抛出"改写成裸 500,日志也记错原因;现在运行器按身份标记自己的故障,拒绝目录直接放行。动作自己抛的无 code 错误(哪怕带 500、哪怕抄了超时原文)仍按未声明拒绝。回滚即 revert。packages/runtime/src/sandbox/hook-refusal-catalogue.ts(resolveSandboxedRefusal第一行的isRunnerOwnFault放行);packages/runtime/src/sandbox/quickjs-runner.ts(budgetError的两个action分支、actionTimeoutSentence与runnerOwnFaults);packages/runtime/src/sandbox/action-refusal-catalogue.test.ts(末尾新 describe 的四个钉子)。pnpm --filter @objectstack/runtime exec vitest run src/sandbox/sandboxed-action-crash-is-a-fault.test.ts src/sandbox/action-refusal-catalogue.test.ts,预期 31 条全过,其中声明了refusals的动作超时,在 HTTP 门与 MCP 读取器上同样给出那句话,日志保留 CPU 时限那一行。What changes
@objectstack/runtime,quickjs-runner.ts.budgetErrorgains anactionarm on each of its two limits. For an action, theSandboxErrorkeeps its operator line in.message(action 'NAME' exceeded CPU budget of Nms (after P pump iterations), unchanged), and now carriesinnerMessage=actionTimeoutSentence(...)and a declaredstatus: 500, with nocode. This is the shape of the compile-failure precedent (actionBodyCompileFailure, merged in 743308b). The two sentences:Action 'NAME' timed out: it exceeded its N ms time limit and was stopped.Action 'NAME' timed out: it exceeded its N ms time limit while waiting on platform calls, and was stopped.actionsDoorAnswerOf(@objectstack/types, not edited) reads the sentence throughsandboxBusinessMessage. Arm 2 (crash) does not take it, because the sentence is not native-error-named. Arm 3 serves the declared status, with the status's ownINTERNAL_ERRORand the sentence (looksLikeInternalErrorLeakreads false). The HTTP door (HttpDispatcher.handleActions) and MCPrun_action/resume_run(errorResultFromThrown) both render that one reader, so they give the same sentence.500/INTERNAL_ERROR. A crash keepsInternal server error: the crash path is untouched, and a pin holds it on both doors.SandboxErrorwith noinnerMessageand nostatus. On/data,mapDataErrorrelays a sandboxinnerMessageonly below the server band, so the declared500keeps the action sentence off that door too. A pin measures this.sandbox-business-message.tsneeded no edit.content/docs/api/error-catalog.mdxgains a "Sandboxed body timed out" row under Action Errors. "sandbox timeout" moves out of the crash row.packages/core/src/utils/import-runner-sandbox-fault-row.test.ts, not edited). Each new construction keeps a literal template as its message, using interpolations the census already samples (args.origin.name,cpuBudget,wallCeiling,pumps). The census picks the new sites up (quickjs-runner.ts:250and:262in its §2) with no new sample, and still finds the hook/job fault sites itsCPU budget/wall-clock ceilingfloors need. 48/48 green.unreadable-rejection-recorded.test.ts: the never-settles control expectedinnerMessageundefined.sandbox-unreadable-rejection-door.test.ts: a real-stack/actionsdoor case now also asserts the message. That file also gains the module-topimport '@objectstack/metadata'thatcheck:test-source-aliasasks of an edited door test.content/docs/ui/actions.mdx: the 500 bullet now reads "it crashed (aTypeErrorin your handler, a driver error) or timed out; a timeout's message names the action and its limit, while a crash answers onlyInternal server error", matching the catalog row. The header comment ofpackages/runtime/src/domains/actions.tsno longer lists a sandbox timeout under crash.refusalslost the timeout sentence:boundActionHandlerhands every throw toresolveActionRefusal, and the catalogue read the sentence as the body's code-less throw, replaced it with the undeclared-refusal fault, answered the bare 500 on both doors and logged "threw no code" instead of the budget line. Measured before the fix on this branch's headddee9584b9, through the real bound handler: both doors answeredInternal server error. The compile-failure fault (actionBodyCompileFailure) had the same route, and the same mark covers it with no extra path.quickjs-runner.ts: a module-levelrunnerOwnFaultsWeakSet besidehostRelayedErrors. The runner marks the faults it makes itself that carry a caller sentence: the action arms ofbudgetError(CPU budget, wall-clock ceiling) andactionBodyCompileFailure.isRunnerOwnFaultreads the mark. Identity, not a field: a body can throwinnerMessage+status: 500+ no code itself, so no field tells the two apart. The runner's other faults carry noinnerMessageand pass as before.hook-refusal-catalogue.ts:resolveSandboxedRefusalpasses a runner-own fault through before it reads any field. There is no pass-through on a declared server-band status: a body's own code-less throw withstatus: 500, even one spelled with the timeout's exact words, is still refused as undeclared. The module header says so.action-refusal-catalogue.test.ts(the action-catalogue harness): a new top-level describe, through the realactionBodyRunnerFactoryand read on the/actionsdoor andactionsDoorAnswerOf(the reader MCPrun_actionrenders). A CPU timeout and a wall-clock timeout each answer500 INTERNAL_ERRORwith the sentence on both doors, and the error logged aterrorstill carries the runner's operator line, read at log time. A compile failure answers its sentence on both doors, and the log names the compiler. A control holds three code-less body throws (plain,status: 500, andstatus: 500with the timeout's own sentence) to the undeclared refusal and the bare 500 on both doors.@objectstack/runtimepatch. Round 3 adds one paragraph: the same holds for an action that declaresrefusals.Tests
Round 3 (head 48170d2): F1 red then green, ablation, package suite
ddee9584b9plus the test only):Tests 3 failed | 17 passed (20). CPU timeout, received on both doors"message": "Internal server error"where the sentence was expected. Wall-clock timeout, the same. Compile failure:expected 'Internal server error' to contain 'Action 'submit_signoff' cannot run:…'. The control (code-less body throws stay refused) was green.action-refusal-catalogue,sandboxed-action-crash-is-a-fault,hook-refusal-catalogue,unreadable-rejection-recorded,sandbox-unreadable-rejection-door,quickjs-runner:Test Files 6 passed (6),Tests 145 passed (145).scripts/ablation-replace.mjs: inhook-refusal-catalogue.ts, replaced the lineif (isRunnerOwnFault(err)) return err;with a comment.ok mutation landed: anchor 1 -> 0, blob 1d140e65a29e -> 7bd11f4783b5. The suite imports the catalogue fromsrc/by relative path, so no dist rebuild was needed. Result:Tests 3 failed | 17 passed (20); red: the CPU-timeout, wall-clock-timeout and compile-failure pins; the control stayed green. Restore:ok restored: blob == HEAD (1d140e65a29e) and git diff HEAD is empty.pnpm --filter @objectstack/runtime test(--project local):Test Files 619 passed (619),Tests 11500 passed | 23 skipped (11523), exit 0. The run was on the fix's code. The commit after it changes only the changeset.pnpm --filter @objectstack/runtime typecheck: exit 0,check:test-typecheck: OK.import-runner-sandbox-fault-row.test.ts(repoproject, run locally because it parses the edited runner):Tests 48 passed (48).Targeted files, package suites, typecheck (head d50f969 for the re-runs after the last edit)
pnpm exec vitest run(runtime) onsandboxed-action-crash-is-a-fault,unreadable-rejection-recorded,sandbox-unreadable-rejection-doorandquickjs-runner:Test Files 4 passed (4),Tests 87 passed (87).sandbox-unreadable-rejection-doorandsandboxed-action-crash-is-a-fault:Test Files 2 passed (2),Tests 16 passed (16).pnpm --filter @objectstack/runtime test(--project local):Test Files 618 passed (618),Tests 11470 passed | 23 skipped (11493), exit 0. This ran on 1a88607. The only change since then is a module-top side-effect import in one test file, and that file was re-run above.pnpm --filter @objectstack/mcp test:Test Files 71 passed (71),Tests 1260 passed (1260), exit 0.mcp-coded-refusal.test.ts: 180/180.import-runner-sandbox-fault-row.test.ts(core census,repoproject, run locally because it parses the edited runner): 48/48.pnpm --filter @objectstack/runtime typecheck: exit 0 (check:test-typecheck: OK). The first run was red on two untouched files,TS2307 Cannot find module '@objectstack/driver-turso', because that dist had not been built. It went green once the dist was built.@objectstack/mcp typecheck:tsc --noEmitandcheck:test-typecheck: OK.Ablations: three pins, each mutated once through scripts/ablation-replace.mjs, restored to blob == HEAD
The mutations are all in
quickjs-runner.ts, which the suite imports fromsrc/by relative path, so no dist rebuild was needed.ablation-replacereported each mutation as landed (anchor 1 -> 0). After each leg, the restore showedgit hash-object= HEAD blobbd7078824818andgit diff HEADempty.actionTimeoutSentence(args.origin.name, cpuBudget, false),withundefined,. Result:Tests 2 failed | 9 passed (11). Red: "the runner keeps its operator line, and declares 500 with the sentence and no code" and "the /actions door and the MCP run_action reader answer 500 INTERNAL_ERROR with the same sentence".innerMessagewith'Action failed internally: ', so it no longer reads as a native error. Result:Tests 5 failed | 6 passed (11). Red: the new "control: a crash beside it keeps the sanitised 500 on both doors", plus the existing crash, runtime-SyntaxError and negative-control pins.args.origin.kind === 'action'to!== 'job', which pulls hooks into the action arm. Result:Tests 1 failed | 10 passed (11). Red: "control: a hook timeout is unchanged, and the /data door answers it the sanitised fault".Acceptance notes
Clause-②: noandMetadata-protocol: nonehold after round 3: the fix restores the ruled answer on a path the round-1 pins did not reach, and refuses nothing it accepted before.Round 2 fixed
content/docs/ui/actions.mdx(the 500 bullet) and thedomains/actions.tsheader comment, after the claim amendment added both to the surface.The MCP pin (
mcp-coded-refusal.test.ts) drivesrun_action/resume_runwith the runner's measured timeout shape.@objectstack/mcpdoes not depend on@objectstack/runtime, so the real-run half lives in the runtime file. That file feeds the same real error to the HTTP door and toactionsDoorAnswerOf, the reader the MCP tools render.Verification
Gates, round 3 (head 48170d2)
dispatch-gates --commandsderived 100 commands. All 100 were run, and each exited 0 (exit codes captured per command before any pipe). On the first passcheck:skill-examplesandcheck:dual-build-cjs-loadsexited 3 (PREREQUISITE NOT MET, dists missing). After a whole-workspace build (turbo run build, 120/120 tasks) both exited 0. The changeset gates and the text gates that read.changeset/were re-run on 48170d2, the changeset commit.--ranreconciliation:100 derived, 100 run, 0 NOT-MEASURED, 0 UNRUN.scripts/check-skill-identifier-liveness.mjs. Its family ran from this branch's copy and exited 0. Main was not merged: the branch has no conflict and main does not make it red.overlap-checkbefore each push:VERDICT clean exit 0against origin/mainf7960893cdand99a0e4fbfc, with no open PR head overlapping.Gates, round 2 (head 8010091)
dispatch-gates --commandson 8010091 derived 98 commands (round 1's 96, pluscheck:adr-symbol-anchorsandcheck:route-envelope). I ran 97 of them on 8010091, and each exited 0.pnpm check:dual-build-cjs-loads. It exited 3 with PREREQUISITE NOT MET, because it reads built output and this fresh worktree has no dist for@objectstack/account,@objectstack/setup,@objectstack/studio,@objectstack/cloud-connectionand 30-odd more. A whole-tree build was not started, because the maintainer's hand-off order said to start no new long steps. CI's Lint lane runs it. On d50f969 it passed (124 entries / 72 packages).--ranreconciliation over the 97 measured commands:98 derived, 97 run, 0 NOT-MEASURED, 1 UNRUN. The UNRUN entry ischeck:dual-build-cjs-loads, above.sandboxed-action-crash-is-a-fault,unreadable-rejection-recorded,sandbox-unreadable-rejection-doorandquickjs-runner: 4/4 files, 87/87 tests.mcp-coded-refusal: 180/180. Core census: 48/48. The package suites and typecheck were not re-run; the round-1 readings on d50f969 stand for unchanged code.overlap-checkbefore the push:VERDICT clean exit 0against origin/main 154cb72, and against feat(spec, runtime, lint): an action writes the sentences it declares in the organization's language (ctx.text) #35085, which sharescontent/docs/ui/actions.mdxandquickjs-runner.tsand merges cleanly.Gates, round 1 (head d50f969)
node scripts/pm/dispatch-gates.mjs --commands: 96 derived commands. All 96 were run on d50f969 and every one exited 0 (exit codes captured per command before any pipe).--ranreconciliation:96 derived famil(ies) accounted for — 96 run, 0 NOT-MEASURED.check:skill-examples(exit 3, client-react dist missing),check:dual-build-cjs-loads(exit 3, dists missing) andcheck:test-source-alias(exit 1, the door test's missing module-top import, now fixed). All three exit 0 on the final pass.node scripts/pm/overlap-check.mjsbefore each push:VERDICT clean exit 0(origin/main 301b7c1; feat(spec, runtime, lint): an action writes the sentences it declares in the organization's language (ctx.text) #35085 sharesquickjs-runner.tsand merges cleanly).dispatch-gateslists as CI-measured-only or workflow-valued, the type-check lanes, and the path-scheduled CI jobs. The full dogfood is not owed (no!, no(narrowing)arm).Generated by Claude Code