Scope the step up to drawn rows too, name the format rewrite and what Fake, List and records do, and leave the second-spelling question open

This commit is contained in:
2026-09-27 16:44:41 +02:00
committed by Lillem4n
parent f8e9d9a280
commit 4ec20e6e3a
3 changed files with 25 additions and 16 deletions
+5 -6
View File
@@ -823,17 +823,16 @@ 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, and every
path in it, 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
4. **Templates are intuitive, and text means what it says** — a template or a path,
and every path in 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
the inline template; on a loaded generator `Fake` fails only for a path that
names nothing or could name two things, `FakeStruct` only for a non-struct argument or a type its tags do not
describe, with the same error every call, and `Template.Fake` cannot fail at all.
6. **Zero to a value in one command** — `go install`, then `fejkdata sv_SE.person`:
no checkout, no flag. Flags are GNU-form (`--seed 42`, `-n 3`) in any position;
+12 -8
View File
@@ -383,16 +383,20 @@ case but the last, where two expected a render and all three accepted the refusa
## A link column after a row steps up to the parent row, and a path may not end on it
Decided 2026-09-27 by the maintainer, for goal 4; valid while a link column holds the
parent's key.
parent's key. It extends [After a row, a path names a column or a linked
table](#after-a-row-a-path-names-a-column-or-a-linked-table) from child tables to the
parent. A row is selected or drawn alike.
- Where a segment follows, the link column's name reads the parent row, one level per
step, chained: `city[Oslo].country.name` renders `Norway`, and
`geo.SE.locality[Lund].municipality.region.name` Lund's region.
- A path ending on it is refused, naming the parent's key column and the columns its
format reads: `city[Oslo].country` could be `NO` or `Norway`, so the error names
`city[Oslo].country.alpha2` and `city[Oslo].country.name`.
- A route through another row is not a second spelling of a selection:
`city[Oslo].country.name` and `country[NO].name` both load, as `[1281]` and `[Lund]` do.
step, chained: `city[Oslo].country.name` renders `Norway`, `locality.municipality.name`
the drawn locality's municipality, and `geo.SE.locality[Lund].municipality.region.name`
Lund's region. The parent row of a selected row is fixed as the selection is, so
`city[Oslo].country.city.name` draws a city of Norway, which may not be Oslo.
- A path ending on it is refused at `New`, `NewTemplate` and `Fake` alike, naming the
parent's key column and the parent's format spelled as paths: with a `country` format
of `{name} ({alpha2})`, `city[Oslo].country` names `city[Oslo].country.alpha2` and
`{/city[Oslo].country.name} ({/city[Oslo].country.alpha2})`. `List` leaves such a path
out, and a record's link column still holds the key, since it is a column, not a path.
Checked against three simulated template writers from the Audience: all three read the
parent row where a segment followed, and they split between the code and the name where
+8 -2
View File
@@ -174,8 +174,10 @@ by a `data-import/` script, as README goal 12 asks.
- Step up from a row to its parent as the decision "A link column after a row steps up
to the parent row, and a path may not end on it" states: `city[Oslo].country.name` is
a load error today, and `city[Oslo].country` renders the cell `NO`. Correct the
README's `city[Oslo].country` example to match.
a load error today, and `city[Oslo].country` renders the cell `NO`, as
`locality.municipality` does, which `List` advertises. Replace the README's
`city[Oslo].country` example with `fejkdata -d ./mydata 'city[Oslo].country.name'`,
rendering `Norway`.
- 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
@@ -225,6 +227,10 @@ by a `data-import/` script, as README goal 12 asks.
### Open questions to settle
- Decide whether a route through another row is a second spelling of one result:
`city[Oslo].country.name` and `country[NO].name` always render `Norway`, and goal 4
refuses a second spelling, while `country[NO]` and `country[Norway]` both select one
row today.
- 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