Skip to content

feat(plugin-grid): report an aggregate bulk handler's BulkActionResult per row - #35362

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-34269-bulk-result-reader
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-34269-bulk-result-reader

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #34269

Clause-②: yes
Metadata-protocol: none

维护者速读

  • 改了什么:批量操作 execution: 'aggregate' 的处理器若返回 { succeeded, failed }(BulkActionResult),结果面板按行报告:成功数、失败行及其原因、未确认的行;返回值带这两个成员却解析不了的,报「结果无法读取」,不再当全成功。
  • 为什么改:以前聚合批量只要不抛错就把整个选择算作成功,部分成功的处理器(HotCRM 批量移动)被误报为全部成功;契约已在 @objectstack/spec/ui 声明,但没有读取方。
  • 风险与回滚:已有聚合处理器若在返回值顶层用 succeeded/failed 表示别的东西(例如计数),会从「全成功」变成「无法读取」,已在 changeset 中声明;回滚即还原本 PR。
  • 先看:ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts(readAggregateResult 与聚合分支)、ui/packages/plugin-grid/src/ObjectGrid.tsx(runBulkActionAggregate 现在返回处理器的值)、ui/packages/plugin-grid/src/components/BulkActionDialog.tsx(两个新结果形态)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx -t "BulkActionResult per row",预期 5 个用例通过。
  • 需要你做的:无,席位落地。

What changes

  • Reader. On an execution: 'aggregate' dispatch only, the grid's bulk executor reads the handler's resolve value against the ids it dispatched (params._selectedIds) with readAggregateResult, parsing it with BulkActionResultSchema from @objectstack/spec/ui:
    • neither a succeeded nor a failed own member (nothing, a summary, a link, an array) keeps today's report: every row covered;
    • one of them present but the value does not parse is one unreadable outcome for the selection (BulkResult.aggregateUnreadable), never full success;
    • a parsed value reports per row: ids outside the selection are dropped, a duplicate counts once, an id in both lists counts as failed, when one id is in failed twice the first entry's message wins, and a selected id in neither list is not confirmed (BulkResult.aggregateUnconfirmed), never succeeded.
  • Rejection is unchanged: it stays the one-outcome aggregateRejection report. The per-row result sits beside it as two new optional BulkResult members, never inside it.
  • Dispatcher. ObjectGrid's runBulkActionAggregate returned void, so no resolve value ever reached the executor. It now returns the handler's own value, read one level below the action envelope with readActionPayload (the reader every other consumer of ActionResult.data uses). Closing the dialog re-reads the grid after an unreadable run or one that left rows unconfirmed, as it already did after a rejection.
  • Dialog. Failed rows are listed under their record with the handler's message (and in the error CSV), with no Retry (an aggregate run has no per-row slice). Unconfirmed rows get a Not confirmed N tally and their own list. An unreadable run gets its own one-outcome panel with no per-row count.
  • Strings. Three new keys in every @object-ui/i18n pack: grid.bulk.resultNotConfirmed, grid.bulk.notConfirmedRecords, grid.bulk.aggregateUnreadable; zh-Hant regenerated from zh-Hans; resultNotConfirmed listed as a count tally beside resultFailed.
  • Spec prose. The [PLANNED — not enforced] marker and the "until the reader lands" sentences are removed from BulkActionResultSchema's TSDoc and .describe(), and the reference page content/docs/references/ui/bulk-action.mdx is regenerated (check:generated --fix). The prose restates seat ruling 6905490575 option A and adds the card's first-entry-wins rule; no schema shape changes. content/docs/ui/views.mdx drops "a handler that cannot cover the whole selection must reject" and says how a per-row answer is reported.
  • Declared behaviour change (review r2 N2, 6907153374), in the changeset: an existing aggregate handler whose return value carries a top-level succeeded or failed member in another form (counts, or only one of the two lists) moves from the success report to "unreadable".

Tests

  • useBulkExecutor.test.ts, new top-level describe "an aggregate run reads its BulkActionResult per row": one pin per reader rule (moved count + failed rows, outside-selection dropped, duplicate once, both lists then failed, first failed entry wins, neither list then not confirmed), four unreadable shapes (counts, error instead of message, one member only, numeric ids), and a CONTROL over five neither-member values (nothing, null, a summary, a link, an array) asserting today's exact report.
  • objectBulkActionDispatch.test.tsx, new top-level describe "an aggregate run reports its BulkActionResult per row": through the real ObjectGrid, ActionProvider and createServerActionHandler over the /actions success envelope: partial result listed per row with no Retry; not-confirmed row listed by name and kept out of the succeeded list; all-unconfirmed run re-reads the grid once on close; unparseable { succeeded: 2, failed: 0 } shows the unreadable panel and no count; CONTROL: a handler returning nothing keeps "Succeeded 2 / 2".

Acceptance notes

  • File surface. The claim named useBulkExecutor.ts, BulkActionDialog.tsx, the spec file and reference page, the locale packs, new test files and .changeset/. This PR also edits:
    • ObjectGrid.tsx: without its one-line return readActionPayload(res.data) the reader would only ever see undefined in the running console. This is the card's own defect (the resolve value is dropped), so it is fixed here.
    • Two existing test files instead of new ones, because AGENTS.md puts a new pin for a component that already has a shared harness file into that file as a top-level describe (ruling record 6583487846).
    • count-families-11445.test.ts: the new count key, listed beside grid.bulk.resultFailed.
    • content/docs/ui/views.mdx: it stated the rule this PR retires.
  • Not changed, stale after this PR: docs/audits/2026-07-unknown-key-strictness-ledger.md, in the bulk-action.zod.ts row, still says BulkActionResultSchema is PLANNED with nothing reading it. It is an internal audit ledger and no gate reads it; left for the seat.
  • Server audit row (runResolvedActionAsRest) and skills teaching (skills: teach an aggregate bulk handler to resolve with BulkActionResult (skills/objectstack-ui/rules/actions.md) #34268) are out of scope, as the card says.

Verification

Local runs on head 8870567.

Tests, typecheck, gate families (head 8870567)
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-grid/src/__tests__/useBulkExecutor.test.ts packages/plugin-grid/src/__tests__/objectBulkActionDispatch.test.tsx: Test Files 2 passed (2), Tests 72 passed (72), lock VERDICT command-exit 0.
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-grid/ packages/i18n/ (head d18360f): plugin-grid all green; i18n had 2 failures, now fixed: grid.bulk.resultNotConfirmed was missing from the count-tally list, and zh-Hant needed regenerating. Re-run of packages/i18n/ on 8870567: Test Files 104 passed (104), Tests 1956 passed, 13 skipped.
  • pnpm --filter @object-ui/plugin-grid run type-check && pnpm --filter @object-ui/i18n run type-check: VERDICT command-exit 0 (tsconfig.test.json compiles the tests).
  • pnpm --filter @objectstack/spec build exit 0; check:generated named check:docs stale (expected, describe changed), --fix regenerated content/docs/references/ui/bulk-action.mdx, exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands on 8870567: 113 families, all run; --ran reconciliation: 110 run exit 0, 3 NOT-MEASURED (exit 3, PREREQUISITE NOT MET), 0 UNRUN.
    • check-plugin-teardown-shape --self-test: shallow clone missing its pinned fixture commit; after fetching that commit, re-run exit 0 (checker-health only).
    • check:skill-examples: client-react was not built; after building it, re-run exit 0 (345 prose examples type-check).
    • check:dual-build-cjs-loads: NOT MEASURED, needs a whole-tree pnpm build (35 packages without dist); CI runs it.
  • node scripts/pm/overlap-check.mjs before each push: VERDICT clean exit 0 (shares only locale packs with fix(console): Notification Settings is read-only, with its reason, for a caller with no write grant #35313 and feat(security, create-objectstack): an AI-built app with its own capabilities and no connector plugins installs as an unmanaged copy #35261, both merge cleanly).

Generated by Claude Code

…per row

An execution: 'aggregate' bulk run now reads the handler's resolve value
against the dispatched selection: moved rows, refused rows with their
message, and rows named in neither list reported as not confirmed. A value
carrying succeeded/failed that does not parse is one unreadable outcome.
Drops the PLANNED marker from BulkActionResultSchema.

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

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec, touching 2 documentable anchor(s).

⛔ 1 release-owned page(s) name something this change touched. These are read-only:

  • content/docs/releases/v18/18-6.mdx (via BulkActionResultSchema (symbol, a top-level const))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 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 — 174 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 35c6331094ad944ddce5d717ffc7015e53ae4796 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 0fea33c6f14ebc1ca6a05494db69ffb4531a22a4 — the merge of head 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd into base 35c6331094ad944ddce5d717ffc7015e53ae4796, 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 0fea33c6f14ebc1ca6a05494db69ffb4531a22a4 && git checkout 0fea33c6f14ebc1ca6a05494db69ffb4531a22a4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 35c6331094ad944ddce5d717ffc7015e53ae4796 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd && git checkout -B drift-repro 35c6331094ad944ddce5d717ffc7015e53ae4796 && git merge --no-ff 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd

node scripts/docs-audit/affected-docs.mjs --json 35c6331094ad944ddce5d717ffc7015e53ae4796

⚠️ 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 35c6331094ad944ddce5d717ffc7015e53ae4796 → 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#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

Final head for review · area data-2 · 2026-11-19T06:47Z
Head: 8870567d7f353be8d148f9452f0a7b02aabd6b5c — all check runs on it concluded: 61 success, 9 skipped, 0 failed.
Fixes #34269 · Clause-②: yes (3 new keys in the 11 published @object-ui/i18n packs) · Metadata-protocol: none · +453/−57 over 21 files. Claim surface amended (ObjectGrid.tsx, count-families test, views.mdx).
Review route: L1-a thread (Clause-② yes: contract read owed before queue). Landing after its ACCEPT, by the area.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:在列表里批量勾选记录、执行一个“整批一次处理”的操作后,结果框会逐条说明:哪些成功,哪些失败、各自为什么失败,哪些没有得到确认。以前只要操作没报错,就一律显示“全部成功”。
  • 为什么做:处理了一部分、拒绝了一部分时,用户以前会被告知全部成功,被拒绝的记录就被漏掉了。
  • 出错会怎样:已有的批量操作,如果返回值碰巧带了“成功/失败”字样却不是规定的格式,以后会显示“结果无法读取”而不是“全部成功”,列表会重新刷新。这一点已在变更说明里写明。
  • 要你做什么:不需要你做任何事。它改了对外公开的约定,席位会安排一次约定审核,然后由区域落地。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head 8870567d7f353be8d148f9452f0a7b02aabd6b5c · 2026-11-19T06:48Z

  • 形态 — 21 files, +453/−57 (510 lines): plugin-grid (executor, dialog, ObjectGrid), 11 @object-ui/i18n packs, count-families test, spec/src/ui/bulk-action.zod.ts (description text only), two docs pages, one changeset. check-governed-merges.mjs --pr 35362: not governed, under the 3000-line limit. Clause-②: yes (three new keys in every published pack), Metadata-protocol: none.
  • Fixes vs card ui: the grid's aggregate bulk reader drops the handler's resolve value, so a BulkActionResult (per-row succeeded/failed) is reported as all rows succeeded #34269 — readAggregateResult(value, selectedIds):
    • no own succeeded/failed member → none (whole selection covered, as today);
    • a member present but BulkActionResultSchema.safeParse fails → unreadable;
    • parsed → rows.
      In rows, failed is filtered to the selection, first message per id wins, and an id in both lists counts as failed; succeeded is filtered to the selection and duplicates collapse; every other selected id is unconfirmed, in selection order. Traced against all five id rules in the schema doc: each holds.
      The executor maps the readings this way:
    • none → succeeded += n;
    • unreadable → failed += n plus aggregateUnreadable, and the dialog prints no per-row count;
    • rows → per-row counts, errors carrying the handler's message (so it reaches the error CSV), and aggregateUnconfirmed.
      So succeeded + failed + unconfirmed === total. The surface amendment is real: runBulkActionAggregate returned void, so no reader could ever be fed. It now returns readActionPayload(res.data), which is the identity on single-wrapped servers and unwraps only the exact legacy envelope. Per-row Retry stays hidden for aggregate defs (def.execution !== 'aggregate'), which matches the docs ("re-running the action is the retry"). Count invalidation and the grid re-read on close now also fire on unreadable runs and on runs with unconfirmed rows.
  • Contract text — the spec diff is description and JSDoc only: the [PLANNED — not enforced] marker is dropped and the planned-reader tense becomes present. One rule is added, "an id in failed twice keeps its first message"; the reader implements it and a pin covers it. No schema shape changes. The reference page and the views.mdx sentence ("a handler that cannot cover the whole selection must reject" is retired) say the same thing.
  • Changeset — three packages, all patch. Read sentence by sentence against the diff:
    • the reader rules match readAggregateResult;
    • "lists each refused row … in the error CSV" matches errors.push;
    • "rejection is unchanged" holds (the catch arm is untouched);
    • the Declared behaviour change paragraph names exactly the unreadable arm's population, counts or a single list, and how to keep the old report;
    • the three key names match the packs.
  • Pins — useBulkExecutor.test.ts: per-row count and message, out-of-selection drop, duplicate once, both-lists → failed, first message wins, neither → not confirmed, plus it.each tables for the unreadable shapes and the none shapes. objectBulkActionDispatch.test.tsx runs through the real ObjectGrid dispatch: moved count and failed rows with no Retry; not confirmed is never succeeded; one re-read on close for an all-unconfirmed run; unreadable is never full success; and a CONTROL where a handler returning nothing keeps today's report. count-families lists resultNotConfirmed as count-neutral, consistent with its sibling resultFailed.
  • 门禁 — 70 check-runs on this head: 61 success, 9 skipped, 0 failure.
  • 接受的偏差 — the surface amendment (ObjectGrid, the count-families test, views.mdx) is outside the original fence, but each item is needed for the card's "Done when". It is recorded on the card. Accepted.
  • 范围外去向 — none found.
  • L2 owed (routing) — Clause-②: yes, and a non-test file under packages/spec/src/** → a contract review at CONTRACT_REVIEW_TIER is owed before queue. This L1 cannot cover it. Routed to seat 5.
  • 落地条款 — base de8d5497, main moved K=17 first-parent commits (≥ 15). Main has also landed ui/packages/i18n/src/locales/*.ts since the base (all 11 packs, including fix(console): Notification Settings is read-only, with its reason, for a caller with no write grant #35313 on en.ts), and this PR adds pack keys. So: merge main and wait for a green re-run before queueing. git merge-tree against current main is clean. This ACCEPT carries over to the post-merge head if the merge brings nothing beyond main. After the seat's L2 record, data-2 lands.

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

Final head for review (post-merge, per L1-a ACCEPT 7001997180 condition 1) · area data-2 · 2026-11-19T07:23Z
Head: a3eb6b24bc65d7819c0ee3f629f505617176d4e5 — all check runs on it concluded: 62 success, 13 skipped, 0 failed (Test UI 16/16 shards, which run the @object-ui/i18n key-parity and count-family tests over the 3 new keys).
Delta from 8870567d: one clean merge of origin/main (no conflict, no hand resolution; overlap-check exit 0, incl. #35261 on the 11 locale packs). The ACCEPT carries over.
Next: seat 5 L2 (CONTRACT_REVIEW_TIER) on this head, then the area lands.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a3eb6b24bc65d7819c0ee3f629f505617176d4e5
Local-runs: none
Scope: packages/spec/src/ui/bulk-action.zod.ts + ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts, ui/packages/plugin-grid/src/ObjectGrid.tsx, ui/packages/plugin-grid/src/components/BulkActionDialog.tsx

Inputs read: card #34269 (body and all 7 comments), PR #35362 (body, file list, net diff against main at this head, 4 comments), and the 75 check-runs on this head: 62 success, 13 skipped, 0 failed. The rest of the diff (11 locale packs, the two test files, count-families-11445.test.ts, the two docs pages, the changeset) is the lane seat's ACCEPT at TIER_DEFAULT.

① Derived judgments

  • Accept-set of BulkActionResultSchema: unchanged. Right. The diff in bulk-action.zod.ts touches TSDoc and .describe() strings only. The shape stays z.looseObject({ succeeded: string[], failed: looseObject({ id, message })[] }), both members required.
  • Public surface of @objectstack/spec: description text only. Right. The [PLANNED — not enforced] marker is gone from the TSDoc and the describe, the future tense becomes present, and one reader rule is added (first failed entry's message wins). The generated reference page content/docs/references/ui/bulk-action.mdx carries the same text.
  • Public surface of @object-ui/plugin-grid: behaviour only. Right. The package index (src/index.tsx) does not re-export the hook module, so readAggregateResult, AggregateResultReading and the two new optional BulkResult members (aggregateUnreadable, aggregateUnconfirmed) are internal. What ships is the new result report. Nothing exported is removed or retyped.
  • Public surface of @object-ui/i18n: three keys added to each of the 11 packs. Right. grid.bulk.resultNotConfirmed, grid.bulk.notConfirmedRecords, grid.bulk.aggregateUnreadable. No key removed or renamed. The Test UI shards that run key parity and the count-family test are green on this head.
  • Behaviour change at the consumer: declared, and right. An aggregate handler whose resolve value has an own succeeded or failed member that does not parse moves from "all succeeded" to one "unreadable" outcome. The 18.6 text of this schema already announced that rule ("Once read: … reported as unreadable, never as full success"), and review r2 N2 (6907153374) required it in the changeset, where it is, with the two ways to keep the old report.
  • Gate verdicts. Check Changeset, Spec property liveness, Governed Surface Queue Guard, PR-body guards, the Lint families and Type Check families: all success on this head.

② Semver level

Clause-②: yes — correct. The PR adds three keys to each published @object-ui/i18n pack, so the published surface widens. No (narrowing) arm is owed: no accepted value, key or export is taken away, and the schema's accept-set is unchanged.

Metadata-protocol: none — correct. Nothing a metadata author can write changes: no key, value, default or meaning of authored metadata. BulkActionResult is a handler's runtime return value, not authored metadata.

Level: patch on @object-ui/plugin-grid, @object-ui/i18n and @objectstack/spec — correct under AGENTS.md Post-Task step 3 (kind none takes patch; a non-protocol widening ships patch). All three packages the diff publishes from are named; no published package in the diff is missing from the changeset. Both declaration lines are in the PR body and the changeset body, and they agree. No Skills-docs: line is owed (kind none, no narrowing arm).

③ Boundary flags

  • open_questions: empty in the dev report (7001475210). Nothing to answer.
  • Deviation, file surface (ObjectGrid.tsx, count-families-11445.test.ts, content/docs/ui/views.mdx): answered by the claim amendment 7001504622. The ObjectGrid.tsx edit is required: without return readActionPayload(res.data) the reader only ever receives undefined.
  • Deviation, pins in the two shared harness files and not in new card-named files: follows the AGENTS.md shared-harness rule the dev cites; accepted by the lane ACCEPT 7001997180.
  • Deviation, spec prose adds the first-entry-wins rule: it is the card's own item 2, the reader implements it, and a pin covers it. Accepted.
  • Out-of-scope finding (docs/audits/2026-07-unknown-key-strictness-ledger.md still says PLANNED): internal audit prose that no gate reads; it stays with the seat. The docs-drift check also names the release-owned page content/docs/releases/v18/18-6.mdx; that page is read-only for this PR.
  • Follow-ups the card already names stay out: skills teaching is skills: teach an aggregate bulk handler to resolve with BulkActionResult (skills/objectstack-ui/rules/actions.md) #34268; the invocation audit row is a server card the seat files.
  • SQL push-down: no finding. The diff adds no query, no id materialisation and no in-app join. The reader compares the handler's lists with the selection ids the dispatch already holds in memory.

④ Design judgment

packages/spec/src/ui/bulk-action.zod.ts, against seat ruling 6905490575 (option A, resolve-only), the card's item 2, and its first consumer readAggregateResult. Read sentence by sentence against the code at this head:

  • "Read … on every execution: 'aggregate' dispatch": holds. The read sits inside if (isAggregate) in useBulkExecutor.ts, and ObjectGrid is the only place that wires runAggregate.
  • "The object IS the handler's whole resolve value (no wrapper key)": holds. readActionPayload is the identity on a single-wrapped answer and unwraps only the exact legacy envelope.
  • "Never attached to a rejection; a rejection stays one outcome": holds. The catch arm and aggregateRejection are untouched.
  • "A value with neither member keeps the one-outcome report": holds. carriesMember is false for nothing, null, an array, and an object without an own succeeded or failed; the reading is none and the whole selection counts as succeeded, as before.
  • "A value with either member that does not parse is reported as unreadable, never as full success": holds. safeParse failure gives unreadable; the executor sets aggregateUnreadable, and the dialog shows its own panel with no count and no success icon.
  • "Members beyond the two lists carry no meaning": holds. Both objects are loose, and the reader uses only the two lists.
  • "An id outside the selection is dropped": holds, for both lists (selected.has).
  • "A duplicate counts once": holds (Map for failed, Set for succeeded).
  • "An id in both lists counts as failed": holds. failedById is built first and succeeded skips any id in it.
  • "An id in failed twice keeps its first message": holds (!failedById.has(entry.id) before set).
  • "A selected id in neither list is reported as not confirmed, never as succeeded": holds. It goes to unconfirmed, is left out of both counts, gets its own tally and list, and is removed from the succeeded list in the dialog.
  • "Ids must be the dispatched params._selectedIds": holds. validIds in the executor and ids in runBulkActionAggregate are derived from the same rows by the same rule (non-empty String(row.id)), so the reader compares against exactly what was dispatched.

Attempts to break it, all held: a { succeeded: [], failed: [] } answer leaves every row unconfirmed and re-reads the grid on close; a failed-only answer keeps the selection and shows each message with no Retry (def.execution !== 'aggregate'); { succeeded: undefined } is an own member and reads as unreadable; a legacy double envelope is unwrapped before the read.

Implementing files. useBulkExecutor.ts, ObjectGrid.tsx and BulkActionDialog.tsx agree with the contract on every sentence above. Count invalidation and the grid re-read on close also run after an unreadable run or one with unconfirmed rows, which is the safe side.

Findings:

  • S1 (should-fix) — the published spec now states two opposite rules. packages/spec/src/ui/view.zod.ts:3663-3664, the bulkActionDefs describe, still says "Aggregate results are all-or-nothing: a handler that cannot cover the whole selection must reject". This PR makes BulkActionResultSchema say a run that moved some rows "resolves with it, a non-empty failed being a legal success answer", and it retires that same sentence in content/docs/ui/views.mdx. The describe is published text and is generated into content/docs/references/ui/view.mdx (6 rows), references/api/protocol.mdx (2 rows) and references/data/object.mdx (1 row). On main the two texts agreed, because the PLANNED marker said "must still reject"; removing the marker without this sentence is what creates the contradiction. Fix: reword that sentence in view.zod.ts to match (a rejection is one outcome; a partial run resolves with a BulkActionResult) and regenerate the reference pages.
  • N1 (nit) — ui/packages/types/src/objectql.ts:752, the execution TSDoc, still says "Result semantics are all-or-nothing: the one call covers the whole selection". Same stale rule, in a TSDoc outside the diff; it can ride S1's fix or a follow-up.
  • N2 (nit) — the spec TSDoc names readAggregateResult, a function of the hook module that the package index does not export. The package name alone would age better.

No must-fix. S1 is open on this head and earns a delta review of its fix.

Implemented-by: claude/issue-34269-bulk-result-reader
Reviewed-by: isolated-l2-35362

VERDICT: PASS

…the reader by package

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB
os-dev-delta

Delta round on L2 contract review 7002682625 (PASS, S1 open). New head 2244a349, a fast-forward on top of the area's merge of main (a3eb6b24).

  • S1: the bulkActionDefs describe in packages/spec/src/ui/view.zod.ts no longer says "all-or-nothing / must reject". It now says a rejection is one outcome for the whole selection, and a run that moved some rows and refused others resolves with a BulkActionResult ({ succeeded, failed }), a non-empty failed being a legal success answer. content/docs/references/ui/view.mdx, references/api/protocol.mdx and references/data/object.mdx were regenerated with check:generated --fix.
  • N1: same rewording in the BulkActionDef.execution TSDoc in ui/packages/types/src/objectql.ts. @object-ui/types is published, so the changeset now names it (patch).
  • N2: the BulkActionResultSchema TSDoc names "the grid's aggregate reader in @object-ui/plugin-grid" instead of the unexported readAggregateResult.

No other change.

Gates on 2244a349:

  • pnpm --filter @objectstack/spec build + check:generated --fix exit 0; check:generated re-run exit 0.
  • pnpm --filter @object-ui/types run type-check exit 0.
  • Exit 0: check:doc-anchors, check:doc-authoring, check:doc-frontmatter, check:docs-spec-enumerations, check:docs-single-h1, check:spec-docblock-symbol-anchors, spec check:llms-txt, docs-audit/check-affected-docs, docs-audit/check-drift-comment, check:nul-bytes.
  • check:docs-transcript-drift first exited 3 (PREREQUISITE NOT MET: @objectstack/lint not built); after building the lint closure it exited 0.
  • overlap-check VERDICT clean, exit 0.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd
Local-runs: none
Scope: packages/spec/src/ui/bulk-action.zod.ts, packages/spec/src/ui/view.zod.ts + ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts, ui/packages/plugin-grid/src/ObjectGrid.tsx, ui/packages/plugin-grid/src/components/BulkActionDialog.tsx, ui/packages/types/src/objectql.ts

Delta review of round 1, record 7002682625 on a3eb6b24bc65d7819c0ee3f629f505617176d4e5. The new head is a fast-forward of that one; the delta is 7 files, +23/−19: two spec files (description text only), one @object-ui/types TSDoc, three regenerated reference pages and the changeset. No executable line changed, so round 1's reading of the three grid files stands on this head. The 70 check-runs on this head are all finished: 61 success, 9 skipped, 0 failed.

① Derived judgments

  • Accept-sets: unchanged. Right. view.zod.ts changes one .describe() string on bulkActionDefs; bulk-action.zod.ts changes three TSDoc lines. No schema shape, key, value or default moves.
  • Public surface of @objectstack/spec: description text only. Right. The bulkActionDefs describe now says a rejection is one outcome and a partial run resolves with a BulkActionResult.
  • Public surface of @object-ui/types: TSDoc only. Right. The BulkActionDef.execution comment is reworded; the type is unchanged.
  • Generated pages: in step. Right. The new bulkActionDefs sentence is in all 9 reference rows (references/ui/view.mdx 6, references/api/protocol.mdx 2, references/data/object.mdx 1) and the old sentence is in none.
  • Round 1's other judgments are unchanged by this delta.

② Semver level

Clause-②: yes — unchanged and correct (three keys added to each published @object-ui/i18n pack). Metadata-protocol: none — still correct: the delta is description text.

The new '@object-ui/types': patch entry is right. The diff now changes a file that package publishes (the TSDoc ships in its type declarations), so it owes a changeset, and kind none takes patch. The changeset now names all four packages the diff publishes from, and its body states the wording change in both places.

③ Boundary flags

  • No new dev flag and no open_questions entry in this delta.
  • view.zod.ts is a second published-spec file, so it joins the hits scope above.
  • SQL push-down: no finding. The delta contains no code.
  • Round 1's answers stand.

④ Design judgment

  • S1: closed. packages/spec/src/ui/view.zod.ts no longer says "all-or-nothing … must reject". Its new sentence agrees with BulkActionResultSchema and with the reader: a rejection is one outcome (aggregateRejection), a partial run resolves with { succeeded, failed }, a non-empty failed is a success answer, and per-row retry is replaced by re-running the action (the dialog hides Retry for an aggregate def).
  • N1: closed. ui/packages/types/src/objectql.ts carries the same corrected rule and keeps the true statement that a total failure keeps the selection.
  • N2: closed. The spec TSDoc now names the package, not an unexported function.

Search for any other place still teaching the retired rule, over packages/spec/src/ui, ui/packages/types/src, ui/packages/plugin-grid/src, ui/packages/core/src, skills/ and content/docs outside the release pages: none found in published text. One remainder:

  • N3 (nit) — ui/packages/plugin-grid/src/hooks/useBulkExecutor.ts:599, an internal comment in retry(), still calls an aggregate run "a single all-or-nothing call". It explains why there is no per-row slice to retry, which is still true; it is not published and teaches no handler author. Left as an accepted deviation.

No must-fix, no should-fix.

Implemented-by: claude/issue-34269-bulk-result-reader
Reviewed-by: isolated-l2-35362

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

Landing · area data-2 · 2026-11-19T08:16Z

reading value
L1-a ACCEPT comment 7001997180 at 8870567d; condition 1 (merge main, green re-run) met at a3eb6b24 (7002615271); condition 2 (L2) met below
L2 contract review PASS 7002682625 at a3eb6b24 (S1 open) → delta PASS 7003611397 at 2244a349ee3b9711bd94bc5a9b0a8886f4b4c7cd (= current head; S1, N1, N2 closed; N3 accepted deviation, internal comment)
CI on head 61 success, 9 skipped, 0 failed
check-governed-merges --pr 35362 NOT governed, 0 of 26 paths; +472/−72 ≤ 3000; K = 9 from merge base 3e7feed5; no locale file changed on main since; no os-regen path

State: draft → ready + auto-merge (merge queue). #34269 closes on merge via Fixes.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 19, 2026 08:17
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 19, 2026
@objectstack-fleet objectstack-fleet Bot removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 19, 2026
Merged via the queue into main with commit 1c05546 Nov 19, 2026
74 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34269-bulk-result-reader branch November 19, 2026 08:44
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 protocol:ui size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants