Move deferred and out-of-scope items to todo.md
Tests / vet + fmt + tests (pull_request) Successful in 1m38s

This commit is contained in:
2026-09-05 15:29:37 +02:00
parent f75a9be5b4
commit b223fcd717
2 changed files with 2 additions and 28 deletions
-15
View File
@@ -8,18 +8,3 @@
- A standing choice a reader would relitigate goes under Decisions in the README, not in a comment. - A standing choice a reader would relitigate goes under Decisions in the README, not in a comment.
- A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one. - A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one.
- Cyclomatic complexity is gated at 14: the table-shaped dispatches (`eachToken`, `calc.factor`, `walkPath`) sit at 1314 and stay whole; anything else that reaches 14 is decomposed. - Cyclomatic complexity is gated at 14: the table-shaped dispatches (`eachToken`, `calc.factor`, `walkPath`) sit at 1314 and stay whole; anything else that reaches 14 is decomposed.
# Deferred
- **A record cannot ask for an independent reference draw (2026-09-04).** Within
one record every tailed reference to a category is one draw, and a bare
`{/cat}` renders the whole category, so a column wanting its own draw of
`{/cat.field}` has no spelling for it. Left until a use case names which columns
should disagree; premise: a record is one coherent row, which is what columns
are for. Not raised in review before that.
- **Shipped-data de-duplication (2026-09-02).** `email.json`'s `local` is a
drifted copy of `username.json`, and no shipped file yet uses a held path, an
operand or a reference. Fixed in the data fill before the first tag, when the
shipped set is rewritten anyway; premise: nothing depends on the shipped data's
shape until then. Not raised in review before that.
+2 -13
View File
@@ -82,8 +82,8 @@ For structured output a record writes the row for you.
A record is a template seen as columns: its fields are the columns, its `format` A record is a template seen as columns: its fields are the columns, its `format`
the whole. `--format json|ndjson|csv|sql` writes the records; the library's the whole. `--format json|ndjson|csv|sql` writes the records; the library's
`Record` (below) hands back the columns. Every column is a string — this is the `Record` (below) hands back the columns. Every column is a string — typed scalars
out-of-scope of typed scalars, see [Decisions](#decisions). Save are on the release checklist, see [`todo.md`](todo.md). Save
`mydata/users.json`: `mydata/users.json`:
```json ```json
@@ -532,12 +532,6 @@ tokens add cost in proportion to the output.
field `Fake` renders by dotted path. The `format` is inert to a record — a field `Fake` renders by dotted path. The `format` is inert to a record — a
record-only template writes `"format": ""` — but it is compiled and fenced, so record-only template writes `"format": ""` — but it is compiled and fenced, so
a template that loads renders as whichever shape is asked for. a template that loads renders as whichever shape is asked for.
- **Records emit text; typed scalars are out.** Every value fejkdata yields is a
string, so JSON, CSV and SQL each quote a column as text (`"42"`, `'42'`) rather
than guess a number or a boolean. Emitting unquoted numbers or booleans would
need a per-column `kind`, a parallel scalar system in a format whose promise is
"text means what it says". A column's check digit, number or id is still
valid-by-construction through a builtin; it is serialized as text.
- **A record shares one reference draw per category.** Two columns that reference - **A record shares one reference draw per category.** Two columns that reference
one category — `{/currency.code}` beside `{/currency.symbol}` — read one draw of one category — `{/currency.code}` beside `{/currency.symbol}` — read one draw of
it, so a record's facts agree the way a template's [correlated it, so a record's facts agree the way a template's [correlated
@@ -563,11 +557,6 @@ tokens add cost in proportion to the output.
row — would vary per draw. A fixed column set is what the CSV and `INSERT` row — would vary per draw. A fixed column set is what the CSV and `INSERT`
contracts rest on, so the restriction holds even where a particular choice would contracts rest on, so the restriction holds even where a particular choice would
happen to agree. happen to agree.
- **Filling a Go struct is out of scope.** `Record.Columns()` returns the columns a
caller maps onto a struct themselves, casting each string to the field's type.
gofakeit's `fake:"{firstname}"` tags reflect over an arbitrary struct type and
cast into its fields — a different concern from "data lives in JSON", and one
whose typed casting fejkdata leaves to the caller rather than owning.
- **The performance gate asserts allocations, not wall-clock time.** `AllocsPerRun` - **The performance gate asserts allocations, not wall-clock time.** `AllocsPerRun`
is deterministic across machines, so a ±10% ceiling does not flake under CI load, is deterministic across machines, so a ±10% ceiling does not flake under CI load,
while time varies with the machine and its neighbours. A rendering slowdown while time varies with the machine and its neighbours. A rendering slowdown