Skip to content

spec: a cross-model parent roll-up may declare capacity and balance - #92

Open
delchev wants to merge 1 commit into
mainfrom
rollup-cross-model-capacity
Open

delchev wants to merge 1 commit into
mainfrom
rollup-cross-model-capacity

Conversation

@delchev

@delchev delchev commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Reference implementation: eclipse-dirigible/dirigible#7416 (issue eclipse-dirigible/dirigible#7410).

versions/1.2.md currently states that capacity / balance / status remain local-only on a cross-model parent. Two of those three are arithmetic on the parent's own numeric columns - the capacity is read, the balance is written alongside the sum - and the overdraw check they install belongs to the child, which is local on that direction. Keeping them out means both sides of an n:m allocation can never be guarded: the module that owns the link rows guards the parent it owns and is forced into hand-written code for the other, which is how a payment of 100 gets applied 100 twice.

The amended normative paragraph:

  • field, capacity and balance are all validated against the owner's model at generation time;
  • a cross-model balance with no capacity MUST be refused (the balance is defined as capacity - sum, so alone it names a column nothing fills);
  • the capacity MUST be enforced on the child's own write path with the same refusal a same-model roll-up emits;
  • status remains local-only - it moves the parent through the owner's own status values.

Site PR: IntentFile/intentfile.github.io#(see companion).

Both are arithmetic on the parent's own numeric columns, and the overdraw check
they install belongs to the child, which is local on that direction - so both
sides of an n:m allocation can be guarded from the module that owns the link
rows. `status` remains local-only, and a `balance` with no `capacity` is refused.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant