Repository navigation
Description
repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu
Filing gate: ① a product defect with a named landing and a named producer · Source: fleet (L1 7062716121 on PR #36060, R2 item 1)
维护者速读
- 问题:PR feat(objectql,service-analytics): refuse a raw aggregate over a record-mode quantity unless grouped by its unit field #36060 让引擎拒绝「不按单位分组就求和」的按行单位数量(例如一行 10 千克、一行 10 磅)。列表和表格底部的合计行会把所有列的合计放进同一个查询,它只跳过按行币种的金额,不认识按行单位的数量。
- 影响:一旦带单位的数量字段上线,某列底部选了合计,整条合计查询就被拒,其他列的合计也会悄悄变成「当前页合计」,标签却还是「整个视图」。和已修的 ui(grid): a column summary
sumon a record-mode amount sends a raw aggregate the engine refuses, and the footer loses every whole-set total #32334(币种版)是同一个问题。 - 这一步做什么:底部合计查询像跳过按行币种金额一样,跳过按行单位数量上的 sum/avg/min/max。
- 要你做的:无。
What will go wrong
useWholeSetSummary (ui/packages/plugin-grid/src/useWholeSetSummary.ts) builds one ungrouped whole-set query through compileWholeSetSummaryQuery. Since #32334 (PR #32492) it leaves out a money aggregate over a record-mode currency amount (recordCurrencyAggregates.ts: requiredCurrencyGrouping, honestGroupAggregations; useColumnSummary skips record mode). No file under ui/** reads unitConfig.
PR #36060 (ADR-0158 U7 R1) makes the engine refuse sum/avg/min/max over a number with unitConfig: { unitMode: 'record' } unless grouped by its unitField (INVALID_FIELD / 400). Once both are on main, a list or grid view with summary: 'sum' on such a quantity column sends a query the engine refuses. Every other summarised column in that view then falls back from its whole-set figure to the current page's figure, under a label that reads as the view's total, and grouped views lose their group aggregates the same way. That is #32334's defect on quantities.
reach: a named producer (compileWholeSetSummaryQuery sends an ungrouped aggregate for any summarised number column). Read from code, not run: the refusal is not on main until #36060 merges, and unitConfig has not shipped in a release yet (changeset 35489-unit-config.md pending).
Business reason
A warehouse or purchasing user who adds a Quantity sum to a goods-receipt view, where rows carry KGM, LBR or H87, would read page totals as whole-view totals on every other column, with nothing on screen saying the figures changed meaning.
Ask
- The whole-set summary and group aggregations leave out
sum/avg/min/maxover arecord-mode quantity, the way they leave out a record-mode currency amount, so the other columns keep their whole-set figures. A per-unit total grouped by the unit field is a product choice, not part of this card. - Pins: a view with one record-mode quantity sum and one plain-number sum; the plain column keeps its whole-set figure and no refused request is sent; an ablation each.
Order
After PR #36060 merges (it adds the refusal). It should land before unitConfig ships in a release, so users get both together.
Grading: area:ux · Bug · the unit twin of #32334.
Suggested grade: p2 (wrong totals shown as whole-view totals with no error, on the release that ships units).
Dedupe: repo:objectstack-ai/objectstack is:issue useWholeSetSummary (10 hits, #32334 the currency twin, closed), whole-set summary record-mode (#32334, #31912, closed), unitConfig grid summary (only the triage seat post) → no card for the quantity case.
Activity
objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:ui(grid footer and group aggregations) ·pm:queue; rationale: area:ux · Bug · after PR #36060 the engine refuses a raw sum over a record-mode quantity, but the whole-set footer and group aggregations still send it, so once unit quantities ship the whole footer query is refused and other columns silently fall back to page totals under a "whole view" label; unit twin of #32334 → p2 as filed · size S.objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Ruling-ref: maintainer 2026-11-21T22:1xZ, verbatim: 「5张都升级」, on triage's second non-topic p1 pass (standard ruled 「同意」 earlier today: this week, or someone loses).
2026-11-21T22:20Z · p2 → p1 on the maintainer's word: a release blocker for units: once
unitConfigships, a summarised quantity column refuses the whole footer query and other columns silently show page totals under a whole-view label. It must land before units ship in a release. Lane and state unchanged.objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob
Seat intake · 2026-11-22T02:29Z · the maintainer gave this p1 to seat
repo:objectstack#1in its project chat (「这些全部接,能派的立刻派」, 2026-11-22T02:27Z), together with #36005, #36082, #35645, #35831 and #33581. Each goes to its own card thread. Order inside the running cap of 10: #36005 now, then #36082, #35645, #35831 and #33581 as slots free. Each thread sends a premise first, and the seat then writes theClaim:and flips the labels. Until then this card stays onpm:queuewith no assignee (the queue rule); this note is the hold.objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob
Release: handover to seat
repo:objectstack#4· 2026-11-22T02:41Z · the maintainer told seat 1 to finish only its work in hand and to hand later work to seat 4 (2026-11-22T02:39Z). Handover in seat 4's mailbox #36124 (comment 7073058497) with this card's state, brief and conflict points. Seat 1 holds nothing on this card now.objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1
Claim: PM loop · area a4-D · 2026-11-22T02:49Z
Session:
session_01FEkQ5okniknzVVR3KTSVr1Account:
os-project-managerBranch:
claude/issue-36082-record-unit-summaryWorktree:
objectstack-issue-36082Domain:
domain:uiSeat:
repo:objectstack#4Area: a4-D
File surface:
ui/packages/plugin-grid/src/whole-set footer and group aggregation path (useWholeSetSummary.ts/compileWholeSetSummaryQuery,objectGridGrouping.ts,recordCurrencyAggregates.ts,useColumnSummary.tsfor the footer cell of the left-out column), its tests, a changeset (stop on breach; explain in the report)Container & model:
S,mode:subagent,model: opus(default tier; seat hand-over order a4-D 2026-11-22T02:48Z,dispatch-gates --tier: no path-derived mandate onui/**),effort: high(seat order)Clause-②: no
Metadata-protocol: none
Responsibility: the grid/list whole-set footer and group aggregations in objectstack
ui/**| leave out sum/avg/min/max over aunitConfig: { unitMode: 'record' }quantity the way record-mode currency is left out (#32334 / PR #32492), since the engine refuses it after PR #36060 | users of any list or grid view summing a record-mode quantity: the whole footer query is refused and every other column shows page totals under a whole-view labelThread-read: 7073069337
Premise: holds — PR #36060 is on main (c59ee99, ancestor of origin/main a5a5312); no file under
ui/packages/plugin-gridorplugin-listreadsunitModeat a5a5312;recordCurrencyAggregates.tshandles currency only.Pre-claim lane: repo:objectstack whole-repo lane; hand-over from seat
repo:objectstack#1(mailbox #36124 comment 7073058497, release 7073069337); seat 1's intake note 7072944152 is void.Pre-claim deps: PR #36060 merged (prerequisite). Must land before
unitConfigships in a release (changeset35489-unit-config.mdpending).Prior rulings read: grid,whole-set,footer,group,aggregations,send,record-mode,quantity,engine,refuses,unit → 2 hit lines in 1 file, none carries a ruling id; precedent read now: #32334 closed, PR #32492 merged (c6230f4), PR #36060 merged. thread: none.
Fold-or-serial: not folded; serial-aware with seat 1's #35795 (plugin-grid
useRowApprovalLocks.ts/ data-table, claim 7072869185) and #36204 / PR #36223 (plugin-list, components) — no shared file at claim time;overlap-checkbefore each push, second lander merges main and keeps both.Serial constraints cleared: none on this file surface at origin/main a5a5312
objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1
os-dev-report
{
"issue": 36082,
"status": "done",
"branch": "claude/issue-36082-record-unit-summary",
"pr": "#36271",
"session": "session_01FEkQ5okniknzVVR3KTSVr1",
"premise_still_valid": true,
"summary": "Generalised the one rule in ui/packages/plugin-grid/src/recordCurrencyAggregates.ts so a record-mode currency amount and a record-mode quantity go through the same helper: recordUnitField (a number with unitConfig.unitMode 'record' and a non-empty unitField, read exactly as the engine's recordUnitFieldOf), recordMeasureUnitField (currency code field or unit field), requiredAggregateGrouping (renamed from requiredCurrencyGrouping) and isMeasureAggregate (renamed from isMoneyAggregate; both module-internal, not in the barrel), one aggregate-set constant. All four readers call it: wholeSetSummaryNodes leaves the node out of the whole-set query, honestGroupAggregations keeps a group aggregate only when the grid is already grouped by its unitField (no new per-unit total, per the seat's scope note), the footer cell draws nothing for it, and the footer menu offers the count family only. Zone 2 readings: (1) no ui file read unitConfig and @object-ui/i18n has no unit twin of recordCurrencyField; the predicate lives beside the currency rule in recordCurrencyAggregates.ts, the module the grid's aggregate paths already import, kept package-internal because no other ui surface reads unitConfig (a public i18n export would be a declared surface with one consumer). (2) The engine door admits the aggregate when groupBy carries unitField (groupedFields reads string and {field} entries), so group aggregates are kept as for currency. (3) Without the footer skip the left-out column falls back to a page sum over mixed units labelled as the page's (whole scope) or a whole-labelled mixed sum (rows scope); the footer-skip ablation proves it, so the skip now matches currency. The menu (offeredColumnSummaries) is the footer's own menu, same file. (4) plugin-list builds no whole-set summary or group aggregation query of its own (it hands the grid queryGroupHeaders-capable data and the grid asks), so no plugin-list edit. The PR body's local-gate details say pnpm --dir ui exec vitest run scripts/ was NOT MEASURED; a third attempt after pr_create got the lock and passed (172 files passed, 2 skipped; 5122 tests passed), so that line of the body is stale and is the seat's to bring forward if wanted.",
"tests": "Head 9f56bc1 (tests run at ae56a75, source byte-identical; the later commit adds only the changeset). pnpm --dir ui exec vitest run recordCurrencyAggregates-27188.test.tsx + footerSummaryScope-12081.test.tsx: Test Files 2 passed (2), Tests 42 passed (42). pnpm --dir ui exec vitest run packages/plugin-grid/: Test Files 300 passed (300), Tests 2657 passed (2657), lock VERDICT command-exit 0. pnpm --filter @object-ui/plugin-grid type-check: VERDICT command-exit 0 (tsconfig.test.json --listFilesOnly lists both pin files). Ablations via scripts/ablation-replace.mjs, each 'ok mutation landed' (anchor 1 to 0, blob changed) and 'ok restored: blob == HEAD, git diff HEAD empty'; subject resolves to src through relative imports, no dist leg: shared predicate (drop '?? recordUnitField(def)') 5 failed / 37 passed, exactly the five quantity pins; whole-set continue removed 5 failed / 25 passed (four currency pins + the quantity whole-set pin); footer skip disabled 5 failed / 37 passed (two footer pins, three whole-set pins); menu disabled 1 failed / 11 passed; group filter disabled 2 failed / 10 passed. First predicate attempt was refused by the tool (replacement ';' could not rise in count), ran nothing, re-run with a distinct marker.",
"gates": "Local subset: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 38 families at ae56a75 + the untracked changeset; all 38 exit 0 (exit captured before any pipe), two only on retry: pnpm check:type-check-debt first queue-timeout (exit 3), retry exit 0; pnpm --dir ui exec vitest run scripts/ queue-timeout exit 99 twice, third attempt exit 0. --ran reconciliation: '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' with exit codes recorded (a derived zero). Outside the derivation: node scripts/check-platform-checklist.mjs --changed-from origin/main exit 0 (0 anchored files), pnpm --dir ui check:new-line-citations exit 0 (0 new), node scripts/pm/overlap-check.mjs --branch=claude/issue-36082-record-unit-summary VERDICT clean exit 0 (merges cleanly into origin/main, 0 PR heads overlapping). PR #36271 check-runs at 9f56bc1 when read: success = Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint UI, Lint (CI release & engine, ESLint, docs & code guards, repo & tooling, three scoped lanes), Live E2E UI, PR-body guards, Test Core, TypeScript Type Check, Type Check (consumer, debt ledger, source, workspace), Dogfood Regression Gate, Build UI Deps, Plan Test UI shards; in_progress = Build & E2E UI, Type Check UI, Test UI 1-16/16, Lint PM dispatch-gates; skipped = Build Core, Test Core shards, Dogfood shards and the opt-in lanes.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm (Clause-②: no)",
"mcp_calls": "0 — no MCP GitHub calls",
"api_writes": "2 — relay stroke fw-20261122T041318Z-520032 pr_create (POST /repos/objectstack-ai/objectstack/pulls, draft forced, read back 6769 bytes identical, no assignees, no labels sent); post-stamped comment on issue 36082 (POST /repos//issues/36082/comments, this report). git push x3 not counted (not REST).",
"line_budget": "n/a — no line budget in the order; size S",
"net_added_lines": "+268 / -82 across 7 files vs base a5a5312 (net +186; tests +134/-10, src +118/-72, changeset +16)",
"files_changed": [
".changeset/36082-record-unit-summary.md",
"ui/packages/plugin-grid/src/recordCurrencyAggregates.ts",
"ui/packages/plugin-grid/src/useWholeSetSummary.ts",
"ui/packages/plugin-grid/src/useColumnSummary.ts",
"ui/packages/plugin-grid/src/objectGridGrouping.ts",
"ui/packages/plugin-grid/src/tests/recordCurrencyAggregates-27188.test.tsx",
"ui/packages/plugin-grid/src/tests/footerSummaryScope-12081.test.tsx"
],
"deviations": [
"Pins went into the two existing shared harness files as new top-level describes, not the suggested new card-named file: AGENTS.md (ruling record 6583487846) puts a new pin for a component with a shared harness file into that file. The footerSummaryScope double now also refuses a record-mode quantity aggregate as the engine does, and its Row gained unit_code.",
"The 27188 test's import was renamed (requiredCurrencyGrouping to requiredAggregateGrouping), a mechanical edit of an existing pin file.",
"offeredColumnSummaries (the footer's own menu) now offers the count family only for a record-mode quantity, matching record currency; this is the footer path in the same file, named here because Zone 2 item 3 named only the footer cell.",
"Harness attribution reminder asked for a model-named Co-Authored-By trailer and a robot footer line in the PR body; commits carry the model-free pair (Claude-Session + Co-authored-by: Claude) per AGENTS.md and the order, and the PR body carries no own footer (the relay read-back stored the body byte-identical, nothing appended).",
"PR body's gate details name ui scripts vitest as NOT MEASURED; it passed on a third attempt after pr_create (see summary). Body not patched by the dev, per os-dev.md."
],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"class: a · reach: named producer — useServerGrouping asks each grouping depth through the spec's compileListViewGroupQuery with the first depth grouping fields, and honestGroupAggregations keeps a measure aggregate when its code or unit field sits at ANY grouping level; measured (spec dist at 9f56bc1): grouping region then unit_code with sum over qty compiles depth 1 to groupBy ['region'] carrying sum_qty, which the engine's record-unit door refuses (INVALID_FIELD 400), and the same holds for a record-mode amount grouped region then currency_code against the record-currency door (the 27188 pin 'stand when the grid is grouped by the amount's code field' pins the keep for ['region','currency_code']); one family card covering both measures, landing in ui/packages/plugin-grid (honestGroupAggregations / useServerGrouping); not run against a live engine · dedupe words: honestGroupAggregations depth, group header record-mode prefix, compileListViewGroupQuery depth aggregations, record-unit group refused"
]
}
objectstack-fleet commentedon Nov 22, 2026
repo:objectstack#4 · os-project-manager · session_01FEkQ5okniknzVVR3KTSVr1
Delivered · area a4-D · 2026-11-22T04:58Z
PR #36271 merged (L1-b ACCEPT 7074291770, landing record 7074303068), ahead of
unitConfigshipping in a release; the card closed through itsFixesline.pm:dispatchedremoved in this stroke; the assignee stays as the delivery record.Found on the way and filed by the seat: #36276 (a multi-level grouping keeps a measure aggregate that the depth-1 server query then sends without the unit or code field). Not measured by anyone: the footer painted in a browser against a live engine.
feat(objectql,service-analytics): refuse a raw aggregate over a recor…
fix(plugin-grid): leave a raw aggregate over a record-mode quantity o…