diff --git a/CHANGELOG.md b/CHANGELOG.md index ded2c19..0dae6ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ replacement, and each removed path, column or flag. table above it, a table whose format or cell references its own family, and, within one render and draw group, a path drawing a table another path selects a row of, or two paths pinning different rows of one table. Two cells are weighed - against each other only where they can render together: not two rows of one table, and - not rows under different rows of a table a path pinned. + against each other only where they can render together: never two rows of one table, + nor rows under different rows of a table a path pinned. - `New` refuses a root choice of templates sharing one format and one set of string fields, naming the rows TSV to write instead. - `misc.territory`, `misc.currency`, `misc.language`, `misc.httpstatus` and diff --git a/README.md b/README.md index f215461..de62a04 100644 --- a/README.md +++ b/README.md @@ -546,8 +546,8 @@ to, a chain of parents that closes, a table named like a column of any table abo it, and a cell or format of a table that references a table of its own family, through any template, a `repeat` or a `drawGroup` included, since a row rendered whole would draw the family apart from itself: read the family from a template beside it, or add -the value as a column. Which reads a render must reconcile, a cell's included, is -under [Decisions](#decisions). +the value as a column. A cell's reads are the render's too; which pairs are weighed +against each other is under [Decisions](#decisions). ### Options and fields @@ -1105,7 +1105,7 @@ the Development section below, and who ships a register the four above then draw later is additive, since a refused spelling gains a meaning and no accepted one changes, so the door stays open for the address records the plan describes. - **A table read into is pinned; a table read whole draws afresh.** A path into a - table pins its row, and the ancestor rows it links to, for the render and group, as a + table pins its row for the render and group, as a reference path pins its level, and a bare `{/city}` draws a row each time and pins no row of its family, as a bare reference does; so a bare table beside a path into its family is refused like a bare reference beside a path into it. A bare table reference diff --git a/draw.go b/draw.go index 7e7726a..daa1e61 100644 --- a/draw.go +++ b/draw.go @@ -297,14 +297,11 @@ type drawAt struct { group string route drawRoute alt rowSet - drawn *table // only that table's own cells read it, which the own-family fence is what keeps true, so the visit keys leave it out + drawn *table // left out of the visit keys: only this table's own cells compare against it, which the own-family fence keeps true } -// rowSet is the rows a walk entered, one per table: only one row of a table renders, so reads in -// two rows of one table never meet, while reads in one row, across its columns and whatever they -// reach, do. It stands in for the rows the render pins, so a row a path read pins enters with the -// ancestors (*draws).pin pins alongside it, while a table read whole is drawn a row of and pins -// none. +// rowSet stands in at load for the rows (*draws).pin holds at render: a path read enters a row with +// its ancestors, a whole read enters the drawn row alone. type rowSet []tablePin func (s rowSet) rowOf(t *table) (int, bool) { @@ -316,8 +313,8 @@ func (s rowSet) rowOf(t *table) (int, bool) { return 0, false } -// enter is s with row r of t, where t is not in it yet, and, where pins says the render pins that -// row rather than draws it, the ancestor rows it links to. The set is copied, since walks branch. +// enter is s with row r of t, and with t's ancestors where the render pins that row rather than +// drawing it; the set is copied, since walks branch. func (s rowSet) enter(t *table, r int, pins bool) rowSet { if _, in := s.rowOf(t); in { return s diff --git a/table_test.go b/table_test.go index feb939a..2f871ed 100644 --- a/table_test.go +++ b/table_test.go @@ -964,9 +964,8 @@ func TestAmbiguousNameNamesARunnablePath(t *testing.T) { } } -// TestRowSetSimulatesPinning proves the walk's row set answers what the render's pinning -// answers: a path read pins a row and the ancestors it links to, a whole read draws a row -// and pins none. +// TestRowSetSimulatesPinning holds the walk's row set to the render's pinning: drift between +// the two is data that loads and then renders a family that disagrees. func TestRowSetSimulatesPinning(t *testing.T) { f := newGenerator(t, writeFiles(t, geo()), WithSeed(1)) var tables []*table @@ -1012,10 +1011,9 @@ func TestRowSetSimulatesPinning(t *testing.T) { } } -// TestCellReadsMeetWhereTheRenderPairsTheRows pins which cells' reads are one render's to -// reconcile: a path read pins the row's ancestors, so a cell of region 01 and a cell of a -// municipality of region 12 never render together, while a whole read draws its row and pins -// no ancestor, so those same two cells do. +// TestCellReadsMeetWhereTheRenderPairsTheRows reads what the TSVs below do not show: region 01's +// note holds {/addr} and 1280's, under region 12, holds {/addr.city}, so the two meet only where +// no read pins a region. func TestCellReadsMeetWhereTheRenderPairsTheRows(t *testing.T) { cells := with(geo(), map[string]string{ "addr.json": `{"format":"{city}","city":["Lund","Malmö"]}`, diff --git a/todo.md b/todo.md index e768f7c..edebcc5 100644 --- a/todo.md +++ b/todo.md @@ -6,8 +6,8 @@ Ordered as the releases that ship it. ### Comprehension, until the panel scores 7.0 -Nothing else ships while the score is under 7.0 — no feature, no category, no data — -bar a security fix and a dependency bump, per README goal 2. This section is one +Nothing else ships while the score is under 7.0 — no feature, no category, no data — bar +what `AGENTS.md` excepts, per README goal 2. This section is one round, replayed: the `comprehension-panel` skill's nine-seat findings run at depth 1, a PR per item it names, then the run again, until the score passes. The run is the nine-seat one: the round is meant to buy architectural change, and the four-seat @@ -165,12 +165,13 @@ by a `data-import/` script, as README goal 12 asks. error names the category and the two columns but no row, so the author greps a register-sized file for the cell — and "name the fields you want instead" rewrites a cell that is not the one to fix. -- Stop the family fence naming a rewrite that cannot work: where the drawn table's rows - select more than one row of the family, every `write {/terr[NO].name}` it offers fails - the same way, and only the `drawGroup` it also names is left. -- Spell a table one way in an error: `family.go` names `drawn.category` in one message and - `t.path` in the next, so one table is `territory` and `misc.territory`, and the short - spelling names no file where two folders hold that name. +- Have the family fence offer only a rewrite that works: where the drawn table's rows select + more than one row of the family, every `write {/terr[NO].name}` it offers fails the same + way, so only the `drawGroup` it also names is left. +- Spell a table one way across `family.go`'s errors: `checkFamilyPair` names + `drawn.category`, `pinRow` names `t.path` and `mustRow` panics with `t.category`, so one + table is `territory` and `misc.territory`, and the short spelling names no file where two + folders hold that name. - Name a spelling that works when a row selector misses: `misc.protocol[tcp]`, `misc.httpmethod[get]` and `misc.territory[se]` all answer "no row … has key or name" and stop there, where a case-insensitive match could name the row that exists, and a @@ -186,9 +187,10 @@ by a `data-import/` script, as README goal 12 asks. ### Open questions to settle -- Decide whether a goal 5 violation joins the comprehension gate's exception list, beside - a security fix and a dependency bump: the panic above waits behind the whole round at - 5.9, and `{/geo.SE.locality}|{/geo.SE.municipality}` mispairs the shipped data meanwhile. +- 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 + repair restoring behaviour the repo already claims may already pass the gate as written. - Decide whether the README's Audience names the author who writes categories under `--data-path`: the four personas listed consume the shipped set and the contributor ships a register upstream, while "Your own data" is a README section, `-d` is a