Skip to content

[P0] Add native cross-object rollup/summary capability (parent aggregates of child rows) #1868

Description

@xuyushun441-sys

Problem

There is no first-class way to maintain a parent aggregate of child rows. Hooks can't (nested write crashes the sandbox — see the hook-sandbox issue), and a flow's aggregation script node is a runtime no-op (see the action-node issue).

Impact

Every "total / rollup / progress" field across templates is hand-maintained in seed data and drifts the moment a user adds a real child row:

  • content_publication.total_views/clicks/signups/revenue (+ piece rollups)
  • procurement_order.received_amount (3-way match)
  • pm_project.progress_percent, actual_cost
  • expense_report.total_amount

Expected

A native summary/rollup field type — declare { object, field, op: sum|count|max, filter? } and the platform keeps it current — or a flow aggregate node that actually executes server-side. (The expense CHARTER already anticipates "once the runtime computes the summary field type".)

Affected

@objectstack/objectql (field types) and/or @objectstack/automation (aggregate node).


Found while runtime-testing objectstack-ai/templates (all 9 templates via objectstack dev all) on @objectstack 9.5.1. Build + typecheck pass; these only surface at runtime.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions