Skip to content

docs(skills): objectstack-ui actions rule teaches the per-record form for a body that writes each selected row - #36418

Merged
os-zhuang merged 3 commits into
mainfrom
claude/issue-36156-actions-per-record-write
Nov 22, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/issue-36156-actions-per-record-write

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #36156
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:照着界面技能写「对所选的每条记录各改一次」的批量按钮时,技能现在教「每条勾选记录各执行一次」的写法,不再教「一次拿到全部所选记录、在脚本里循环逐条修改再汇报成败」。同时写明「整批只执行一次」的脚本或流程只会收到调用者自己看得到的记录,最多五千条。
  • 为什么做:属于「对外发布的技能包教的内容要和运行时一致」这条线。批量操作的安全加固(所选记录先按调用者的权限读一遍)已经合入并更新了文档,技能文字是它欠下的另一半。
  • 出错会怎样:只改技能里的一段文字、一条评测用例和两条待发布说明,不动运行时。写错的话,照着技能生成应用的作者会把批量按钮写成不合适的形式;撤回本次合并即恢复原文。
  • 要你做什么:无。

What changes

State at head b88dd761 (round 3, three commits). One bullet of skills/objectstack-ui/rules/actions.md (published catalog), one eval case, and two release notes. The wording is derived from content/docs/ui/actions.mdx as the selection-scope change left it (sections "Declare the bulk dispatch contract" and "Authorization inside an action") and from the runtime; no separate replacement wording exists for this card.

The bulk bullet under "Visibility, Disable & Feedback", replaced in place (one line before, one line after):

  • A body that writes each selected row is taught as the per-record form: the list view's bulkActions: ['NAME'] runs the action once per ticked row, the action declares execution: 'perRecord', and the body writes the row it is handed (ctx.record, ctx.recordId), pointing at the crm_create_campaign example already in the file. A row whose run throws is listed with its message.
  • The aggregate form (bulkActionDefs entry with operation: 'custom', execution: 'aggregate') is taught as one run for the selection. A script body or a flow receives the ids under the built-in key params._selectedIds (input._selectedIds), at most 5000 and only ids the caller can read: one the caller cannot read refuses the whole call with 404 RECORD_NOT_FOUND before it starts.
  • Gone: the sentence teaching an aggregate handler that writes rows one by one, catches per row and returns { succeeded, failed }, and the four id-counting rules that went with it.
  • Kept, in one clause: how an aggregate return value is read. Its top-level succeeded or failed member is read as a BulkActionResult, and in any other form (counts, one list) is reported as unreadable. A throw is one outcome for the selection.

Eval views-apps-actions-pages.json, case 23 (a bulk archive where locked tasks refuse). The prompt is unchanged. The expected answer moves to the per-record form: declare execution: 'perRecord', name the action in the list view's bulkActions, update only the row the body is handed, and let a locked row fail on its own. must_contain is now perRecord, bulkActions: [, ctx.record; must_not_contain is succeeded:, { succeeded and { failed. Both token lists changed, so the case has a new hash and a regrade sets earlier records of it apart.

Changeset .changeset/36156-actions-per-record-write.md, @objectstack/skills patch.

Not changed: the list_toolbar row of the locations table ("one ticked row is its recordId, several are refused (no _selectedIds)"). It still matches the console (resolveServerActionRecordId in ui/packages/core/src/actions/serverActionHandler.ts), and the selection-scope change touched no file under ui/.

DELIBERATE CORRECTION

This PR edits one pending release note, .changeset/34648-skills-result-dialog-bulk-result.md, so that it stays true once this PR lands in the same release. One sentence pair in its body changes; its front matter, title line and both declaration lines are untouched. Check Changeset is red on this PR for that reason, by design, and the PR carries no skip-changeset label.

Before:

A second entry teaches what an execution: 'aggregate' bulk handler resolves with when it wrote some rows and refused others, { succeeded: string[], failed: [{ id, message }] }, that it resolves and does not throw, and how the console counts the ids. One eval case for each.

After:

A second entry says how an execution: 'aggregate' bulk handler's return value is read: one with a top-level succeeded or failed member is read as a BulkActionResult, and any other form of those members is reported as unreadable. One eval case for resultDialog.

Why

The action doors now read a record-less call's selection in the caller's own scope before the action runs, and content/docs/ui/actions.mdx says a body that writes each selected row is best declared execution: 'perRecord'. The skill still taught the aggregate form for that body. An AI build that follows the skill should write the per-record form.

Round 2 (review of c0072a0a)

  • S1, eval case 23 tokens. must_contain now holds bulkActions: [ in place of bulkActions, so the answer has to write the per-record wiring itself; must_not_contain gained a token for the shorthand return (succeeded, in that round, replaced in round 3). The expected answer no longer spells the { succeeded, failed } literal (it would trip the forbidden tokens) and names the half-done answer as wrong. The probe table is under round 3. Measured on the way: 'bulkActionDefs'.includes('bulkActions') is false, so the old token did not match the prompt's own word; the stricter token is still the better one, because it asks for the wiring and not a mention.
  • S2, the aggregate sentence. "(one zip)" is gone, and the sentence names whose selection is read: "A script body or a flow receives the ids ... only ids the caller can read". An api action's selection is not read, and the sentence no longer sits beside an api-shaped example.
  • The pending note is corrected as declared above, and this PR's own note carries the new tokens and the "script body or a flow" wording.

Round 3 (contract review of 31062c7b)

  • S1, eval case 23. The forbidden token succeeded, is ordinary English and failed a right answer that says "the rows that succeeded, and ...". It is replaced by { succeeded; succeeded: stays.
  • N3, taken in part. { failed is forbidden too, so a reversed shorthand return is caught. The JSON-quoted wiring ("bulkActions": [) is not covered: the grader matches each token as a literal, case-sensitive substring and requires every must_contain token, with no alternation, and no single literal matches both spellings while still excluding a bare mention. bulkActions: [ stays, the TypeScript spelling the skill teaches.
  • N1, taken. The rule's last sentence now makes the members its subject: "a return value's top-level succeeded or failed is read as a BulkActionResult (...), and in any other form (counts, one list) reported as unreadable". The file is 14842 bytes, 3711 tokens, at its ceiling; no ceiling row moved.
  • This PR's own note carries the new forbidden tokens. The corrected pending note is unchanged since round 2.

Token probe at this head (the grader's own rule, applied to seven sample answers):

sample answer verdict
perRecord added, the aggregate bulkActionDefs entry kept fail, missing bulkActions: [
per-record wiring, shorthand return of the two lists fail, forbidden { succeeded
per-record wiring, reversed shorthand return fail, forbidden { failed
per-record wiring, keyed return fail, forbidden succeeded: and { succeeded
the per-record answer pass
the per-record answer, with the prose "the rows that succeeded, and each locked row ..." pass
the per-record answer with JSON-quoted wiring fail, missing bulkActions: [ (the uncovered spelling above)

Tests

All readings at head b88dd761.

Token ratchet, size and line readings
  • node scripts/check-skills-token-ratchet.mjs: exit 0. skills/objectstack-ui/rules/actions.md is 3711 tokens (ceiling 3711; headroom 0). On the base 4e55e4eb: 3701 tokens (14804 bytes; now 14842). At round 1 (c0072a0a): 3711; at round 2 (31062c7b): 3710. No ceiling row moved.
  • skills/objectstack-ui/evals/views-apps-actions-pages.json: 6052 tokens before, 6113 after (eval fixture, measured, not ratcheted).
  • Ratcheted authored total 197497 before, 197507 after (ceiling sum 202541); eval fixtures 78087 before, 78148 after; bundle total 290191 before, 290262 after.
  • rules/actions.md whole file: 256 lines before, 256 after. The eval file: 235 lines before, 235 after.
  • Whole bundle: every SKILL.md summed is 4950 lines before and after (none touched); every file under skills/ summed is 22900 lines before and after.
  • PR line counts (git diff --numstat against the base): skills/** 4 added, 4 deleted, net 0 (budget +8); this PR's changeset adds 13; the corrected note 1 added, 1 deleted.
Gates and tests run locally
  • Derived list (node scripts/pm/dispatch-gates.mjs --commands, 47 commands), each exit code captured before any pipe: 45 exit 0, 1 exit 1, 1 exit 3.
  • Exit 1, red by design: node scripts/check-empty-changeset.mjs --base origin/main, which refuses any edit to a note that exists on the merge base and names the DELIBERATE CORRECTION declaration as the only remedy.
  • Exit 3, NOT MEASURED locally (it refuses without a built dist/ for every package, which this text-only diff does not build), left to CI: check:dual-build-cjs-loads.
  • node scripts/pm/dispatch-gates.mjs --ran: 47 derived famil(ies) accounted for — 46 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).
  • Among the 45: the ratchet and its --self-test, check:skill-identifier-liveness, check:skill-links, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:doc-formula-expressions, check:published-files, check:nul-bytes, check:pm-skill-id-lint, check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity.
  • pnpm --filter '@objectstack/scenarios^...' build, then pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2 test/skill-evals/skill-evals.test.ts, under the verify lock: VERDICT command-exit 0, Test Files 1 passed (1), Tests 38 passed (38).
  • skill-evals --dry-run --skills objectstack-ui (the runner's own parser over the shipped catalog, no model call): exit 0, objectstack-ui: 47 case(s).
  • Case 23 carries every must_contain token in its own expected_output (0 missing) and no must_not_contain token (0 hits).
  • node scripts/pm/overlap-check.mjs --branch=claude/issue-36156-actions-per-record-write --base=origin/main: VERDICT overlap exit 1. It merges cleanly with origin/main (cd7ea2e3); the one hit is the bot's standing version-packages PR, which deletes every pending note and so conflicts with any edit to one, the corrected note here.

No ablation: the diff changes prose, an eval fixture and release notes, no tested behaviour. No eval round was run against a model (a round is the eval seat's).

Acceptance notes

  • BulkActionResult in the skill, as read from the code. The console and the audit trail still read it, on an aggregate dispatch only (readAggregateResult in ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts, packages/runtime/src/action-invocation-audit.ts); a per-record run is never read under it. The spec defines its members as the rows the handler wrote and did not write, so its only author is an aggregate body that writes rows, the form this card moves to per-record. What the skill keeps is the reading rule, because it catches any aggregate body: a return value with a top-level succeeded or failed in another form is reported as unreadable. The shape itself and the id-counting rules are no longer spelled; the type is named with its import path.
  • The card's "an aggregate body receives only ids the caller can read" is stated with its mechanism, as the doc states it: no id is dropped, one unreadable id refuses the whole call. Three kinds of call are not read (a declarative update action, a type: 'api' action, the system principal); the sentence is scoped to a script body or a flow, the two that are.
  • The card's "drop any example that writes rows from an aggregate selection": the file's code examples already carry none (the campaign example is per-record on main). The remaining teaching was the prose sentence and eval case 23, both moved here.
  • content/docs/ui/views.mdx and the bulkActionDefs description in packages/spec/src/ui/view.zod.ts still describe an aggregate handler that "moved some rows and refused others" answering with a BulkActionResult. That is true of the runtime and outside this card. Noted, not filed.
  • The dispatch order asked for a five-section 维护者速读; the fleet agent rules fix it at four lines, which is what this body carries.

Verification

Read first, by risk:

  1. skills/objectstack-ui/rules/actions.md, the last bullet under "Visibility, Disable & Feedback": the per-record sentence, the aggregate sentence (whose selection is read, key, cap, caller-scope refusal), and the kept BulkActionResult clause.
  2. skills/objectstack-ui/evals/views-apps-actions-pages.json, case 23: the expected answer and both token lists.
  3. .changeset/34648-skills-result-dialog-bulk-result.md: the corrected sentence, against the quotation above.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints skills/objectstack-ui/rules/actions.md is 3711 tokens (ceiling 3711; headroom 0) and exits 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2

…dy that writes rows

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2

Final green head · area f7-docs · 2026-11-22T11:10Z
Head c0072a0a30ea71ee816a9ca196072417ea5d7df3: 28 success · 16 expected skip · 0 failed · 0 pending (pr-state), mergeable_state clean. Governed (skills/**, Tier H low-risk arm): L2 at CONTRACT_REVIEW_TIER and the hand-off go to seat repo:objectstack#7. Card #36156, claim 7077742983, report 7078127734.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

L1 (L1-e) on head c0072a0a30ea71ee816a9ca196072417ea5d7df3, card #36156: ACCEPT (L1 only). This is a governed skills/** PR, so the L2 and the maintainer hand-off are the seat's.

  • Shape (l1-face.mjs --pr 36418, CLEAN): open, draft, base main, Fixes #36156, Clause-②: no, Metadata-protocol: none. Gates at this head: 28 success, 16 expected skip, 0 failed. Lint & Repo Gates and TypeScript Type Check are success.
  • Order: the card says to land after fix(runtime)!: an action's selection is read in the caller's scope before the action runs #36132, which merged at 2026-11-22T08:09:42Z. docs(skills): objectstack-ui actions rule names the selection key a bulk body receives #36067, the other edit to the same rule file, is merged too, so the coordination the card asked for is moot.
  • Each claim in the new bullet, checked against main:
    • execution: 'perRecord' exists (BulkActionExecutionSchema, action.zod.ts:1711). Its describe text matches "once per ticked row, carrying that row's recordId".
    • crm_create_campaign below is the per-record example (execution: 'perRecord' at rule line ~102), so the pointer holds.
    • "at most 5000", "only ids the caller can read", and "one the caller cannot read refuses the whole call (404 RECORD_NOT_FOUND) before the body starts" match content/docs/ui/actions.mdx 456, 667 and 669 ("no id is dropped").
    • The kept BulkActionResult reading clause is true of the aggregate read (body: useBulkExecutor#readAggregateResult, action-invocation-audit.ts).
  • Eval case 23: expected_output carries all three must_contain tokens (perRecord, bulkActions, ctx.record) and not succeeded:. Its own text spells { succeeded, failed }, so it passes. The body's runner readings (skill-evals.test.ts 38/38, --dry-run 47 cases) are real commands with output.
  • Whole-bundle value density, read as a customer agent loading the whole package: the net skills/** change is 0 lines (4/4), and rules/actions.md sits at 3711 tokens against a 3711 ceiling (headroom 0, no ceiling row moved). The bullet is one teaching swap: aggregate row-writing → per-record. The four id-counting rules it drops only applied to the shape being retired. No growth to account for.
  • Changeset @objectstack/skills patch (packages/skills, published). Each sentence checked against the diff: true.
  • Nit, for the seat's landing call: the pending note .changeset/34648-skills-result-dialog-bulk-result.md still says the skill teaches the aggregate handler's partial-write answer. Both notes will sit in one release's changelog, one saying the skill teaches it and the other that it no longer does. A one-line DELIBERATE CORRECTION of 34648, or a sentence in this note naming it, would keep the release text from contradicting itself. Not blocking.

…nd the aggregate sentence names the bodies whose selection is read

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2

Final green head (rework round) · area f7-docs · 2026-11-22T11:44Z
Head 31062c7b2dd1d05aaae854fb023f2355a680bca5: 28 success · 18 expected skip · 0 pending · Check Changeset red by design (DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md, declared in the body with the sentence before and after; the body was rewritten through the relay for this round). Changes since c0072a0: eval case 23 tokens (bulkActions: [, succeeded,), "(one zip)" replaced by "A script body or a flow" in rules/actions.md (3710 of 3711 tokens), the 34648 sentence pair. Report 7078574138 on #36156. Governed: the CONTRACT_REVIEW_TIER review of this head and the hand-off are the seat's.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对 · delta

L1 (L1-e) delta from c0072a0a30ea71ee816a9ca196072417ea5d7df3 (ACCEPT 7078358468) to head 31062c7b2dd1d05aaae854fb023f2355a680bca5, card #36156: ACCEPT, including the DELIBERATE CORRECTION confirmation below. This is L1 only: governed skills/**, so the L2 and the maintainer hand-off are the seat's.

The delta is one commit, 4 files, +7/−7, all text: skill prose, an eval fixture and two changesets.

DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md, the only foreign note edited. Check Changeset is red by design, and the declaration is in the body under ## DELIBERATE CORRECTION. The diff changes release text and skill prose only, so this ACCEPT is the confirmation. The sentence before and after:

  • Before: "A second entry teaches what an execution: 'aggregate' bulk handler resolves with when it wrote some rows and refused others, { succeeded: string[], failed: [{ id, message }] }, that it resolves and does not throw, and how the console counts the ids. One eval case for each."
  • After: "A second entry says how an execution: 'aggregate' bulk handler's return value is read: one with a top-level succeeded or failed member is read as a BulkActionResult, and any other form of those members is reported as unreadable. One eval case for resultDialog."
  • Checked against the rule at this head: the kept clause ("a return value with a top-level succeeded or failed is read as a BulkActionResult …, any other form … reported as unreadable") is what the note now says, and the old partial-write eval case is the one this PR moved. The corrected sentence is true, and the two notes no longer contradict each other in one changelog. The title line ("…teaches … the aggregate bulk handler's BulkActionResult") is left as it was, and it is still true in substance: the rule still teaches that type, by its reading. Not blocking.

The rest of the delta

  • rules/actions.md: "(one zip)" is gone. The selection sentence is now scoped to "A script body or a flow", which matches content/docs/ui/actions.mdx on main ("the body or flow never starts"). Three call kinds are not read at all (declarative update, type: 'api', system principal), so scoping the sentence to script/flow is the accurate form. The rest is unchanged, and the body reports 3710 tokens against the 3711 ceiling.
  • Eval case 23: must_contain bulkActions: [ now tells the per-record wiring apart from a mention of bulkActionDefs. must_not_contain gains succeeded, (shorthand returns). expected_output still carries all three required tokens and neither forbidden one (it now says "per-row lists or counts", with no succeeded). The new "not execution: 'perRecord' added while the bulkActionDefs aggregate entry stays" line closes the half-migration answer.
  • 36156 changeset: the two edited bullets match the new rule sentence and the new token lists.
  • Gates at this head: Lint & Repo Gates and TypeScript Type Check are success. The only reds are the two Check Changeset runs, from the correction above.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 31062c7b2dd1d05aaae854fb023f2355a680bca5
Local-runs: none
Scope: skills/objectstack-ui/evals/views-apps-actions-pages.json, skills/objectstack-ui/rules/actions.md + none
Security-touching: yes

PR #36418, card #36156. Net diff against main (merge base 4e55e4eb, main read at 761220c6): 4 files, 18 added, 5 deleted. The two hits files and the 34648 note are unchanged on main since the merge base. No file in the diff implements or enforces the hits files, so the scope adds none. The two changesets are the lane seat's remainder. They are read here only for ② and for the correction this record is asked to confirm.

Security-touching: yes is meant. The changed bullet teaches read-scope behaviour: which selected ids reach a body, and that one id the caller cannot read refuses the call with 404. The seat adopting this record adds the security label.

① Derived judgments

  • Public surface: one bullet of the published objectstack-ui actions rule, and eval case 23 of views-apps-actions-pages.json. No schema, no accept set, no code. Right.
  • The rule stops teaching an aggregate handler that writes rows one by one and resolves with a succeeded / failed pair, and teaches execution: 'perRecord' for that body. This is what the card asks for and what content/docs/ui/actions.mdx says on main ("A body that writes each selected row is best declared execution: 'perRecord'"). Right.
  • The spec still lets an aggregate handler resolve with a BulkActionResult (bulk-action.zod.ts, "MAY resolve with"). The skill now steers away from it and keeps only the reading rule. That narrows the teaching, not the runtime. Right, and it is the card's stated intent.
  • Case 23 has a new token set, so a new hash. Earlier recordings of the case are set apart on a regrade. Right, and the PR's own note says so.
  • Gates on this head: every check-run is success or an expected skip, except Check Changeset, which is failure on both of its runs. Job 137195709607: "Require a changeset" is success; the one failed step is "Reject an empty-frontmatter changeset added by this PR", and its one error names .changeset/34648-skills-result-dialog-bulk-result.md as a note that exists on the merge base. Nothing else is red. So the check is red only for the edited pending note, which is the DELIBERATE CORRECTION class, by design. The PR carries no skip-changeset label. Right.
  • Token ratchet: the rule file is reported at 3710 of 3711. The gates that enforce it are green on this head.

② Semver level

  • .changeset/36156-actions-per-record-write.md bumps @objectstack/skills by patch. The diff changes skill text and an eval fixture only. Patch is the right level.
  • Clause-②: no and Metadata-protocol: none are on the PR body and on the new note. The diff removes no declared capability from a consumer, so no is right.
  • Each sentence of the new note agrees with the diff at this head, including the two forbidden tokens and the "script body or a flow" wording.
  • DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md: confirmed. The PR body declares it and quotes the sentence before and after, and the quotation matches the diff. The old sentence said a second entry teaches what an aggregate handler resolves with, that it resolves and does not throw, how the console counts the ids, and "One eval case for each". This PR removes all of that from the rule and moves the only bulk-result eval case to the per-record form, so the old sentence would be false in the same release. The new sentence says the entry tells how an aggregate return value is read, and "One eval case for resultDialog" (case 22). Both are true at this head. Front matter and declaration lines are untouched.
  • The title line of 34648 still reads "teaches ... the aggregate bulk handler's BulkActionResult". I do not read the release text as contradicting itself. The rule still names BulkActionResult with its import path and still says how it is read, the 34648 body now says exactly that, and the 36156 note says what was dropped and "What stays of BulkActionResult". The title is looser than the body, not opposed to it. Nit N2 below.

③ Boundary flags

  • open_questions: empty in both dev reports. Nothing to escalate.
  • Dev flag, BulkActionResult kept as one reading clause: accepted. The clause is true on main (readAggregateResult in ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts), and it still protects an aggregate body that returns counts. Do not drop it.
  • Dev flag, no separate replacement wording existed for the card: accepted. PR fix(runtime)!: an action's selection is read in the caller's scope before the action runs #36132 and PR docs(skills): objectstack-ui actions rule names the selection key a bulk body receives #36067 are both merged, and the wording agrees with actions.mdx on main.
  • Dev flag, list_toolbar row left unchanged: accepted. It is outside the diff and not reviewed.
  • Dev flag, Check Changeset red with no skip-changeset label: accepted, see ① and ②.
  • Dev flag, overlap-check exit 1 against the bot's version-packages PR 35129 alone: accepted. That PR deletes every pending note. It is a landing-order matter for the seat, not a defect of this diff.
  • Dev flag, the PR body was written by the seat, not the dev: the body on GitHub now carries the round-2 text and the DELIBERATE CORRECTION section. Answered.
  • Dev flag, the first commit keeps a wip: subject: accepted, the PR title carries the conventional one.
  • Dev flag, one derived gate not measured locally: the check-runs on the head are the verdict, and they are green.
  • Dev note that views.mdx and the bulkActionDefs description in view.zod.ts still describe an aggregate handler answering with a BulkActionResult: true of the runtime, outside the card. Not escalated.
  • SQL push-down: the diff holds no code, no id materialisation and no join. Nothing to flag.
  • No security finding. security_findings is none in both reports and I found none.

④ Design judgment

skills/objectstack-ui/rules/actions.md, the one changed bullet, sentence by sentence against main:

  1. "A list view's bulkActions: ['NAME'] runs the action once per ticked row." Holds. actions.mdx table, and the execution describe text in action.zod.ts.
  2. "A body that writes each selected row takes that form: declare execution: 'perRecord' and write the row it is handed (ctx.record, ctx.recordId; crm_create_campaign below)." Holds. BulkActionExecutionSchema is perRecord or aggregate. The example below the bullet declares execution: 'perRecord' and writes with ctx.recordId. I tried the other per-record spelling, a bulkActionDefs entry with operation: 'custom' and no aggregate: the spec refuses it and names bulkActions as the per-record form, so the sentence names the only valid wiring.
  3. "a row whose run throws is listed with its message." Holds. The per-row path in useBulkExecutor.ts settles a rejected row as failed and pushes its id and error.
  4. "A bulkActionDefs entry { name, operation: 'custom', execution: 'aggregate' } runs it once for the selection." Holds, and the spec requires aggregate on a custom def.
  5. "A script body or a flow receives the ids under the built-in key params._selectedIds (input._selectedIds), at most 5000 and only ids the caller can read: one the caller cannot read refuses the whole call (404 RECORD_NOT_FOUND) before it starts." Holds. actionSelectionIsRead in packages/runtime/src/action-execution.ts reads every arm but the declarative update, a type: 'api' action and the system principal, so "a script body or a flow" is exactly the read set. ACTION_SELECTION_CAP is 5000. loadActionSelectionRecords reads every distinct id with the per-record door's own caller-scope read and drops none. refuseUndeliveredActionSelection throws the record-not-found refusal in dispatchAdmittedAction ahead of the flow and script arms. I tried to break it with an api action, a declarative update and a registered handler: the first two are outside the sentence's subject, and a registered handler is a script arm and is read. The sentence does not overclaim.
  6. "A throw is one outcome for the selection; a return value with a top-level succeeded or failed is read as a BulkActionResult (@objectstack/spec/ui), any other form (counts, one list) reported as unreadable." Holds as meant. readAggregateResult returns unreadable only when one of the two members is present and the value does not parse. See N1.

Against the card: the per-record form is taught, the aggregate facts are stated (key, cap, caller scope), and no example or sentence in the file writes rows from an aggregate selection any more. The card's owed items for this file are met.

skills/objectstack-ui/evals/views-apps-actions-pages.json, case 23:

  • The prompt is unchanged. The expected answer agrees with the rule and with the spec, and it names the half-done answer as wrong. It carries all three required tokens and neither forbidden one.
  • Grading is literal, case-sensitive substring matching (packages/qa/scenarios/README.md, "Grading").
  • Half-done answer, perRecord added while the aggregate bulkActionDefs entry stays: it lacks bulkActions: [, because bulkActionDefs: [ does not contain that string. It fails. Good. The linter would also refuse that app (action-dispatch-contract-mismatch), so failing it is right.
  • Aggregate loop that returns the pair: it lacks the required tokens, and succeeded: or succeeded, catches the mixed forms. Good.

S1 (should-fix) — the forbidden token succeeded, is ordinary English. A correct per-record answer that describes the dialog in prose, for example "rows that succeeded, and each locked row with its message", fails the case. The prompt asks the answer to explain what the dialog will say, so this wording is likely. The dev report shows the same effect from the other side: the reference answer had to be reworded so it would not trip the token. Use a token that prose cannot hit and that still covers the shorthand return, for example { succeeded in place of succeeded,. Together with succeeded: it catches the shorthand, the single-line keyed form and the multi-line keyed form.

Nits, no effect on the verdict:

  • N1, rule sentence 6: "any other form" can be read as "any other return value", which would be false. A value with neither member keeps the one-outcome report. The examples in brackets point to the right reading, and the 36156 note already says "any other form of those members". If a token can be found, say "of them" in the rule too.
  • N2, the 34648 title line: looser than its corrected body, as said in ②. Accepted as is. A title edit is optional and belongs to the same declared correction.
  • N3, case 23: bulkActions: [ misses a JSON-quoted answer ("bulkActions": [), and a reversed shorthand ({ failed, succeeded }) escapes both forbidden tokens. The second matters little, since such an answer also has to carry all three required tokens.

No must-fix. One should-fix, S1, open on this head.

Implemented-by: claude/issue-36156-actions-per-record-write
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

…English word, and the rule's last sentence names what is unreadable

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2

Final green head (round 3) · area f7-docs · 2026-11-22T12:18Z
Head b88dd7612d: 28 success · 18 expected skip · 0 pending · Check Changeset red by design (DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md, declared in the body with the sentence before and after; the body was rewritten through the relay for this round). Changes since 31062c7: eval case 23 must_not_contain now succeeded:, { succeeded, { failed (replacing succeeded,), and the N1 wording in rules/actions.md (3711 of 3711 tokens). Not covered: the JSON-quoted half of N3 (the grader has no alternation) and a multi-line shorthand return; both named in the body. Governed: the delta L1, the CONTRACT_REVIEW_TIER review of this head and the hand-off are the seat's.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH

席位核对

L1 (L1-e) delta on head b88dd7612d (card #36156): ACCEPT. This supersedes 7078669507 (head 31062c7b).

  • The delta is one commit, 31062c7b..b88dd761, with three one-line edits.
    • Eval case 23's must_not_contain drops "succeeded,", which would match the English word in prose, and gains "{ succeeded" and "{ failed". It now forbids a returned outcome object, not a word.
    • The changeset sentence names the same three tokens.
    • The rule's last clause now reads "a return value's top-level succeeded or failed is read as a BulkActionResult …, and in any other form (counts, one list) reported as unreadable".
    • All three are true of each other and of the runtime reading accepted earlier. The case hash changes again, so "sets it apart from a round recorded before this change" still holds.
  • DELIBERATE CORRECTION. .changeset/34648-skills-result-dialog-bulk-result.md is unchanged since 31062c7b. Its before and after, as quoted in the body:
    • Before: "A second entry teaches what an execution: 'aggregate' bulk handler resolves with … { succeeded: string[], failed: [{ id, message }] } … One eval case for each."
    • After: "A second entry says how an execution: 'aggregate' bulk handler's return value is read: one with a top-level succeeded or failed member is read as a BulkActionResult, and any other form of those members is reported as unreadable. One eval case for resultDialog."
    • The whole diff is release text, skill text and an eval case. Check Changeset is therefore red by design (2 failures, the only reds; 28 success, 18 expected skip), and this ACCEPT confirms the correction.
  • Residuals. As named in the body: the list_toolbar row is unchanged and still matches resolveServerActionRecordId. check:dual-build-cjs-loads is left to CI. No new out-of-scope finding.
  • Tier H stands from my first ACCEPT. The handoff is the seat's, after the delta L2.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b88dd7612d8ee9a59ea5f20990cf9358317ed345
Local-runs: none
Scope: skills/objectstack-ui/evals/views-apps-actions-pages.json, skills/objectstack-ui/rules/actions.md + none
Security-touching: yes

Delta review. PR #36418, card #36156. The previous record is PASS 7078704220 at head 31062c7b. The delta 31062c7b..b88dd761 is one commit, 3 files, 3 lines added and 3 deleted. It holds no merge of main. Net diff against main (merge base 4e55e4eb, main read at 24366ff8): 4 files, 18 added, 5 deleted. The two hits files, the 34648 note, the grader and the aggregate reader are unchanged on main since the merge base. No file in the diff implements or enforces the hits files, so the scope adds none. The two changesets are the lane seat's remainder. They are read here for ② and for the correction this record confirms.

Security-touching: yes is meant. The changed bullet teaches read-scope behaviour: which selected ids reach a body, and that one id the caller cannot read refuses the call with 404. The delta itself does not touch that sentence. The PR already carries the security label.

S1: closed
N1: closed
N3: closed in part, the rest accepted as a deviation (see ④)

① Derived judgments

  • Public surface is the same as at 31062c7b: one bullet of the published objectstack-ui actions rule, and eval case 23. No schema, no accept set, no code. Right.
  • The delta changes the last sentence of that bullet, the forbidden token list of case 23, and one bullet of the PR's own release note. Nothing else.
  • Case 23 has a new token set again, so a new hash again. A regrade sets earlier recordings apart. Right, and the note says so.
  • Gates on this head: every check-run is success or an expected skip, except Check Changeset, which is failure on both of its runs (137199370046 and 137203637111). In both, "Require a changeset" is success, the ADR-0087 step and the major-bump guard are success, and the one failed step is "Reject an empty-frontmatter changeset added by this PR". Its one error names .changeset/34648-skills-result-dialog-bulk-result.md as a note that exists on the merge base. So the red is the DELIBERATE CORRECTION class alone. Nothing else is red.
  • Is that red acceptable for the hand-off? Yes, and it must not be "fixed". The gate's own text (scripts/check-empty-changeset.mjs, and route 0 in .github/workflows/pr-automation.yml) says: do not restore the note, never apply skip-changeset to a PR that edits an existing changeset, declare the correction on the PR, and leave the check red. Restoring 34648 would put a false sentence back into the release. landing-operations.md says the seat does not wait for the maintainer on this red. The diff changes more than release text, so the confirming document is a same-head at-tier contract-review PASS that judges the rewritten sentence. This record is that document, see ②.
  • The three conditions of pm-dispatch SKILL.md for landing over a designed red, as read: the source states the red is by design on the pushed branch (yes, both files above); the job does not run on merge_group (yes, the workflow's only trigger is pull_request); a PR comment records the gate and the reason (yes, 7079024391). The workflow text also says Check Changeset is not a required context. I did not read the branch protection itself.
  • Token ratchet: the rule file is reported at 3711 of 3711, headroom 0. "Lint & Repo Gates" and the lint shards are green on this head, so the ceiling holds.

② Semver level

  • .changeset/36156-actions-per-record-write.md bumps @objectstack/skills by patch. The diff changes skill text and an eval fixture only. Patch is right.
  • Clause-②: no and Metadata-protocol: none are on the PR body and on the new note. The diff removes no declared capability from a consumer, so no is right.
  • The one sentence of the 36156 note that the delta changes now reads: case 23 "forbids a returned outcome object (succeeded:, { succeeded, { failed)". That is the token list at this head, exactly. The other sentences are unchanged and still agree with the diff. The note's "any other form of those members is reported as unreadable" agrees with the reworded rule sentence.
  • DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md: confirmed on this head. The note is unchanged since 31062c7b. Only one sentence pair differs from main. Front matter, title line and both declaration lines are untouched. The PR body quotes the sentence before and after, and both quotations match the diff word for word.
    • Before: "A second entry teaches what an execution: 'aggregate' bulk handler resolves with when it wrote some rows and refused others, ... that it resolves and does not throw, and how the console counts the ids. One eval case for each." At this head that would be false: the rule no longer spells the shape, the resolve-not-throw rule or the id counting, and case 23 no longer tests it.
    • After, clause 1: "A second entry says how an execution: 'aggregate' bulk handler's return value is read: one with a top-level succeeded or failed member is read as a BulkActionResult, and any other form of those members is reported as unreadable." True. It is what the rule's last sentence says at this head, and what readAggregateResult does on main.
    • After, clause 2: "One eval case for resultDialog." True. Case 22 is the resultDialog case and is untouched. Case 23 now belongs to the 36156 note.
    • So the correction is true, and the two notes do not contradict each other in one release.
  • N2 of the previous record (the 34648 title line is looser than its body) stays an accepted deviation.

③ Boundary flags

  • open_questions: empty in the round 3 report (7078923528). Nothing to escalate.
  • Dev flag, the JSON-quoted half of N3 is not covered: accepted, see ④.
  • Dev flag, a multi-line shorthand return carries none of the three forbidden tokens: accepted, see ④.
  • Dev flag, the rule file is at its ceiling again (3711 of 3711): accepted. No ceiling row moved and the gate is green. The next edit to this file has no headroom. That is the next card's concern.
  • Dev flag, the PR body was written by the seat through the relay: the body on GitHub carries the round 3 text and the token probe table. Answered, with N4 below.
  • Dev flag, the security label was added by another hand: it is the label the previous record asked for. Correct as found.
  • Dev flag, Check Changeset red and check-empty-changeset exit 1 locally: accepted, see ① and ②.
  • Dev flag, overlap-check exit 1 against the bot's version-packages PR alone: accepted, as before. It is a landing-order matter for the seat.
  • Dev flag, one derived gate not measured locally: the check-runs on the head are the verdict, and they are green.
  • SQL push-down: the diff holds no code, no id materialisation and no join. Nothing to flag.
  • No security finding. security_findings is none in the report and I found none.

④ Design judgment

skills/objectstack-ui/rules/actions.md, the delta's one sentence:

  • New text: "a return value's top-level succeeded or failed is read as a BulkActionResult (@objectstack/spec/ui), and in any other form (counts, one list) reported as unreadable."
  • The members are now the subject. "In any other form" can only mean another form of those members. The false reading the previous record named (any other return value is unreadable) is gone.
  • Against the code on main: readAggregateResult returns none when the value has neither member, unreadable when a member is present and the value does not parse, and rows otherwise. BulkActionResultSchema requires both members, succeeded as an id list and failed as a list of id and message. So counts fail the parse, and a value with one of the two lists fails it too. Both bracketed examples are right.
  • I tried to break it with a value that has neither member. The sentence says nothing about it, and the clause before it ("A throw is one outcome for the selection") is unchanged. No false claim.
  • The grammar is tight ("a member is read as a BulkActionResult" stands for "the value is parsed as one"). It costs nothing in meaning. N1: closed.
  • Sentences 1 to 5 of the bullet are unchanged since 31062c7b and the code they cite is unchanged on main. The previous record's judgment of them stands.

skills/objectstack-ui/evals/views-apps-actions-pages.json, case 23:

  • Only must_not_contain changed: succeeded:, { succeeded, { failed. Prompt, expected answer and required tokens are as reviewed.
  • The grader is gradeAnswer in packages/qa/scenarios/src/skill-evals/grade.ts: literal, case-sensitive substring, every required token, no forbidden token, nothing normalised. Read on main.
  • The expected answer carries all three required tokens and none of the three forbidden ones. I checked it by eye against the fixture.
  • S1: closed. succeeded, is gone. { succeeded needs an opening brace and a space before the word, so English prose cannot hit it. "The rows that succeeded, and each locked row with its message" now passes. The shorthand return and the single-line keyed return are still caught.
  • N3, reversed shorthand: closed. { failed catches a return that names failed first. I tried prose and template holes against it. A per-record answer has no reason to write either spelling.
  • N3, JSON-quoted wiring ("bulkActions": [): not covered, and honestly scoped. The reason given is true of the grader as written: it has no alternation, and no single literal matches both bulkActions: [ and the quoted form while still refusing a bare mention of the word. The uncovered case fails a right answer. It does not pass a wrong one. The skill teaches the TypeScript spelling, and the prompt is about a script action, so a JSON answer is unlikely. It need not be closed here. Closing it would take a grader change, which is outside this card.
  • Residual, multi-line shorthand return (the brace on one line, succeeded, on the next): true, it escapes all three tokens. It is honestly scoped, with one caveat in N4. It need not be closed here. Such an answer must still carry perRecord, bulkActions: [ and ctx.record, so it is a per-record answer with a stray return value, not the aggregate loop the case exists to catch. The keyed multi-line form is still caught by succeeded:. No literal token closes the shorthand form without the indentation being known, and succeeded, is the token S1 removed.

No must-fix, no should-fix.

Nits, no effect on the verdict:

  • N4, prose only: the announcement 7079024391 says both residuals are "named in the body". The PR body names the JSON-quoted one. The multi-line shorthand one is named in the dev report 7078923528 on the card, not in the body. One sentence in the body's round 3 section would make the announcement true. A body edit does not move the head.
  • N5, accepted as is: a right answer that quotes the old shape in order to reject it ("stop returning { succeeded, failed }") fails the case. This is a limit of literal grading, not of this token choice. The removed token had the same effect, and the reference answer already avoids the spelling.

Implemented-by: claude/issue-36156-actions-per-record-write
Reviewed-by: session_01QsR2jTeURPvEm465RcoYEC

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Seat record (2026-11-22T12:30Z) on head b88dd7612d8ee9a59ea5f20990cf9358317ed345.

维护者速读

  • 用户能看到什么变化:用户无感。对外发布的界面技能里,「对每条勾选记录各改一次」的批量按钮改教「每条勾选记录各执行一次」(execution: 'perRecord'),不再教「一次拿到全部记录、脚本里循环逐条改再汇报成败」;并写明「整批只执行一次」的脚本或流程只收到调用者看得到的记录,最多五千条。
  • 为什么做:批量操作的安全加固(所选记录先按调用者权限读一遍)已合入并更新了文档,技能文字是它欠下的另一半。
  • 出错会怎样:只改技能里一段文字、一条评测用例和两条待发布说明,不动运行时。最坏是照着技能生成应用的作者把批量按钮写成不合适的形式;撤回本 PR 即恢复原文。
  • 先看:skills/objectstack-ui/rules/actions.md 里「Visibility, Disable & Feedback」下替换的那一条,和评测用例 23 的期望答案。
  • 两分钟验证:CI 上除 Check Changeset 外全绿;Check Changeset 红是有意的,因为本 PR 改了一条还没发布的说明(34648),正文里有改前改后原句。
  • 要你做什么:批准本 PR(skills/** 是对外发布的技能目录,只能由你批);批后由席位合并。
  • 席位意见:同意合入。合同审查三轮,第一轮的一处评测用词问题已改,本轮复审通过;两处评测覆盖不到的写法已在正文写明,属于逐字评分的局限。

席位核对

ACCEPT · Tier H (skills/**, the published skills catalog)

  • L1: ACCEPT 7078358468, delta 7078669507, delta ACCEPT 7079064509 (L1-e; the 34648 correction re-quoted for this head).
  • L2: PASS 7078704220 (CONTRACT_REVIEW_TIER, S1 open), delta PASS 7079092459 (S1 and N1 closed, N3 closed in part as a stated deviation; no must-fix or should-fix open).
  • CI on the head: every check-run success or skipped except Check Changeset, red by design (the DELIBERATE CORRECTION of .changeset/34648-skills-result-dialog-bulk-result.md, before and after quoted in the body; no skip-changeset). Check Changeset runs on pull_request only.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC

Tier H hand-off (2026-11-22T12:31Z): this PR changes the published skills catalog (skills/**), so it lands only on the maintainer's approval. Head b88dd7612d8ee9a59ea5f20990cf9358317ed345. The seat record above carries the 维护者速读; seat ACCEPT, L1 delta ACCEPT 7079064509, L2 delta PASS 7079092459. Check Changeset is red by design (the stated correction of the 34648 note). The PR stays draft until an approving review; the seat then runs the pre-landing checks and enqueues it.

@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 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 22, 2026 12:33
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 7ae5e07 Nov 22, 2026
51 of 54 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-36156-actions-per-record-write branch November 22, 2026 12:56
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 security size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

objectstack-ui actions rule and its eval teach the per-record form for a body that writes each selected row

3 participants