Repository navigation
docs(skills): objectstack-ui actions rule teaches the per-record form for a body that writes each selected row - #36418
Conversation
…dy that writes rows Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTqAcPU4VyEPH7iVn2
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2 Final green head · area f7-docs · 2026-11-22T11:10Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) on head
|
…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
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2 Final green head (rework round) · area f7-docs · 2026-11-22T11:44Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对 · deltaL1 (L1-e) delta from The delta is one commit, 4 files, +7/−7, all text: skill prose, an eval fixture and two changesets. DELIBERATE CORRECTION of
The rest of the delta
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: PR #36418, card #36156. Net diff against
① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
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.
S1 (should-fix) — the forbidden token Nits, no effect on the verdict:
No must-fix. One should-fix, S1, open on this head. Implemented-by: 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
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTqAcPU4VyEPH7iVn2 Final green head (round 3) · area f7-docs · 2026-11-22T12:18Z |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jSpi3g1dQNTvN6zEuH 席位核对L1 (L1-e) delta on head
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Delta review. PR #36418, card #36156. The previous record is PASS 7078704220 at head
S1: closed ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix, no should-fix. Nits, no effect on the verdict:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Seat record (2026-11-22T12:30Z) on head 维护者速读
席位核对ACCEPT · Tier H (
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Tier H hand-off (2026-11-22T12:31Z): this PR changes the published skills catalog ( |
Requested by Steedos · project thread
Fixes #36156
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
State at head
b88dd761(round 3, three commits). One bullet ofskills/objectstack-ui/rules/actions.md(published catalog), one eval case, and two release notes. The wording is derived fromcontent/docs/ui/actions.mdxas 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):
bulkActions: ['NAME']runs the action once per ticked row, the action declaresexecution: 'perRecord', and the body writes the row it is handed (ctx.record,ctx.recordId), pointing at thecrm_create_campaignexample already in the file. A row whose run throws is listed with its message.bulkActionDefsentry withoperation: 'custom', execution: 'aggregate') is taught as one run for the selection. A script body or a flow receives the ids under the built-in keyparams._selectedIds(input._selectedIds), at most 5000 and only ids the caller can read: one the caller cannot read refuses the whole call with404 RECORD_NOT_FOUNDbefore it starts.{ succeeded, failed }, and the four id-counting rules that went with it.succeededorfailedmember is read as aBulkActionResult, 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: declareexecution: 'perRecord', name the action in the list view'sbulkActions, update only the row the body is handed, and let a locked row fail on its own.must_containis nowperRecord,bulkActions: [,ctx.record;must_not_containissucceeded:,{ succeededand{ 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/skillspatch.Not changed: the
list_toolbarrow of the locations table ("one ticked row is itsrecordId, several are refused (no_selectedIds)"). It still matches the console (resolveServerActionRecordIdinui/packages/core/src/actions/serverActionHandler.ts), and the selection-scope change touched no file underui/.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 Changesetis red on this PR for that reason, by design, and the PR carries noskip-changesetlabel.Before:
After:
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.mdxsays a body that writes each selected row is best declaredexecution: '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)must_containnow holdsbulkActions: [in place ofbulkActions, so the answer has to write the per-record wiring itself;must_not_containgained 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')isfalse, 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.apiaction's selection is not read, and the sentence no longer sits beside anapi-shaped example.Round 3 (contract review of
31062c7b)succeeded,is ordinary English and failed a right answer that says "the rows that succeeded, and ...". It is replaced by{ succeeded;succeeded:stays.{ failedis 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 everymust_containtoken, with no alternation, and no single literal matches both spellings while still excluding a bare mention.bulkActions: [stays, the TypeScript spelling the skill teaches.succeededorfailedis read as aBulkActionResult(...), 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.Token probe at this head (the grader's own rule, applied to seven sample answers):
perRecordadded, the aggregatebulkActionDefsentry keptbulkActions: [{ succeeded{ failedsucceeded:and{ succeededbulkActions: [(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 base4e55e4eb: 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).rules/actions.mdwhole file: 256 lines before, 256 after. The eval file: 235 lines before, 235 after.SKILL.mdsummed is 4950 lines before and after (none touched); every file underskills/summed is 22900 lines before and after.git diff --numstatagainst 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
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.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.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).--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, thenpnpm --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).must_containtoken in its ownexpected_output(0 missing) and nomust_not_containtoken (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 withorigin/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
BulkActionResultin the skill, as read from the code. The console and the audit trail still read it, on an aggregate dispatch only (readAggregateResultinui/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-levelsucceededorfailedin 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.type: 'api'action, the system principal); the sentence is scoped to a script body or a flow, the two that are.main). The remaining teaching was the prose sentence and eval case 23, both moved here.content/docs/ui/views.mdxand thebulkActionDefsdescription inpackages/spec/src/ui/view.zod.tsstill describe an aggregate handler that "moved some rows and refused others" answering with aBulkActionResult. That is true of the runtime and outside this card. Noted, not filed.Verification
Read first, by risk:
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 keptBulkActionResultclause.skills/objectstack-ui/evals/views-apps-actions-pages.json, case 23: the expected answer and both token lists..changeset/34648-skills-result-dialog-bulk-result.md: the corrected sentence, against the quotation above.Two-minute check:
node scripts/check-skills-token-ratchet.mjsprintsskills/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