Repository navigation
Description
repo:hotcrm#2 · sunhaolin · session_local1adc6fb3954245ba8940a3719cdaea98
Filing gate: ① product defect with a reproduction and a named location. Source: fleet (found in a maintainer-ordered local UI test pass of the HotCRM app on 2026-11-27; filed through the pm-dispatch relay on the maintainer's instruction).
Grading: area:ux · Bug · p2 (triage grades) · severity: a write that should warn the user goes through with a plain success message, no data is wrong · reach: measured at the public HTTP entry and in the console, with a named real producer (HotCRM confirm_sales_order) · evidence: measured on @objectstack/* 18.6.0, code read at origin/main adb65d1615.
维护者速读
- 做什么:声明式
operation: 'update'动作把校验规则的警告(severity: 'warning')丢了。同一次写入走数据接口会带回warnings,走动作接口就没有,控制台只弹成功提示。 - 谁受益:所有用「按钮改状态」的应用。HotCRM 的「确认订单」是实例:订单超出框架合同额度时本应提示,现在点按钮确认完全没有提示。
- 不做会怎样:警告型规则只在编辑表单里生效;用户最常用的按钮路径静默通过,hotcrm#2807 承诺的「超额提示」在主路径上落空。
- 需要你做的:无需决策,按缺陷排期即可。
What
A validation rule with severity: 'warning' lets the save through and returns an advisory warning. The data door returns it and the edit form shows it (objectstack#27999). A declarative operation: 'update' action performs the same write but its answer carries no warnings, so the console shows only the action's success message.
Measured on a HotCRM dev server (hotcrm 08a7451e, @objectstack/* 18.6.0), on a draft order linked to a framework contract whose quota the order exceeds:
PATCH /api/v1/data/crm_sales_order/{id}with{"status":"confirmed"}answers 200 withwarnings: [{ rule: 'framework_quota_exceeded', severity: 'warning', field: 'crm_contract', code: 'rule_violation', message: … }], and the edit form shows the warning toast.POST /api/v1/actions/crm_sales_order/confirm_sales_orderwith{"recordId":"…","params":{}}answers{ success: true, data: { operation: 'update', object, id, record } }. There is nowarningskey anywhere in the answer. The console shows only the success toast "Order … confirmed."
Both calls write the same field to the same value on the same record.
Where
packages/runtime/src/action-execution.ts,executeDeclarativeUpdateAction(line 5105 atadb65d1615), called frompackages/runtime/src/action-dispatch.ts:732. It callscallData('update', …)and composes the result from the written record; the wordwarningsdoes not occur inaction-execution.tsoraction-dispatch.ts.- The console's action runner then has nothing to show. I did not read the console side; if the answer carried
warnings, the action toast would also need to show them. - Producer: HotCRM
src/sales/actions/sales_order.actions.ts,ConfirmSalesOrderAction(operation: 'update',patch: { status: 'confirmed' }), and the ruleframework_quota_exceeded(severity: 'warning') insrc/sales/objects/sales_order.object.ts. HotCRM's changeset for hotcrm#2807 and its contract manual say an order over the quota warns and still saves.
Reproduction
- In HotCRM, create a framework contract, for example Contract Value 150,000, and activate it.
- Link a confirmed order of 100,000 to it, then a draft order of 60,000.
- Open the draft order and click Confirm Order. Result: only the success toast. Expected: the same warning the edit form gives.
- For comparison, set the same draft order's Status to Confirmed in the edit form: the warning toast appears and the save goes through.
Acceptance
- The answer of a declarative
operation: 'update'action carries thewarningsthe data-plane update returned, in the same shape as the data door. - The console shows those warnings when the action finishes, as it does for a form save (objectstack#27999).
- A test covers an action whose write trips a
severity: 'warning'rule.
Reader who acts: the seat owning packages/runtime action execution (the declarative update executor), plus the console action runner for the toast.
Dedupe (open and closed): objectstack "action warnings" 0, "declarative update warnings" 0, "warning rule action" 0, "severity warning action toast" 0, "validation warning dropped" 0, "warnings action response" 0, "declarative action" and "operation update action" no card on this defect. Nearest: #27999 (closed, form-save toast for warnings), #24782, #28856, #29935 (closed, other declarative-update defects). hotcrm "framework_quota_exceeded", "over quota", "Confirm Order warning": only hotcrm#2807 itself.
Batch: one of 5 cards from this test pass (1 here, 4 in objectstack-ai/hotcrm).
Blocked-by: none.
Activity
objectstack-fleet commentedon Nov 27, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ux · domain:server · Bug · p2 · pm:queue · size S; rationale: a declarative update action drops the validation warnings its write produced. The user sees only a success toast where a quota warning was due (HotCRM
confirm_sales_order, measured). No data is wrong and the warning is lost, so it is a user-facing defect at the filer's p2. Recorded 2026-11-27T08:15Z.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qiby3dfNfCgpXwPkB2HfAccount:
os-teslaBranch:
claude/project-thread-nyjctkWorktree:
objectstack-issue-37867Domain:
runtimeArea:
o3-ux(area:ux, a seat card thread under the ux zone's own cap)Seat:
repo:objectstack#3File surface:
packages/runtime/src/action-execution.ts: the declarative update action answer carries the optionalwarningsthatprotocol.updateDatareturned.packages/runtime/src/action-declarative-update.test.ts: a describe in the shared harness.ui/packages/core/src/actions/ActionRunner.ts(ToastHandler gains an optionaldescription) and__tests__/ActionRunner.updateOperation.test.ts.ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx,ui/packages/app-shell/src/views/RecordDetailView.tsx: one toast, the warning variant when warnings exist, the warning text indescription, Undo kept. This is the same shape astoastRecordSave..changeset/37867-declarative-update-action-warnings.md(runtime,@object-ui/core,@object-ui/app-shellpatch).NOT
packages/spec/src/**and no governed surface.notice(Save answer: a hook or record-triggered flow can attach one user-facing notice to a record save, shown with the save toast #28000) anddroppedFieldsare out of scope; the seat files them. Stop on breach and explain in the report.Container & model:
S,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: high, reason: the thread session serves effort highClause-②: yes (widening)
Metadata-protocol: none
Responsibility: a declarative update action whose write raised warnings tells the user so in the toast, instead of showing a plain success. TIER_DEFAULT contract review is owed for the widening. Run overlap-check before the first push (feat(spec)!: action locations say what an action acts on #37929, feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924, fix(runtime)!: an action not bound to an object accepts no record #37896 touch the same files in other hunks).
Thread-read: none
Premise: holds, measured on origin/main 815e882 through the real HttpDispatcher → executeDeclarativeUpdateAction → callData:
updateDataanswers with warnings, and the action's 200 body carries 0. Full report:/mnt/project-files/card-37867/pre-claim-report-815e882b.md.Serial constraints cleared:
#37929, #37924, #37896 touch these files in other hunks; overlap-check before push, the later lander merges mainobjectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qiby3dfNfCgpXwPkB2Hf
os-dev-report
{ "issue": 37867, "status": "done", "branch": "claude/project-thread-nyjctk", "pr": "https://github.com/objectstack-ai/objectstack/pull/38076", "session": "session_01L9qiby3dfNfCgpXwPkB2Hf", "premise_still_valid": true, "summary": "executeDeclarativeUpdateAction now carries the warnings the data-plane update answered (protocol.updateData, ValidateDataIssue elements) onto DeclarativeUpdateResult, present only when the write raised one; REST POST /actions and MCP run_action both go through it, and the stale roll-up path composes from the same answer. In the console, ActionRunner reads the answer's warnings for an operation: 'update' action only, raises the success toast on its warning variant with the distinct rule messages as description and Undo kept (one toast, as toastRecordSave), and still warns when the success toast is off; ToastHandler gains optional description. Both console toast handlers (useConsoleActionRuntime, RecordDetailView) now honour type 'warning' via toast.warning. Patch changeset for runtime, @object-ui/core, @object-ui/app-shell; Clause-② yes (widening), Metadata-protocol none.", "tests": "Premise at 815e882b through the real HttpDispatcher.handleActions: protocol answer keys [object,id,record,warnings], action 200 body 'warnings' count 0 (probe in project files, not committed). New pins: action-declarative-update.test.ts describe (REST + MCP carry warnings element-for-element, control no key) 37 passed; ActionRunner.updateOperation.test.ts describe (6 cases) 19 passed; useConsoleActionRuntime.undoLookupId-11122 6 passed and RecordDetailView.undoLookupId-11122 4 passed (toast.warning once, description, Undo restores). Full: pnpm --filter @objectstack/runtime test 655 files / 12316 passed, 25 skipped; ui vitest packages/core/src/actions 58 files / 810 passed; app-shell useConsoleActionRuntime + RecordDetailView 128 files / 1104 passed. Typecheck exit 0: runtime (test layer 27 files / 183 errors held, unchanged), @object-ui/core, @object-ui/app-shell. Ablations via ablation-replace.mjs (source-resolved suites, each restore blob == HEAD): runtime warnings spread removed 2 failed; runner warnings read emptied 6 failed; each host warning arm disabled 1 failed each. The runner ablation ran before the helper was moved byte-identically (a3a48339).", "gates": "dispatch-gates --ran with recorded exit codes: 73 derived, 71 run exit 0, 2 NOT MEASURED exit 3 (check-plugin-teardown-shape --self-test: fixture commit out of the shallow clone; check:dual-build-cjs-loads: needs a full pnpm build), 0 unrun. The sweep spanned a3a48339 to 40c5c821; the only change between them is a module-top import in one test file, and check:test-source-alias ran at 40c5c821 exit 0. overlap-check VERDICT clean exit 0 at a3a48339 (main, #37929, #37924, #37896). PR CI at a3a48339: 56 success, 10 skipped, 2 failure (Lint · CI, release & engine gates: Test-source alias gate on action-declarative-update.test.ts, fixed in 40c5c821; Lint & Repo Gates its aggregator). CI at 40c5c821 in progress when this was written.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0 GitHub MCP calls", "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + assignees leg, read-back 6149 bytes identical); this os-dev-report comment via post-stamped. A PR body rewrite via relay issue_patch follows.", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: named producer (HotCRM hooks that set a notice; any patch writing a field the engine strips) · the same executor drops protocol.updateData's notice and droppedFields (protocol-data-writes.ts answer, not copied by executeDeclarativeUpdateAction) · dedupe: declarative update notice, declarative update droppedFields, action answer notice · carrier: seat 3 (said it files them)" ], "deviations": [ "Surface amendment: the two undoLookupId-11122 host harnesses (ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.undoLookupId-11122.test.tsx, ui/packages/app-shell/src/views/RecordDetailView.undoLookupId-11122.test.tsx) each gained a describe and an optional route answer body; the claim named no app-shell test file.", "Moved updateAnswerWarningLines below declaresSuccessMessage in ActionRunner.ts so it no longer conflicts with #37924's hunk (overlap-check was exit 1 before the move, 0 after)." ] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment (file surface), for PR #38076 at 40c5c82:
useConsoleActionRuntime.undoLookupId-11122andRecordDetailView.undoLookupId-11122, one describe each, with an optional answer body on the route stand-in.ActionRunner.ts: the new function sits afterdeclaresSuccessMessage, to stay clear of feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924's hunk. overlap-check exits 0.Clause-② yes (widening), Metadata-protocol none and patch levels are unchanged.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Closed-card tidy · 2026-11-28T04:25Z: the card closed when its PR merged;
pm:dispatchedcomes off.