Skip to content

fix(runtime)!: bind a resume approval to the screen it was given on - #34753

Merged
os-zhuang merged 6 commits into
mainfrom
claude/project-thread-di6l33
Nov 17, 2026
Merged

os-zhuang merged 6 commits into
mainfrom
claude/project-thread-di6l33

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #34515
Clause-②: yes (narrowing) — narrowed: an MCP resume_run of a declared-gated flow action on a client that is asked in place (form-mode elicitation), where the person accepts after the wizard moved on to another screen in the meantime, is now refused 409 RESOURCE_CONFLICT and resumes nothing, where it resumed the screen the run had moved on to. Widened beside it: ActionConfirmationHandOff.run.screenNodeId and ActionResumeRequest.screenNodeId are new optional keys, and a host call that omits screenNodeId behaves as before.
Metadata-protocol: none
Skills-docs: none — no skill under skills/** teaches what a second resume of one run does (skills/objectstack-ai/SKILL.md lines 211–217 and skills/objectstack-platform/SKILL.md line 344 teach the hand-off, the confirm refusal and the elicitation answers only); content/docs/ui/actions.mdx gains the rule in this change.

repo:objectstack#2 · os-steve · session_01ADHkmSKdmdbBugjg8QSZGa

维护者速读

  • 改了什么:AI 交给人确认的 resume_run 待办现在记下当时停住的那一屏(run.screenNodeId),宿主批准时把它传回 dispatchActionResume;流程已经不在那一屏就拒绝(409 RESOURCE_CONFLICT),流程原地不动。在客户端里当场确认的情形同样绑定当屏。
  • 为什么改:先在 main 上用真实两屏向导复现了:同一待办批两次、agent 调两次 resume_run、用户先在应用里推进后才批,三种情形都把第一屏的值以批准人身份交给了第二屏并直接走完流程(裁决 6942893807,选项 A)。
  • 风险与回滚:宿主侧只加可选键,不传 screenNodeId 的调用照旧续跑当前屏。唯一变严的一路(BREAKING):客户端当场确认时,若人点确认前向导已被推进到别的屏,以前会续跑那一屏,现在拒 409、什么都不续跑,agent 需在当前屏重新发起。循环回到同一屏节点的向导仍分不开(已知局限,未见实际用例)。回滚即撤掉本 PR。
  • 先看:packages/runtime/src/domains/mcp.ts(refuseUnresumableAdmittedRun 第 5 步的比对、交出待办处写 screenNodeId、当场确认分支)、packages/spec/src/contracts/ai-service.ts(ActionConfirmationHandOff.run.screenNodeId 与规则 4 散文)、packages/runtime/src/action-confirmation-handoff-33690.test.ts(新 [#34515] 一组)。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run src/action-confirmation-handoff-33690.test.ts -t 34515,预期 7 条全绿(4 条拒绝、1 条 400、2 条 CONTROL)。
  • 需要你做的:无,席位落地(改了 packages/spec/src 契约,先过契约复审)。

What changes

A multi-screen wizard stays paused under the same run id as it moves from screen to screen. The host resume door's step 2 refuses only a run that is no longer paused, so a second resume of one handed-off resume_run passed steps 2 to 5 and submitted the first screen's values to the screen the run had moved on to, as the approver. Reproduced on main (dc66d33) on a real stack before any code, in all three ways the card names (readings under Verification).

  • Contract (@objectstack/spec/contracts, ai-service.ts): ActionConfirmationHandOff.run gains the optional screenNodeId: the ScreenSpec.nodeId the run was parked on when the call was handed off, the screen values were given for. Rule 4's prose and the IActionConfirmationService docblock say the approval is bound to that screen when the host passes it back, and that a run on another screen is refused 409 RESOURCE_CONFLICT and stays where it is. The old sentence that left "voiding an item whose run has moved on" to the host is replaced; deciding an item once stays the host's. Rule 4's elicited-accept bullet states the same binding for a resume_run asked in place: bound to the screen the run was parked on when the person was asked, refused 409 RESOURCE_CONFLICT if the run moved on meanwhile, the run left where it is.
  • Hand-off (resumeActionRun, domains/mcp.ts): step 5's helper refuseUnresumableAdmittedRun now returns the screen it read, and the hand-off writes its nodeId into run.screenNodeId (omitted when the engine named none).
  • Host resume door (dispatchActionResume → resumeActionRunRequest): ActionResumeRequest gains the optional screenNodeId (action-dispatch.ts). Given, it rides wiring.hostDoor into step 5, which refuses a run paused on another screen with 409 RESOURCE_CONFLICT before resume() is called, so nothing is consumed. A screenNodeId that is not a non-empty string is refused 400 before the run is read.
  • Elicited approval (same function), BREAKING: the person answers for the screen the run was parked on when they were asked; if the wizard moved on meanwhile, step 5 refuses the resume 409 RESOURCE_CONFLICT and nothing resumes. On main the same call answered 200 and resumed the screen the run had moved on to, with the values the agent gave for the first one. This is the narrowing the Clause-② line declares; the agent asks again on the screen the run is on now. Same defect class, same function, no contract change.
  • Refusal code: the existing RESOURCE_CONFLICT / 409, the code step 5 already answers for "paused, but not on a screen". No new code is minted, so the error-code ledger is untouched.
  • N2 (action-execution.ts): the enforced-set comment of the confirmation gate now names the host resume door (dispatchActionResume) beside the host action door.
  • Docs: content/docs/ui/actions.mdx, "Resume a handed-off run as the person who approved it", passes screenNodeId: handOff.run.screenNodeId in the example and states the 409, the 400 for a null, empty or non-string screenNodeId, and the looping-wizard limit.
  • Changeset: .changeset/34515-resume-approval-bound-to-screen.md, @objectstack/spec and @objectstack/runtime patch, with the BREAKING paragraph for the elicited path (before and after) and its ADR-0087 disposition not-required (no-migration-prescription): no schema key, value or metadata type moves, and the moved answer is a runtime refusal at the MCP door.
  • Naming: screenNodeId follows ScreenSpec.nodeId (packages/spec/src/contracts/automation-service.ts), the id the engine already serves for a parked screen; the seat analysis 6932866004 proposed the same name.

Tests

  • packages/runtime/src/action-confirmation-handoff-33690.test.ts: the harness's automation double takes an optional screen list; resume moves the run to the next screen (still paused, same run id) and completes it after the last. The single-screen default behaves as before. New describe('[#34515] …'), seven cases:
    • the same hand-off approved twice: the first resumes screen_1 (run now on screen_2), the second is refused 409 RESOURCE_CONFLICT, resume called once, run still on screen_2;
    • two resume_run calls, two items: approving the second after the first is refused 409;
    • an item approved after the person advanced the wizard in the app: refused 409, resume not called;
    • an elicited person who accepts after the wizard moved on meanwhile: refused 409, only the app's resume ran;
    • a screenNodeId of '' or 7: refused 400 before getRun;
    • CONTROL: a single-screen run approved with its screen completes;
    • CONTROL (widening): two approvals passing no screen both resume, as before.
  • packages/qa/dogfood/test/action-confirmation-handoff-33690.dogfood.test.ts (real stack, real automation engine, real MCP over HTTP, the host approval through dispatchActionResume): the fixture gains a gated two-screen wizard action and a gated one-screen action; three cases: the same item approved twice (first 200 and the run on step_2, second 409 and still on step_2), an item approved after the person advanced the wizard through POST /automation/FLOW/runs/RUN/resume (409), and CONTROL single screen completes.
  • Changed existing assertion (forced): the [#33690] case "a resume sent N times resumes 0 times" pins the hand-off with toEqual; it now expects run: { runId, values, screenNodeId: 'screen_1' }.

Acceptance notes

  • A wizard that loops back to the same screen node cannot be told apart by nodeId (option D of the analysis, a pause id from the engine). No flow doing that was found; not filed.
  • The binding is opt-in for the host: a call without screenNodeId behaves as before. The cloud host must store run.screenNodeId with the pending item and pass it back on approval. Cloud half: objectstack-ai/cloud#4549 (comment 6944653166).
  • The MCP resume_run tool itself (an agent resuming an ungated action) is not bound to a screen: the agent's own call submits to the current screen, as before. Not in this card.
  • The step-5 refusal carries no details discriminator, matching its sibling ("paused, but not on a screen"); the message names both screens.

Verification

Reproduction on main (dc66d33), before any code

Real stack (bootStack, SecurityPlugin, MCPServerPlugin, a confirmation-service double), a gated flow action over a two-screen wizard (step_1, step_2, both collecting an optional comment). The person starts it in the app (REST /actions, run paused on step_1), the agent calls MCP resume_run (handed off), the host approves through dispatchActionResume with confirm: true:

  • (a) same item approved twice: approve Add metamodel interfaces for ObjectQL/ObjectUI contract #1 → 200, run on step_2; approve ✨ Set up Copilot instructions #2 → 200, run completed (step_2 submitted with step 1's bag).
  • (b) agent calls resume_run twice (two items, call 1 / call 2): approve item 1 → 200, on step_2; approve item 2 → 200, completed.
  • (c) person advances in the app (POST /automation/FLOW/runs/RUN/resume) → on step_2; approve the item → 200, completed.
  • CONTROL: one approval → 200, on step_2, still paused.
Ablation (head bd71f4d, the step-5 comparison disabled through scripts/ablation-replace.mjs)
  • Leg A, runtime unit pins (source import): 4 failed (the four 409 cases), 3 passed (400 and both CONTROLs). Restored: blob == HEAD, git diff HEAD empty.
  • Leg B, dogfood (runtime through dist, rebuilt under the lock): 2 failed (the two 409 cases), 4 passed. Restore leg: runtime rebuilt, ablation-dist-preflight --absent ✓ (marker absent from all 12 built files), dogfood 6/6.
Local runs (head 85b5f36, the contract sentence and the docs lines; no code change)
  • dispatch-gates --commands: 113 derived (the same set as at 51975cc); 113 run, all exit 0 (six packages/spec gates that read dist first answered exit 3 for a stale build and were re-run green after pnpm --filter @objectstack/spec build); --ran reconciliation: 113 accounted for, 0 NOT-MEASURED.
  • The full dogfood battery was not re-run: this head changes a docblock in ai-service.ts and content/docs/ui/actions.mdx only.
Local runs (head 51975cc, after the changeset narrowing and a merge of main 6dd5716)
  • Full dogfood battery (pnpm --filter @objectstack/dogfood test, under os-verify-lock): exit 0, Test Files 478 passed, 3 skipped (481); Tests 4058 passed, 68 skipped (4126).
  • dispatch-gates --commands: 113 derived; 113 run, all exit 0; --ran reconciliation: 113 accounted for, 0 NOT-MEASURED.
  • check-adr-0087-registration: exit 0 (BREAKING, ! and the Clause-② narrowing read together; disposition not-required (no-migration-prescription)).
Local runs (head 1f37c11, earlier round)
  • pnpm --filter @objectstack/runtime test: exit 0, 611 files, 11345 passed, 19 skipped.
  • pnpm --filter @objectstack/runtime typecheck, @objectstack/spec typecheck, @objectstack/dogfood typecheck: exit 0.
  • packages/spec action-confirmation-contract.pin.test.ts: 14/14. check:generated: all artifacts current (its check:test-typecheck lane needed a 4096 MB heap and then read OK).
  • dispatch-gates --commands: 113 derived; 113 run, all exit 0 (three first answered exit 3 for prerequisites and were re-run green after fetching the teardown fixture commit and building ./packages/**); --ran reconciliation: 0 NOT-MEASURED.

Generated by Claude Code

A handed-off resume_run now names the screen its values were given for
(ActionConfirmationHandOff.run.screenNodeId). dispatchActionResume takes
it back and step 5 refuses a run no longer paused on that screen with
409 RESOURCE_CONFLICT, leaving the run where it is. An elicited approval
is bound the same way. Without the key, the current screen is resumed
as before.

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

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/runtime, @objectstack/spec, touching 8 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/runtime/src/action-execution.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/permissions/system-context.mdx (via resumeActionRunRequest (symbol, a top-level function))
  • content/docs/ui/actions.mdx (via screenNodeId (symbol, a field of interface ActionResumeRequest))
What this run could not see
  • 1 changed file(s) yielded no anchor (packages/runtime/src/action-execution.ts) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 3bbda33b78fff2681db9c09732347bc62ffc4cc6 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from c72dbb805842c4533d4e888158bc9a514c92e779 — the merge of head 85b5f360e19824f42dea785b8036c39c1caf8dbd into base 3bbda33b78fff2681db9c09732347bc62ffc4cc6, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin c72dbb805842c4533d4e888158bc9a514c92e779 && git checkout c72dbb805842c4533d4e888158bc9a514c92e779
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3bbda33b78fff2681db9c09732347bc62ffc4cc6 85b5f360e19824f42dea785b8036c39c1caf8dbd && git checkout -B drift-repro 3bbda33b78fff2681db9c09732347bc62ffc4cc6 && git merge --no-ff 85b5f360e19824f42dea785b8036c39c1caf8dbd

node scripts/docs-audit/affected-docs.mjs --json 3bbda33b78fff2681db9c09732347bc62ffc4cc6

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 3bbda33b78fff2681db9c09732347bc62ffc4cc6 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

Final head for review: 1f37c11a097f391462df441dfbdc157ce8fecde9 (card #34515, branch claude/project-thread-di6l33). CI on this head, latest run per check: 68 green (58 success, 10 skipped), 0 failed; mergeable state clean. The Dogfood Regression Gate shards were skipped by the selector, so the three new dogfood cases rest on the local reading in the body (6/6, ablation leg B 2 failed / 4 passed as predicted, restore leg 6/6). Derived gates 113/113 exit 0. check-governed-merges.mjs --pr 34753: NOT governed, 0 of 8 paths. Clause-②: yes (widening) (optional screenNodeId on the host resume door; a call without it behaves as before; 409 RESOURCE_CONFLICT reused, as the seat approved), Metadata-protocol: none. Owed: L1 review and the contract-tier L2 review (a packages/spec/src path), both on this head; then the seat's governed step. The PR stays a draft and unarmed. A push after this comment restarts both.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 1f37c11 · 2026-11-17T10:21Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmTHGRTjPqZAcBuo9WH

席位核对

L1 first review · REWORK (declaration and prose only; the code is accepted as read) · head 1f37c11a097f391462df441dfbdc157ce8fecde9 (final head 6945242171) · card #34515 · read 2026-11-17T10:22Z

Rework items

  1. Clause-② is missing a narrowing arm: the elicited approval. The host door's binding is opt-in and is a widening, as declared. The elicited branch of resumeActionRun is not opt-in.

    • It sets boundScreenNodeId = screenNodeIdOf(screen) unconditionally after the person accepts, and continueAdmittedRun hands that to step 5.
    • On main (dc66d330), the same input answers 200: an MCP resume_run on a client that can be asked in place, where the person accepts after the wizard moved on in the meantime. Step 5 re-reads only "paused on a screen" and resumes the current one.
    • At this head the same call is refused 409 RESOURCE_CONFLICT. The new unit case "an elicited person who accepts after the wizard moved on meanwhile" pins exactly that.
    • Ruling 6942893807 (A) decides the behaviour, and I am not asking to change it. The declaration has to say it. As written, "Nothing already accepted is refused" in the changeset and the body, and Clause-②: yes (widening) alone, are not true for this path.

    Please:

    • add a (narrowing) arm that names the elicited path, in the body and the changeset;
    • give the changeset a FROM → TO line for that path;
    • add a Skills-docs: line, verified against skills/**. I read objectstack-ai/SKILL.md:211-213 and objectstack-platform/SKILL.md:344, and neither teaches the second-resume behaviour, so none with that reason looks right;
    • mark the title with !;
    • run the local dogfood battery the narrowing arm owes and quote its pinned reading.
  2. PR-body footer form (body only). The body ends with 🤖 Generated with [Claude Code](https://claude.com/claude-code) and a bare session URL. AGENTS.md's form for a PR body is a blank line, ---, then _Generated by [Claude Code](https://claude.ai/code/session_<id>)_. Please send that form and read the body back.

Checklist (read on GitHub at this head, not from the report)

  • Shape: draft, base main, mergeable_state: clean. Fixes #34515 is the only closing-keyword hit. The claim (6943219796) predates the 09:49Z wind-down, so this card is in flight. The premise required by the ruling, reproduction before any code, is recorded on main dc66d330 in all three of the card's ways, with a single-screen control.
  • File surface: 8 files, +386/−35. All are inside the claim's surface. No new code is minted, so the ledger is untouched, as the claim allowed.
  • Mechanism, read in the source:
    • refuseUnresumableAdmittedRun now returns { subject, screen }.
    • The hand-off writes run.screenNodeId only when the engine names a non-empty nodeId.
    • The host door refuses a non-string or empty screenNodeId with 400 before getRun. A valid one rides hostDoor into step 5, which refuses a mismatch with 409 before automation.resume, so nothing is consumed.
    • screenNodeIdOf treats a missing nodeId as undefined. A bound id against an unnamed screen is therefore refused, which fails closed. The message names both screens, or "another screen".
    • The MCP resume_run path without a hand-off is untouched.
  • Spec face: packages/spec/src/contracts/ai-service.ts changes TypeScript interface and docblock only: an optional run.screenNodeId, and rule-4 and service prose that replaces the "void an item whose run has moved on is the host's" sentence. No Zod schema moves. content/docs/ui/actions.mdx matches the new door.
  • Tests: seven [#34515] unit cases, and three dogfood cases over the real stack, the real engine and MCP over HTTP. The one forced change is the [#33690] toEqual, which now includes screenNodeId: 'screen_1', and it is named. Two ablation legs are reported, restored to the HEAD blob and to dist.
  • Gates at this head:
    • Check-runs on 1f37c11a…: 68 runs, 58 success, 10 skipped, 0 failed. Dogfood Regression Gate (the aggregate) is success, and its shards were skipped by the selector, as the area said. So the new dogfood cases have local readings only. That is item 1's battery.
    • git merge-tree --write-tree against today's origin/main is clean.
    • check-governed-merges.mjs --pr 34753, read here: 0 of 8 paths governed, 421 lines.

Owed after this

  • L2: owed, CONTRACT_REVIEW_TIER, on the fixed head. The faces are non-test packages/spec/src, Clause-② yes, and, after item 1, a declared narrowing.
  • Landing tier: spec face and narrowing, handed to the seat for Tier H. Not governed.

@objectstack-fleet objectstack-fleet Bot changed the title fix(runtime): bind a resume approval to the screen it was given on fix(runtime)!: bind a resume approval to the screen it was given on Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

Final head for review (supersedes 6945242171): 51975cc36b11d651d783a4e7079621ede9c3b4cd (card #34515, branch claude/project-thread-di6l33), after L1 rework 6945290592 and a merge of main at 6dd57163. CI on this head, latest run per check (after the body edit re-ran PR-body guards and Check Changeset): 68 green (56 success, 12 skipped), 0 failed; mergeable state clean. Derived gates 113/113 exit 0 (--ran: 0 NOT-MEASURED). The Dogfood Regression Gate shards were skipped by the selector; the full dogfood battery was run locally on this head under the verify lock: exit 0, 478 files passed / 3 skipped, 4058 tests passed / 68 skipped. check-governed-merges.mjs --pr 34753: NOT governed, 0 of 8 paths. Declarations now: Clause-②: yes (narrowing) (the elicited in-place accept after the wizard moved on: resumed the current screen, now 409 RESOURCE_CONFLICT; widened beside it by two optional screenNodeId keys), changeset BREAKING paragraph with FROM → TO, ADR-0087 not-required (no-migration-prescription), Metadata-protocol: none, Skills-docs: none; title carries !. Code is unchanged from the reviewed head apart from the merge. Owed: L1 delta review and the contract-tier L2 review (a narrowing on a packages/spec/src path), both on this head; then the seat's governed step. The PR stays a draft and unarmed. A push after this comment restarts both.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 51975cc · 2026-11-17T11:15Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmTHGRTjPqZAcBuo9WH

席位核对

L1 delta · ACCEPT · head 51975cc36b11d651d783a4e7079621ede9c3b4cd over 1f37c11a (my REWORK 6945290592; final head 6946459224) · card #34515 · read 2026-11-17T11:16Z

Delta

  • Code is unchanged. Over the PR's 8 files, git diff 1f37c11a 51975cc3 moves only .changeset/34515-resume-approval-bound-to-screen.md. The main merge (6dd57163) touches none of those files.
  • Item 1 (narrowing arm):
    • Declaration. The changeset and the body now declare Clause-②: yes (narrowing), naming the elicited in-place accept after the wizard moved on. FROM is "resumed the screen the run had moved on to"; TO is 409 RESOURCE_CONFLICT, nothing resumes.
    • Widening beside it. The two optional screenNodeId keys are named alongside the narrowing.
    • False claim removed. "Nothing already accepted is refused" is gone.
    • Changeset additions. It now carries the **BREAKING** paragraph with the remedy ("the agent asks again on the screen the run is on now"), an "Unchanged" line, and adr-0087: not-required (no-migration-prescription). That disposition holds: the moved answer is a runtime refusal, and the new keys are optional TS members.
    • Skills-docs. Skills-docs: none cites objectstack-ai/SKILL.md:211-217 and objectstack-platform/SKILL.md:344, which matches my reading.
    • Title. It is now fix(runtime)!:.
    • Dogfood battery. The full battery is pinned at this head (51975cc3): exit 0, 478 files and 4058 tests passed.
  • Item 2 (footer): the body now ends with the blank line, --- and _Generated by [Claude Code](https://claude.ai/code/session_…)_.

The two deviations the area named

  • (a) The signed line under the footer is the relay's own trailer and sits after the footer block. It is accepted, as on other PRs this shift.
  • (b) yes (narrowing) rather than no (narrowing) is well formed under AGENTS.md: yes|no plus at most one arm. yes is right here, because the PR also extends a public contract face with a new optional member in packages/spec/src/contracts/ai-service.ts. execution-duties.md's no line covers a card that only narrows.
    • The narrowing still drives the same duties: BREAKING, !, the battery, and contract-tier L2.
    • The same shape is pending in .changeset/33203-managed-no-local-password.md.
    • If the seat wants the two texts reconciled, that is a skills card. It does not block this PR.

Re-read at this head

  • Check-runs on 51975cc3…: 72 runs, all completed: 60 success, 12 skipped, 0 failed.
  • git merge-tree --write-tree against today's origin/main is clean.
  • The governed reading is unchanged (0 of 8 paths).

Owed after this

  • L2: owed, CONTRACT_REVIEW_TIER, at this head. Its faces are a non-test packages/spec/src file and the declared narrowing.
  • Landing tier: spec face and narrowing, handed to the seat for Tier H.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 51975cc36b11d651d783a4e7079621ede9c3b4cd
Local-runs: none
Scope: packages/spec/src/contracts/ai-service.ts + packages/runtime/src/domains/mcp.ts, packages/runtime/src/action-dispatch.ts, packages/runtime/src/action-execution.ts (implementing files); narrowing floor, every path of the diff outside the prose faces: the four files above plus packages/runtime/src/action-confirmation-handoff-33690.test.ts and packages/qa/dogfood/test/action-confirmation-handoff-33690.dogfood.test.ts; read in the cited code, not reviewed: packages/spec/src/contracts/automation-service.ts (ScreenSpec.nodeId, resume, getSuspendedScreen), packages/services/service-automation/src/engine.ts (getSuspendedScreen, the in-process resuming guard), main's copy of ai-service.ts (rule 4). Prose faces read for agreement only: .changeset/34515-resume-approval-bound-to-screen.md, content/docs/ui/actions.mdx.
Security-touching: yes

Inputs read: card #34515 body and all six comments (analysis 6932866004, ruling 6942893807, claim 6943219796, registration 6943263230, dev report 6944537865, seat correction 6945347284); PR #34753 body, its 8-file list, the net diff against merge-base 6dd57163; the 72 check-runs on this head. The L1 comments on the PR were not relied on. Resubmission check: over the PR's 8 files, the withdrawn head 1f37c11a and this head differ in the changeset alone, and main moved none of the 8 files in between, so the code is the code of the withdrawn head.

Check-runs on this head: 72, all completed, none pending: 60 success, 12 skipped, 0 failed. Skipped: the Dogfood Regression Gate shard matrix, Dogfood Verify CLI, Temporal Conformance, UI Published Artifacts, Lint UI, Queue verdict, Borrowed queue verdict, the schedule gate, the two opt-in harnesses, and the second (body-edit) runs of Auto Label and Check PR Size. Check Changeset success on both runs; Test Core 1 to 8 success; TypeScript Type Check success; Governed Surface Queue Guard success.

① Derived judgments

  • ActionConfirmationHandOff.run.screenNodeId (spec, optional TypeScript member): a widening of a published contract interface. Right. Written only from the engine's ScreenSpec.nodeId at hand-off (screenNodeIdOf), never from caller input; omitted when the engine names no node. A host that ignores it sees no change.
  • ActionResumeRequest.screenNodeId (runtime, optional): a widening. Right. Omitted or undefined, hostDoor carries no screenNodeId, boundScreenNodeId stays undefined, and step 5 is byte-for-byte the step 5 of main: "unchanged without screenNodeId" is true. Sent as null, '' or a non-string it is refused 400 before getRun: that is a new answer, reachable only by a caller that sends the new key, so no call that exists today is narrowed; it fails closed.
  • Name: screenNodeId on both keys, exactly the name the seat set in 6932866004. Right.
  • Refusal: 409, code derived from the status by deps.error through resumeDoorError, no details, the same envelope as the sibling step-5 refusal ("paused, but not on a screen"). The unit pins read RESOURCE_CONFLICT at the host door and at the MCP bridge, and Test Core is green. No code minted, ledger untouched. Right, and as the seat approved.
  • Compare, read in refuseUnresumableAdmittedRun: a supplied id against a current screen with no nodeId is a mismatch and is refused (closed); a supplied id for a run not paused on a screen is refused by the earlier 409 (closed); a supplied id equal to the current screen resumes. The compare runs before automation.resume, so a refusal consumes nothing. Right.
  • Elicited accept (MCP resume_run, declared-gated flow action, form-mode elicitation): bound unconditionally to the screen read before the person was asked; a run that moved on meanwhile is refused 409 where main answered 200 and submitted to the other screen. A narrowing of a published door's accept set. Declared. Right as a declaration; see ③ for whose decision it is and S1 for the contract text.
  • MCP resume_run of an action with no declared confirmation: hostDoor absent, no elicitation, unbound, unchanged. Right.
  • Invocation row: a step-5 mismatch is thrown inside continueAdmittedRun, so it writes one failed action_invocation row, as every step 4 to 5 refusal already does. Unchanged rule, right.
  • action-execution.ts (N2 of record 6932783796): the enforced-set comment now names the host resume door; it agrees with resumeAdmissionRefusal's hostConfirmation arm. Right.

② Semver level

Clause-②: yes (narrowing) — the right single line for a diff that both widens and narrows. AGENTS.md allows yes|no plus at most one arm of the closed pair, and record-recognisers.mjs reads yes (narrowing) as the narrowing face ("a diff that widens and narrows owes the narrowing face's review"). The line stands on the PR body and the changeset, identically worded.

  • Level: @objectstack/spec patch and @objectstack/runtime patch beside Metadata-protocol: none. check-changeset-no-major.mjs grades by the metadata protocol alone: none takes patch on every entry, and a non-protocol breaking change ships patch with its BREAKING banner. No authorable key, value or metadata type moves, so none is true. Check Changeset concluded success on this head.
  • BREAKING paragraph: FROM (the accept resumed the screen the run had moved on to, with the first screen's values, as the person) and TO (409 RESOURCE_CONFLICT, nothing resumes, the run stays) are both true against the code and against main. The one-line fix ("the agent asks again on the screen the run is on now") is present and is what the refusal message says.
  • ADR-0087 not-required (no-migration-prescription): holds; nothing stored is rewritten.
  • Title carries !. Skills-docs: none with its reason.
  • Both published packages the diff moves are named; the dogfood package is private test code.

③ Boundary flags

  • Dev flag, elicited path bound too (deviation in 6944537865): answered in part, ESCALATED in part. Judged as a narrowing against the published spec on main: rule 4 says an elicited accept "covers that one call", and that call was a submit of values the agent gave for the screen the run was then on. main never declared "an accept resumes whichever screen the run has reached" as a capability; the 200 it gave is the very outcome the card exists to stop. So the narrowing makes the rule real and takes no declared capability from a consumer. That is the design answer. The decision answer is not this record's: option A as the maintainer read it in 6932866004 is a hand-off mechanism (two optional keys, a step-5 compare, "Clause-② yes, widening", facet ④ "only adds an optional key"), and its three cases are all pending items. The elicited cell is neither a pending item nor a widening, and it is BREAKING. The seat's correction 6945347284 is the seat's word, not the maintainer's. ESCALATED to the Tier H approval: the maintainer must be shown, and confirm, the BREAKING elicited cell as such; if it is not confirmed, the elicited binding comes out and the PR returns to the widening the ruling describes. This record does not decide it.
  • Dev flag, cloud follow-up "noted, not filed": ESCALATED to the seat. The ruling's execution line for A orders a separate cloud card (store the key with the pending item and pass it back). Fixes #34515 closes the card on merge. Until cloud passes the key back, every handed-off approval stays on the unbound path, which is fail-open with respect to the card's defect: the three reproduced cases still reproduce on a host that omits the key. Only the elicited path is closed by this repo alone. The contract cloud must satisfy is two optional keys, so cloud can adopt it with no breaking change. The cloud card must exist before this PR closes Host resume seam: a second resume of the same hand-off after a wizard advanced hands the first screen's values to the current screen as the approver (bind an approval to its screen) #34515.
  • Dev flag, omission keeps the unbound path: answered. It is the ruling's intent (option A: optional keys), not a gap in the diff; the consequence is the bullet above.
  • Dev flag, ablation leg B preflight exited 1 in-leg: a local reading, not a gate verdict; not relied on here.
  • Dev flag, the dogfood fixture grew two flow actions and two flows: test code, the lane seat's ACCEPT.
  • open_questions entry (route to the L2 seat): answered by this record.
  • Out-of-scope finding, a wizard looping back to the same node (option D): answered; the limit is stated in the changeset. It is not stated in the spec or in actions.mdx (see N2).
  • Security: an approval and resume gate is authorisation-adjacent. No bypass or replay is added. The new key can only add a refusal; the MCP resume_run input cannot carry it (boundScreenNodeId is read from hostDoor or from the engine's own screen, never from the agent's input); every existing gate (owner, admission, confirmation, subject read) is asked as before. No access finding.
  • Dogfood: the three new dogfood cases and the 4058-pass full battery are local readings only. The Dogfood Regression Gate shards were skipped by the selector on this head, so there is no CI verdict for any dogfood case here; the aggregate job's success is the selector's, not a run of them. No dogfood case, local or CI, covers the narrowed elicited cell.
  • Unit pins (CI, Test Core green): seven [#34515] cases pin the 409 on all three hand-off cases and on the elicited cell, the 400, and both controls, against an automation double. They pin the door's contract. They do not pin that the real engine serves a distinct nodeId per screen; ScreenSpec.nodeId is a required member of the automation contract, which is what the door relies on.
  • SQL push-down: no query, id materialisation or in-app join is added. Nothing to flag.

④ Design judgment

packages/spec/src/contracts/ai-service.ts, against ruling 6942893807 (A), its first consumer (resumeActionRun and the host door) and the scenario on the card:

  • Rule 4's hand-off bullet, the run.screenNodeId jsdoc and the IActionConfirmationService paragraph each agree with the code, sentence by sentence: recorded at hand-off from the parked screen, bound when the host passes it back, refused 409 with the run left where it is, unbound when omitted, deciding an item once left with the host. The replaced sentence ("voiding an item whose run has moved on" is the host's) is correctly gone.
  • Tried to break it: a different screen id supplied by the host (refused unless it is the current screen, which is the host's own trusted call); null or '' (400); an id for a run parked on a non-screen node (409 by the earlier check); a current screen with no nodeId (refused); the agent supplying the id (no path); a second approval after the wizard completed (404 at step 2). All closed.

S1 (should-fix) — the contract does not state the narrowing this PR declares BREAKING. In ai-service.ts rule 4, "Elicited accept: the call dispatches as any admitted call does, exactly once" is unchanged, and the new binding sentence is written for the hand-off alone and is conditioned on "when the host passes that screen back". The code binds an elicited accept of a resume_run to the screen the run was parked on when the person was asked, unconditionally, and refuses 409 otherwise. The only statements of that are the step-5 docblock in mcp.ts and the changeset. Rule 4 is the published list of what each answer does and binds every AI door, so an implementer or client author reading it learns nothing of the refusal. One sentence on the elicited-accept bullet (for a resume_run: bound to the screen the run was parked on when the person was asked; a run that moved on meanwhile is refused 409 RESOURCE_CONFLICT and stays where it is) closes it. Whether that sentence ships depends on the escalation in ③.

packages/runtime/src/domains/mcp.ts, action-dispatch.ts, action-execution.ts, against the contract:

  • The code agrees with every sentence the contract does carry. The step-5 docblock, the hostDoor jsdoc, the resumeActionRunRequest docblock and the ActionResumeRequest.screenNodeId jsdoc are true of the code.

N1 (nit) — the compare is read-then-resume, not atomic with the engine's resume. Step 5 reads getSuspendedScreen, then calls automation.resume(runId, signal), which takes no expected node; the engine's resuming guard is in-process only. Sequentially the check cannot pass twice. Two calls on two instances can both read the first screen before either resumes; the later one then submits to the screen the earlier one reached. The window is narrow and is the same class as every other gate of this door; the contract keeps "deciding a pending item once" with the host, which covers a double approval of one item, though not two items or an in-app advance racing an approval. Closing it needs an expected-node compare inside the engine's resume, an automation-contract change of option D's kind that ruling A did not choose. Left as a follow-up card, with the limit stated beside the looping-wizard limit.
N2 (nit) — limits and the 400 are stated only in the changeset. content/docs/ui/actions.mdx and the ActionResumeRequest.screenNodeId jsdoc do not say that a null, empty or non-string screenNodeId is refused 400, nor that a wizard looping back to the same node is not told apart. The docs example passes handOff.run.screenNodeId straight through: a host that reads a pending item stored before the upgrade from a nullable column passes null and is refused 400 (closed and loud, but a surprise). Fixable on the prose face.
N3 (nit) — the elicited branch falls back to unbound when the screen read at ask time has no nodeId (screenNodeIdOf answers undefined), while the host door refuses a supplied id against an unnamed screen. ScreenSpec.nodeId is required, so only a non-conforming engine reaches it. No unit case pins either unnamed-screen arm, and the 409 carries no details discriminator, so an agent tells "moved on" from "not on a screen" by the message alone. Accepted deviation or follow-up.

Open on this head: S1, and the two escalations in ③ (the maintainer's confirmation of the BREAKING elicited cell; the cloud card). No finding of the failing grade.

Implemented-by: claude/project-thread-di6l33
Reviewed-by: session_01ADHkmP44onN8RMzsPMqjRq

VERDICT: PASS

…mation contract

The elicited accept of a resume_run is bound to the screen the run was parked on
when the person was asked; a run that moved on meanwhile is refused 409 and stays
where it is. The host-door guide also names the 400 for an unusable screenNodeId
and the looping-wizard limit.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRXuRn93HphKp7kXEz

Final head for review (supersedes 6946459224): 85b5f360e19824f42dea785b8036c39c1caf8dbd (card #34515), one commit on 51975cc3 answering L2 S1 (6946628926): packages/spec/src/contracts/ai-service.ts rule 4 "Elicited accept" now states the narrowing (a resume_run in-place accept is bound to the screen the run was paused on when asked; moved on meanwhile ⇒ 409 RESOURCE_CONFLICT, nothing resumed), and content/docs/ui/actions.mdx gains the screenNodeId 400 rule and the loop-back-wizard limit (nit N2). Delta: 2 files, +8 / -2, docblock and docs only; no executable code moved, so the full dogfood reading on 51975cc3 (4058 passed) stands. CI on this head, latest run per check: 70 green (58 success, 12 skipped), 0 failed; mergeable state clean. Derived gates 113/113 exit 0 (--ran: 0 NOT-MEASURED). Body: cloud half is objectstack-ai/cloud#4549 (comment 6944653166). Declarations unchanged: Clause-②: yes (narrowing), Metadata-protocol: none, Skills-docs: none. Owed: L1 and L2 delta reviews on this head; then the seat's governed step. The PR stays a draft and unarmed. A push after this comment restarts both.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmTHGRTjPqZAcBuo9WH

席位核对

L1 delta · ACCEPT · head 85b5f360e19824f42dea785b8036c39c1caf8dbd over 51975cc3 (my delta ACCEPT 6946488378; final head 6947438568) · card #34515 · read 2026-11-17T12:01Z

Delta (one commit, 2 files, +8/−2, prose only)

  • packages/spec/src/contracts/ai-service.ts, rule 4. One added docblock paragraph says that, for a resume_run call, the elicited accept is bound to the screen the run was parked on when the person was asked, and that a run that moved on is refused 409 RESOURCE_CONFLICT and stays where it is. This matches the code I read at 1f37c11a: boundScreenNodeId = screenNodeIdOf(screen) after accept, then step 5. No type moves.
  • content/docs/ui/actions.mdx adds two statements, both checked against the code:
    • A screenNodeId that is null, empty or not a string is refused 400. This is true: resumeActionRunRequest refuses any value other than undefined that is not a non-empty string, so null is refused.
    • A wizard that loops back to the same screen is not told apart. This is the limit the changeset already declares.

Re-read at this head

  • Check-runs on 85b5f360…: 74 runs, all completed: 62 success, 12 skipped, 0 failed.
  • git merge-tree --write-tree against today's origin/main is clean.
  • The declarations and the changeset are unchanged.

Owed after this

  • L2: the delta at this head (CONTRACT_REVIEW_TIER).
  • Landing tier: spec face and narrowing, handed to the seat for Tier H.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 85b5f36 · 2026-11-17T12:01Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 85b5f360e19824f42dea785b8036c39c1caf8dbd
Local-runs: none
Scope: packages/spec/src/contracts/ai-service.ts + packages/runtime/src/domains/mcp.ts, packages/runtime/src/action-dispatch.ts, packages/runtime/src/action-execution.ts (implementing files); narrowing floor, every path of the diff outside the prose faces: the four files above plus packages/runtime/src/action-confirmation-handoff-33690.test.ts and packages/qa/dogfood/test/action-confirmation-handoff-33690.dogfood.test.ts; read in the cited code, not reviewed: packages/spec/src/contracts/automation-service.ts (ScreenSpec.nodeId). Prose faces read for agreement only: .changeset/34515-resume-approval-bound-to-screen.md, content/docs/ui/actions.mdx.
Security-touching: yes

The surface is an approval and resume gate, which is authorisation-adjacent; this delta itself moves prose only.

Delta record over 6946628926 (VERDICT PASS on 51975cc3, S1 open, N1 to N3). Inputs read: that record in full; the lane's final-head note 6947438568; the PR body at this head; card #34515 body and its six comments (analysis 6932866004, ruling 6942893807, claim 6943219796, registration 6943263230, dev report 6944537865, seat correction 6945347284); the one-commit diff 51975cc3..85b5f360; the files at this head; the 74 check-runs on this head. The L1 comments on the PR were not relied on.

What the delta is, read in the tree: one commit whose parent is the reviewed head, nothing from main; two files, +8 and -2, prose only: four docblock lines in packages/spec/src/contracts/ai-service.ts (rule 4, the elicited-accept bullet) and one reflowed paragraph in content/docs/ui/actions.mdx. No file under packages/runtime moved, no type moved, the changeset did not move. Against the withdrawn head 1f37c11a, over the PR's 8 files, the only differences are the changeset (the earlier round) and these two prose hunks, so the executable code is still the code of the withdrawn head.

Check-runs on this head: 74, all completed, none pending: 62 success, 12 skipped, 0 failed. Skipped: the Dogfood Regression Gate shard matrix, Dogfood Verify CLI, Temporal Conformance, UI Published Artifacts, Lint UI, Queue verdict, Borrowed queue verdict, the schedule gate, the two opt-in harnesses, and the second (body-edit) runs of Auto Label and Check PR Size. Check Changeset success on both runs; Test Core 1 to 10 and its aggregate success; TypeScript Type Check success; Build Docs and Check Documentation Links success; Spec property liveness success; Governed Surface Queue Guard success.

① Derived judgments

Nothing derived moved: the delta adds no key, no code path and no refusal. Every judgment of 6946628926 ① stands as written there, re-read at this head against the unchanged mcp.ts, action-dispatch.ts and action-execution.ts. The two the delta's prose now speaks to, re-derived:

  • Elicited accept of a resume_run (mcp.ts, resumeActionRun): the screen is read by refuseUnresumableAdmittedRun immediately before the person is asked; after accept, boundScreenNodeId = screenNodeIdOf(screen); continueAdmittedRun reads the screen again and refuses a different nodeId with 409 before automation.resume. The new rule-4 sentence states exactly that, case by case: still on the asked screen, it resumes (the bullet's first sentence); on another screen, 409 RESOURCE_CONFLICT, nothing resumed, run left in place (the new sentence). A run no longer on any screen, or no longer paused, is refused by the earlier checks the door already documents; the sentence does not speak to it and does not need to. Right.
  • Host door screenNodeId of null, '' or a non-string: refused 400 in resumeActionRunRequest before getRun (screenNodeId !== undefined and not a non-empty string). The new actions.mdx sentence states exactly that, and its advice (omit the key for an item stored without one) is the unbound path the code takes for undefined. Right.

② Semver level

Clause-②: yes (narrowing) — unchanged, and still the right single line for a diff that both widens and narrows; body and changeset carry it identically. Nothing in the delta bears on the level: @objectstack/spec patch and @objectstack/runtime patch beside Metadata-protocol: none, the BREAKING paragraph with its FROM and TO and its one-line fix, ADR-0087 not-required (no-migration-prescription), the ! in the title and Skills-docs: none are as judged in 6946628926, and the changeset file is byte-identical to the reviewed head. A docblock sentence and a docs paragraph need no changeset entry of their own. Check Changeset concluded success on this head, twice.

③ Boundary flags

  • BREAKING elicited cell: ESCALATED, carried unchanged. Ruling 6942893807 adopts option A as the analysis 6932866004 described it (two optional keys, a widening, three pending-item cases). The elicited cell is neither a pending item nor a widening. The seat's correction 6945347284 is the seat's word, not the maintainer's. The maintainer must be shown, and confirm, the BREAKING elicited cell as such at the Tier H approval; if it is not confirmed, the elicited binding and the rule-4 sentence this delta adds come out together and the PR returns to the widening the ruling describes. This record does not decide it. The design reading is unchanged: the 200 that main gave was never a declared capability, and the narrowing makes rule 4's "covers that one call" real.
  • Cloud card: answered on the PR body. The body's acceptance notes now name the cloud half as objectstack-ai/cloud#4549, so Fixes #34515 no longer closes the card with the cloud follow-up unnamed. Two limits on that answer, stated plainly: the cloud repository is outside what this review can read, so that card's existence and wording were not verified here; and the comment id the body cites beside it (6944653166) is not among the comments of this PR or of card Host resume seam: a second resume of the same hand-off after a wizard advanced hands the first screen's values to the current screen as the approver (bind an approval to its screen) #34515. The seat confirms the cloud card by its own read before its governed step. The substance is unchanged: until cloud stores run.screenNodeId and passes it back, a handed-off approval stays on the unbound path, which is fail-open with respect to the card's three reproduced cases; only the elicited path is closed by this repo alone. The contract cloud must satisfy is two optional keys, adoptable with no breaking change.
  • Omission keeps the unbound path: answered as before; it is option A's shape, not a gap in the diff.
  • Security: no bypass or replay is added, and the delta adds nothing executable. The binding is read from the host door or from the engine's own screen, never from the agent's input. No access finding.
  • Dogfood: no dogfood case has a CI verdict at this head. The Dogfood Regression Gate shards were skipped by the selector, so the aggregate job's success is the selector's, not a run. The three new dogfood cases, the ablation legs and the 4058-pass full battery are local readings, and the battery was read on 51975cc3, not re-run here; with no executable line moved since, that is a reasonable carry, and still not a gate verdict. No dogfood case covers the narrowed elicited cell.
  • Unit pins (CI, Test Core green on this head): the seven [#34515] cases pin the door's contract, including the elicited cell's 409 and the 400, against an automation double. They do not pin either unnamed-screen arm (N3).
  • SQL push-down: no query, id materialisation or in-app join is added. Nothing to flag.

④ Design judgment

packages/spec/src/contracts/ai-service.ts, rule 4, against the code it cites (resumeActionRun, refuseUnresumableAdmittedRun, continueAdmittedRun) and the scenario on the card:

  • The added sentence ("For a resume_run call the accept is bound to the screen the run was parked on when the person was asked: when the run has moved on to another screen meanwhile, the resume is refused 409 RESOURCE_CONFLICT, nothing resumes, and the run stays where it is") is unconditional, as the code is: it carries no "when the host passes that screen back", which is right for the elicited path and is the difference from the hand-off bullet. It names the status and the code the unit pins read. It agrees with the changeset's BREAKING paragraph, the PR body and the step-5 docblock in mcp.ts.
  • "Exactly once" still holds as written. One accept leads to one pass through continueAdmittedRun and at most one automation.resume; the refusal is the zero case, and the bullet already allowed it ("as any admitted call does": an admitted call is still refused when the re-read at steps 4 and 5 fails, on main as here). The new sentence names one more such refusal on the same bullet, so the bullet no longer promises a resume it does not give.
  • Tried against the cases 6946628926 listed. Same screen: resumes, as stated. Another named screen: 409, as stated. Run off any screen or finished: refused earlier, outside the sentence. A wizard that loops back to the same node: the run is on "the screen" again by id and resumes; the sentence is literally true and the limit is stated in the changeset and now in actions.mdx. A screen with no nodeId at ask time: the code falls back to unbound, which the sentence does not say; see N3.

content/docs/ui/actions.mdx, read for agreement: the 400 sentence and the looping-wizard sentence are both true of the code and agree with the changeset. One paragraph line is left long after the insert; cosmetic, Build Docs is green.

S1: closed

N1 (nit) — not moved by this delta. The compare is read-then-resume, not atomic with the engine's resume: two calls on two instances, or an in-app advance landing between the step-5 read and the resume, can still submit to the screen the other reached. The new rule-4 sentence shares that limit exactly as the hand-off bullet already did on the reviewed head; it adds no new exposure. Closing it needs an expected-node compare inside the engine's resume, an automation-contract change ruling A did not choose. Follow-up card, as before.
N2 (nit) — closed on the docs face, open on the jsdoc. content/docs/ui/actions.mdx now states the 400 for a null, empty or non-string screenNodeId and the looping-wizard limit. The ActionResumeRequest.screenNodeId jsdoc in packages/runtime/src/action-dispatch.ts is unchanged and still says neither; a host author reading the type in an editor meets the 400 unannounced. One clause on the jsdoc closes it; it can ride any later touch of that file.
N3 (nit) — not moved in code, and now visible in the contract text. When the screen read at ask time has no nodeId, screenNodeIdOf answers undefined and the elicited accept is unbound, while rule 4 now states the binding without exception. ScreenSpec.nodeId is a required member of the automation contract, so the sentence is true of every conforming engine and only a non-conforming one reaches the fallback. No unit case pins either unnamed-screen arm, and the 409 carries no details discriminator. Accepted deviation or follow-up, as before.

No must-fix, no should-fix.

Open on this head: nits N1, N2 (jsdoc part) and N3; the escalation of the BREAKING elicited cell to the maintainer at Tier H; and the seat's own read of objectstack-ai/cloud#4549 before its governed step.

Implemented-by: claude/project-thread-di6l33
Reviewed-by: session_01ADHkmP44onN8RMzsPMqjRq

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Seat record · 2026-11-17T12:06Z · Head-sha: 85b5f36

维护者速读

  • 改了什么:AI 交给人确认的 resume_run 待办现在记下当时停住的那一屏(run.screenNodeId),宿主批准时把它传回;流程已经不在那一屏就拒绝(409 RESOURCE_CONFLICT),流程原地不动。客户端当场确认的情形同样绑定当屏。
  • 为什么改:在 main 上用真实两屏向导复现:同一待办批两次、agent 调两次 resume_run、用户先在应用里推进后才批,三种情形都把第一屏的值以批准人身份交给了第二屏(你对 Host resume seam: a second resume of the same hand-off after a wizard advanced hands the first screen's values to the current screen as the approver (bind an approval to its screen) #34515 的裁决 A,6942893807)。
  • 风险与回滚:宿主侧只加可选键,不传 screenNodeId 的调用照旧。唯一变严的一路(BREAKING):客户端当场确认时,若人点确认前向导已被推进到别的屏,以前会续跑那一屏,现在拒 409、什么都不续跑,agent 需在当前屏重新发起。循环回到同一屏节点的向导仍分不开(已知局限)。回滚即撤回本 PR。
  • 先看:packages/runtime/src/domains/mcp.ts(第 5 步比对、交出待办写 screenNodeId、当场确认分支)、packages/spec/src/contracts/ai-service.ts(新可选键与规则 4)。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run src/action-confirmation-handoff-33690.test.ts -t 34515,预期 7 条全绿。
  • 需要你做的:用 os-zhuang 审读并批准(spec 面加收窄,按 Tier H 交人),并请明确确认上面那一路收窄:裁决 A 的选项文写的是「不收窄任何已有调用」,对这一路不成立(席位更正 6945347284);席位读为 A 本就要挡的后果,所以照收。批准即确认;不确认请不批并说一句,席位让开发撤回当场确认那一格的绑定和规则 4 的新句,回到纯放宽。契约复审 PASS 6947540558,钉在 Head-sha 85b5f360e19824f42dea785b8036c39c1caf8dbd。批准在案后由席位翻 ready,经合并队列落地。

席位意见:同意合并。三种复现都关住,宿主不传键时行为不变;收窄那一路已点明交你确认。

席位核对

  1. 形态:8 个文件,+398/−35,Fixes #34515;Clause-②: yes (narrowing),Metadata-protocol: none,标题带 !。非受管 0/8;spec 面加收窄 ⇒ Tier H。触及安全语义(批准人身份)。
  2. 前提实测:main dc66d330 上真栈两屏向导三种再续跑情形都复现(区读数 34515-repro-main.log)。
  3. 门禁 check-runs:head 85b5f360 上 74 条,62 绿、12 跳、0 红。新增 dogfood 用例所在分片本 head 被选择器跳过,CI 无判定;本地全量 4058 过(51975cc3,其后只改文字);合并队列跑全量会补上。
  4. 接受的偏差:L1-b2 delta ACCEPT 6947459641;契约复审首审 6946628926 的 S1 已关,delta PASS 6947540558,无开项;N1/N3 未动、ActionResumeRequest.screenNodeId 的 jsdoc 未写 400,下次动该文件时补。
  5. 范围外去向:cloud 半边(存待办时带 run.screenNodeId、批准时传回、409 显示为过期批准)由 cloud 席记在 cloud 仓 docs(releases): v17 upgrade checklist — the raw watcher values are gone from MetadataWatchEvent.type (#4536) #4549(该席本仓信箱回执 6944665699,其评论 6944653166),Blocked-by 本 PR 的发版;本席位读不到 cloud 仓,以该回执为准。Skills-docs: none(技能未教二次续跑;文档在本 PR 更新)。
  6. 落地条款:os-zhuang 授权批准在案(即确认收窄)后,席位翻 ready,经合并队列落地;合并即关 Host resume seam: a second resume of the same hand-off after a wizard advanced hands the first screen's values to the current screen as the approver (bind an approval to its screen) #34515。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 17, 2026 12:08
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 44080397986 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Dogfood Regression Gate (2/3) — 失败步骤: Boot example apps and exercise real user flows

    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: (这条 FAIL 之后 12 行内没有可识别的原因行 —— 点进 job 看)
    @objectstack/dogfood:test:  FAIL   isolated  test/activity-text-predicate.dogfood.test.ts > [#21154] a query over activity text or the approval snapshot, by a reader withheld a field of its record > a
      ↳ 失败原因: @objectstack/dogfood:test: AssertionError: {"object":"sys_activity","records":[],"total":0,"hasMore":false}: expected 200 to be 403 // Object.is equality
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 31 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants