From a6d96233831f10a67198dfa46ad8c2d6f0769520 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 10 Oct 2026 11:10:13 +0200 Subject: [PATCH] Record the paired ruling at d34cc42, move jsonKind's comment onto Kind, name the manifest in Layout, and note the normalised manifest in item 185 --- README.md | 4 ++-- docs/comprehension-history.md | 22 ++++++++++++++++++++++ internal/jsonvalue/jsonvalue.go | 3 ++- node.go | 2 -- todo.md | 2 +- 5 files changed, 27 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f5fe925..d7bb700 100644 --- a/README.md +++ b/README.md @@ -1022,12 +1022,12 @@ valueproof.go the value proof: what a typed column, calc operand or struct fie data.go the load path: the categories internal/datafiles hands over, compiled into one merged tree, and the load pipeline every entry point runs cmd/fejkdata/ the fejkdata CLI internal/builtinfunc/ the {name()} functions: their checks and draws, checksums, date and time layouts, transforms and calc arithmetic -internal/datafiles/ the walk of a data tree: its folders, its category files and the rows files beside them +internal/datafiles/ the walk of a data tree: its folders, its category files and the rows files beside them, and its manifest internal/datatype/ the datatype a record column holds; the root's DataType is an alias of it internal/drawstate/ the seeded randomness and the {seq()} counters a generator draws through internal/grammar/ how the template language is written: format tokens, paths and selectors, reference sigils, identifiers, calc syntax, and whether a string is a template or a path internal/invariant/ the one phrase every package panics with when an invariant breaks -internal/jsonvalue/ a decoded JSON value, its numbers kept as written, the one input a template compiles from +internal/jsonvalue/ a decoded JSON value, its numbers kept as written, the one input a template compiles from, and the kind an error names it by internal/proven/ what a proof knows of a value, and the bounds a calc takes from its operands internal/rows/ a table's rows: the TSV, the options proved over it, the links between tables, row selection and draws, and the pin set one path or one named pick fixes data/ shipped data (JSON, and a TSV per table), embedded at build: locale folders, geo, misc diff --git a/docs/comprehension-history.md b/docs/comprehension-history.md index 5920501..4fd6bbd 100644 --- a/docs/comprehension-history.md +++ b/docs/comprehension-history.md @@ -249,3 +249,25 @@ Inherited architect, decided by: - Locality, Shape: `data.go:62` `standing`: a `map[string]any` of nodes and entries compared by identity - Shape: `index.go:1` `index.go`: fifteen units under generic names in a file named for the index, `ErrLoad` among them - Shape: `internal/datafiles/datafiles.go:103` `decodeManifest`: a strict JSON decoder shares the tree walker's file with no seam + +## 2026-10-10T09:09:41Z, PR #202 at d34cc42, against 2652779 + +Ruling: better + +| Seat | Navigation | Locality | Shape | Self-sufficiency | Overall | +|---|---|---|---|---|---| +| Mid A | same | better | better | same | better | +| Inherited architect | same | better | same | same | better | + +Mid A, decided by: + +- Locality, Overall: `data.go:12` `loadSources`: one path, each source indexed or walked then one `loadReached`, where `config.load` switched between a lazy and an eager mode +- Locality: `index.go:107` `loadReached`: a failed load puts back what it loaded and returns an error, where `loadShipped` panicked partway through +- Locality, Shape: `node.go:31` `folder.put`: two methods keep a name in `children` or `unloaded`, never both +- Shape: `index.go:29` `categoryAt`: `shipped.go` is only the embed, and `categorySite` embeds `categoryAt` in place of a duplicated `unloadedCategory` + +Inherited architect, decided by: + +- Locality: `data.go:12` `loadSources`: one load path, where `config.load` hid a mode switch between lazy and eager loading +- Locality: `index.go:107` `loadReached`: returns a load error, and names a manifest entry drifted from its table, where `loadShipped` panicked on a hand-regenerated Go file +- Locality: `node.go:23` `folder`: the children-or-unloaded rule stated once and kept by two methods diff --git a/internal/jsonvalue/jsonvalue.go b/internal/jsonvalue/jsonvalue.go index 17ba339..d39cc2a 100644 --- a/internal/jsonvalue/jsonvalue.go +++ b/internal/jsonvalue/jsonvalue.go @@ -39,7 +39,8 @@ func Object(fields map[string]Value) Value { // bool or nil. func (v Value) Any() any { return v.v } -// Kind names the kind of a value as Any gives it, such as "a number" or "a list". +// Kind names the kind of a value as Any gives it, in the data format's own terms, such as +// "a number" or "a list". func Kind(v any) string { switch v.(type) { case json.Number: diff --git a/node.go b/node.go index dc9eeda..5e23f5d 100644 --- a/node.go +++ b/node.go @@ -191,8 +191,6 @@ func typedOrText(text string, ds ...DataType) error { return fmt.Errorf(`%s in a record column fits no datatype; write %q for text`, text, text) } -// jsonKind names the kind of a JSON value an option cannot take, in the data format's own -// terms rather than the decoding library's. func compileString(s string) (*template, error) { toks, unbound, err := parseChecked(s, nil) if err != nil { diff --git a/todo.md b/todo.md index 4625112..5715054 100644 --- a/todo.md +++ b/todo.md @@ -192,7 +192,7 @@ Carries out the decision "The shipped data is Go packages a library imports by c ### 185. Seat a panel of the README's audience personas to pull data in through the module API and build a custom CLI, and fix what it names. -Needs item 184; 0.1.0 is not cut before it. Carries out the decision "The shipped data is Go packages a library imports by choice, and the CLI carries every one, from 0.1.0". Seats: the Go test author, the bulk fixture author, a custom CLI's builder, and a data author with a `-d` folder and the replace flag, each in a scratch Go module against the checkout or a pre-release tag. Bench the geo packages' names, `data.Modules()`, the error naming the import set, and the `.fejkdata.json` manifest a data author writes by hand. Record the ruling in `docs/`. +Needs item 184; 0.1.0 is not cut before it. Carries out the decision "The shipped data is Go packages a library imports by choice, and the CLI carries every one, from 0.1.0". Seats: the Go test author, the bulk fixture author, a custom CLI's builder, and a data author with a `-d` folder and the replace flag, each in a scratch Go module against the checkout or a pre-release tag. Bench the geo packages' names, `data.Modules()`, the error naming the import set, and the `.fejkdata.json` manifest a data author writes by hand. An entry lists every path below its category, its linked tables' too, so `geo.*.region` repeats its whole family; an entry holding only its own paths, `List` composing a family from the entries naming it as `parent`, would shrink the manifest that decoding makes most of `New`'s cost (about 0.55 ms and 2449 allocations on 2026-10-10). Record the ruling in `docs/`. ### 16. Add locale categories: company, phone, finance, vehicle, words.