From 98b25177e72edc7eef07c818970d79ccb7bec441 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 27 Sep 2026 15:02:46 +0200 Subject: [PATCH] Name goal 4's check and the rewrite the refusal offers, scope the render-draw decision to unselected paths, and state the step-up clash --- README.md | 13 +++++++------ docs/decisions.md | 25 +++++++++++++++---------- todo.md | 25 +++++++++++++++---------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index cdf4b8d..a1d80a6 100644 --- a/README.md +++ b/README.md @@ -823,12 +823,13 @@ the Development section below, and who ships a register the four above then draw 3. **Valid by construction** — every value passes the check its real consumer applies; facts that belong together come from one draw, within a value and across categories. -4. **Templates are intuitive, and text means what it says** — a template does what - its writer expects on first reading. A format renders as written; only `{…}` - varies, random characters included (`{digits(3)}`), and a selected row, `[SE]`, - is that row wherever it is written. Where a reader could expect two outputs, the - template is a load error naming a spelling for each. One spelling per result; the - wrong one is a load error naming the right one. +4. **Templates are intuitive, and text means what it says** — a template renders what + every writer reading it would expect, judged by simulated writers from the Audience. + A format renders as written; only `{…}` varies, random characters included + (`{digits(3)}`), and a selected row, `[SE]`, is that row wherever it is written. + Where two writers could expect different outputs, the template is a load error + naming a spelling for each. One spelling per result; the wrong one is a load error + naming the right one. 5. **Every mistake is a load error** — `New` rejects the data and `NewTemplate` the inline template; on a loaded generator `Fake` fails only for an unknown path, `FakeStruct` only for a non-struct argument or a type its tags do not diff --git a/docs/decisions.md b/docs/decisions.md index 79f24fa..b67e5dd 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -217,7 +217,8 @@ handle is needed, as the cache already compiles once. ## A render shares one reference draw per category, per group -Every reference path into a category in one `Fake`, or one record, reads one draw of it, +Every reference path into a category that selects no row, in one `Fake` or one record, +reads one draw of it, so a value's facts agree across its fields, nested templates and columns alike — `{/currency.code}` in one field and `{/currency.symbol}` in another name one currency, whichever view renders them. A `repeat` iteration is a render of its own, since @@ -361,17 +362,21 @@ accepted one changes, so the door stays open for the address records the plan de ## A selected row is fixed, not drawn, and an unnamed read beside it is refused -Decided 2026-09-27 by the maintainer, for goal 4; valid while a selector names exactly one row. +Decided 2026-09-27 by the maintainer, for goals 3 and 4; valid while a selector names +exactly one row. - Selected rows never conflict: `{/misc.territory[SE].capital} / {/misc.territory[FI].capital}` - renders `Stockholm / Helsinki`, and so may two items of one choice. -- What a path draws beneath a selected row is one draw per selection, shared by every - path through it: `{/geo.SE.region[12].locality.name}` twice names one locality. -- A read naming no row of a table whose family a selection in the render and group - names is refused, naming the selected path and a `drawGroup`: beside - `{/misc.territory[SE].capital}`, a writer reading `{/misc.territory.currency}` expects - `SEK`, and `Stockholm pays in EUR` would pass review. It stays refused beside two - selections, since adding `[FI]` to that template would otherwise make it load. + renders `Stockholm / Helsinki`, and two items of one choice may select different rows. +- What a path draws beneath a selected row is one draw per selection, per render and + group, shared by every path through it: `{/geo.SE.municipality[1281].locality.name}` + twice names one locality. `[1281]` and `[Lund]` select one row, so they are one + selection. +- A read whose path selects no row is refused beside a selection in its family, in the + same render and group, naming the rewrite through each selection and a `drawGroup`: + beside `{/misc.territory[SE].capital}`, a writer reading `{/misc.territory.currency}` + expects `SEK`, so the error names `{/misc.territory[SE].currency}`, since + `Stockholm pays in EUR` would pass review. A second selection does not make the + unnamed read load. Checked against three simulated template writers from the Audience, who agreed on each case but the last, where two expected a render and all three accepted the refusal. diff --git a/todo.md b/todo.md index 9f8553b..0e2b51d 100644 --- a/todo.md +++ b/todo.md @@ -48,8 +48,9 @@ This round, in order: path `Fake` accepts, which a selector is too. Delete the dead `table.descends` and the redundant `string(key)` in `checkNoRepeatedItem`. - Delete the decision "The rows of a table are alternatives": it defines `alternatives`, - which its comment in `family.go` already does, and the README's "which pairs are - weighed against each other" sends a reader to the log for that definition. + which its comment in `family.go` already does. Point the README's "which pairs are + weighed against each other" at that comment's rule, stated in the README's Table + section, where it sends a reader to the log for the definition today. - Run the nine-seat panel again and file what it names here. ### Data @@ -174,10 +175,11 @@ by a `data-import/` script, as README goal 12 asks. - Render selected rows as the decision "A selected row is fixed, not drawn, and an unnamed read beside it is refused" states: `New` refuses `{/misc.territory[SE].capital} / {/misc.territory[FI].capital}` today, and a choice - whose items select different rows. Have the refusal of an unnamed read name a - selected path that loads: beside `{/geo.SE.locality[Lund].name}`, - `{/geo.SE.municipality.name}` names none today, and the one that holds selects from - the top, `{/geo.SE.municipality[Lund].name}`. + whose items select different rows. Have the refusal of an unnamed read name the + rewrite through each selection, selecting an ancestor of the selected row by key: + beside `{/geo.SE.locality[Lund].name}`, `{/geo.SE.municipality.name}` names none + today, where `{/geo.SE.municipality[1281].name}` holds. Scope the README's "A reference + path into a category is held" to a path that selects no row. - Report the same error every load for a table with two bad options, and for a folder with two unnamed rows files: `readTableOptions` and `loadDir` return on the first in Go's map order. @@ -218,10 +220,13 @@ by a `data-import/` script, as README goal 12 asks. ### Open questions to settle -- Decide whether a path steps from a row up to its parent, so - `{/geo.SE.locality[Lund].municipality.name}` reads Lund's municipality: three simulated - template writers all expected it to, per goal 4, and today it fails with "municipality - is a column, and a cell holds no fields". Adding it only accepts a refused spelling. +- Decide how a path steps from a row up to its parent row: three simulated template + writers expected `{/geo.SE.locality[Lund].municipality.name}` to read Lund's + municipality, which goal 4 asks for, but `.municipality` after a row is already the + link column's cell, `city[Oslo].country` rendering `NO`. So either the name means the + cell where it ends a path and the parent row where a segment follows, which the + decisions "One name, one meaning" and "`parent` names the link column and the table + alike" have to allow, or the step up takes a spelling of its own. - Decide whether a goal 5 violation joins the comprehension gate's exception list: the `{/sel}|{/sel}` panic waits behind the whole round at 5.9, and `{/geo.SE.locality}|{/geo.SE.municipality}` mispairs the shipped data meanwhile, though a