From a3840edbb4949d83be54859956290dd2b052d01c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 20:07:31 +0000 Subject: [PATCH 1/2] docs(skills): seeds.md says a seeded roll-up value is never stored The seed loader drops a value written for a summary field before the write and warns once per dataset; the child rows compute the roll-up. The reference and its eval case still taught the stored-as-written model. Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude --- .changeset/36122-seeds-rollup-never-stored.md | 10 ++++++++++ .../evals/hooks-security-seeds-datasources.json | 2 +- skills/objectstack-data/references/seeds.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .changeset/36122-seeds-rollup-never-stored.md diff --git a/.changeset/36122-seeds-rollup-never-stored.md b/.changeset/36122-seeds-rollup-never-stored.md new file mode 100644 index 00000000000..48651d5942a --- /dev/null +++ b/.changeset/36122-seeds-rollup-never-stored.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(skills): the data skill's seeds reference says a seeded roll-up value is never stored, not stored as written + +Clause-②: no +Metadata-protocol: none + +objectstack-data's `references/seeds.md` kept the rule "never seed the roll-up" but gave a reason that stopped being true: it said a seeded `amount_paid` is stored as written and a cap on payments then refuses the payments it counts. The seed loader takes a value written for a `summary` field out of the record before the write, logs one warning per dataset naming the fields, and the child rows compute the roll-up. The sentence now says that. The record-order point stays: a rule reading a parent roll-up sees the total earlier rows left. The matching eval case in `evals/hooks-security-seeds-datasources.json` expects the same model. Text only; the sentence pays for its new wording in its own bytes. diff --git a/skills/objectstack-data/evals/hooks-security-seeds-datasources.json b/skills/objectstack-data/evals/hooks-security-seeds-datasources.json index a485c76ba62..467f6ca1b72 100644 --- a/skills/objectstack-data/evals/hooks-security-seeds-datasources.json +++ b/skills/objectstack-data/evals/hooks-security-seeds-datasources.json @@ -334,7 +334,7 @@ { "id": 32, "prompt": "`payment` has a validation rule that refuses a payment above the invoice's open balance (`record.amount > record.invoice.amount - record.invoice.amount_paid`); `invoice.amount_paid` is a `sum` roll-up of its payments. Seed demo data: invoice `INV-1` for 4800, fully paid in two payments, and `INV-2` for 5000 with 2000 paid.", - "expected_output": "Two `defineSeed` sets. The invoice rows carry `number` and `amount` and no roll-up value: a seed write stores a supplied `amount_paid` as written, the rule then reads a balance already spent, and both payments on the fully paid `INV-1` are refused (the 2000 on `INV-2` still fits its 3000 open balance). The payments name their invoice by natural key (`invoice: 'INV-1'`) and each fits what the rows before it left: two that sum to 4800 on `INV-1`, one of 2000 on `INV-2`; the roll-up then computes the paid totals. Does not say seed rows skip validation rules (only `state_machine` is skipped) and does not weaken the rule to make the seed load; `os verify` fails on a dropped seed row.", + "expected_output": "Two `defineSeed` sets. The invoice rows carry `number` and `amount` and no roll-up value: the seed loader never stores a supplied `amount_paid` (it leaves the value out of the write and logs one warning per dataset naming the fields), so the rows state nothing the payments do not compute. The payments name their invoice by natural key (`invoice: 'INV-1'`) and each fits what the rows before it left: two that sum to 4800 on `INV-1`, one of 2000 on `INV-2`; the roll-up then computes the paid totals. Does not say a seeded `amount_paid` is stored or makes the rule refuse the payments. Does not say seed rows skip validation rules (only `state_machine` is skipped) and does not weaken the rule to make the seed load; `os verify` fails on a dropped seed row.", "files": [], "assertions": { "must_contain": [ diff --git a/skills/objectstack-data/references/seeds.md b/skills/objectstack-data/references/seeds.md index 3b1bffdba93..e9fc0e348f5 100644 --- a/skills/objectstack-data/references/seeds.md +++ b/skills/objectstack-data/references/seeds.md @@ -144,7 +144,7 @@ refused row never lands. `os validate` does not run them on seed rows; `os verify` fails on each dropped row. A rule reading a parent roll-up (`record.invoice.amount_paid`) sees the total earlier rows left, so children must fit in record order. ⛔ Never seed the roll-up: a seeded `amount_paid` is -stored as written, and a cap on payments refuses those it counts. +never stored (one warning per dataset); the child rows compute it. ### Dynamic values (CEL) From a2b90f7fb082b83e0366a6220d17a83abcb9f9df Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 00:18:19 +0000 Subject: [PATCH 2/2] docs(skills): trim the seeds.md sentence so it pays for itself in bytes Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude --- skills/objectstack-data/references/seeds.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/objectstack-data/references/seeds.md b/skills/objectstack-data/references/seeds.md index e9fc0e348f5..5c16a9b4f6d 100644 --- a/skills/objectstack-data/references/seeds.md +++ b/skills/objectstack-data/references/seeds.md @@ -144,7 +144,7 @@ refused row never lands. `os validate` does not run them on seed rows; `os verify` fails on each dropped row. A rule reading a parent roll-up (`record.invoice.amount_paid`) sees the total earlier rows left, so children must fit in record order. ⛔ Never seed the roll-up: a seeded `amount_paid` is -never stored (one warning per dataset); the child rows compute it. +never stored (a warning per dataset); the child rows compute it. ### Dynamic values (CEL)