Skip to content

Latest commit

 

History

History
1644 lines (1278 loc) · 102 KB

DECISIONS.md

File metadata and controls

1644 lines (1278 loc) · 102 KB

Decisions

A log of non-obvious design choices for .table/ and the reasoning behind them. Every entry is a settled call; pivots get a new entry, not edits to an old one.

D1: System id is separate from primaryKey

Every row has an id (nanoid) that is system-level — minted by the writer, never edited by the user. primaryKey (if present) is a separate domain-level uniqueness constraint over user-facing fields.

Why: cross-table relations need a stable target that doesn't break when users rename their domain key. id provides that; primaryKey is purely about user-facing uniqueness validation.

D2: NDJSON ends with a trailing newline

rows.ndjson ends with \n (POSIX-correct).

Why: makes wc -l accurate, ensures the last line is well-formed on append, plays nicely with line-oriented Unix tools.

D3: Cross-table relations reference table by name, not path

"relation": { "table": "projects", "field": "id" }

Why: path-based references break when the workspace is reshuffled (folder rename, restructure). Name-based resolution is the app's problem (scan workspace, walk parent dir) but the format itself stays self-contained and rename-resilient.

D4: views.json is for shared views only

Personal/per-user view state (last opened, scroll position, focused row) lives in app-local storage outside the .table/ directory.

Why: .table/ is meant to round-trip cleanly through git and between users. Personal state would create noisy diffs and would be meaningless to other users. A future views/ directory convention could be added non-breakingly if needed.

D5: Enum sort/group order follows declaration

When a field has an enum constraint, its values sort and group by the enum's declared order, not alphabetical order.

Why: enums encode semantic order (todo → doing → done). Alphabetical defeats the purpose. Reordering enum values is therefore a behaviour change and SHOULD bump schema-version.

D6: SQLite cache is optional and rebuildable

index.sqlite is a performance layer only. Readers fall back to scanning rows.ndjson when the cache is absent or stale. Apps decide their own caching strategy.

Why: keeps the format self-contained as plain text; lets apps opt into the performance tier they need. Removes the spec burden of prescribing cache freshness rules beyond the fallback contract.

D7: Attachments — row stores filename only

Field declared attachment: true; row holds the bare filename; reader resolves under attachments/. Recommended write convention to avoid collisions: {nanoid}-{original-name}.ext.

Why: the filename in the row is human-readable and grep-friendly. Path resolution is centralised in one place (attachments/) so moves/renames of the table don't cascade through every row.

D8: Format extension is .table

Final.

Why: .table is unclaimed in practice (SQL keywords and HTML elements aren't file extensions), reads correctly in conversation ("send me your suppliers.table"), and follows the same naming pattern as Airtable / Google Tables / Notion — category-format named after the most recognisable presentation, even when the format supports many other layouts (board, gallery, list, calendar).

D9: Frictionless framing dropped

The format is not a "Frictionless Table Schema superset." It owns its own schema vocabulary. Field type names (string, integer, enum, etc.) follow conventions used across text-first data formats generally — they're the right names for these things, not a compatibility claim with any specific format.

Why: the original spec claimed Frictionless alignment, but .table/'s extensions (per-field relations, views, attachments, schema versioning, deprecation) carry the format's actual value; Frictionless contributes only field-type names. Calling it a "superset" was dressing on a different format. Frictionless tooling lives in data-publishing communities; the target user (information worker) has not heard of it. The interop benefit didn't accrue to the actual user.

Frictionless / CSVW / Obsidian Bases conversion now belongs in optional downstream packages, not the core spec.

D10: Per-field relation is the only relation primitive

foreignKeys (the Frictionless-style table-level constraint) is not carried. Cross-table links are field-typed via the relation annotation.

Why: Airtable-style relations are field-typed, not table-level. The original spec carried both "for interop", but the duplication was sunk cost — nobody was cashing in on the Frictionless side, and maintaining two relation primitives for the same concept added mental load.

D11: Manifest fields in meta.json

Every write stamps format: "table" and formatVersion: 1 onto meta.json. Readers MAY use them to validate that a directory is a .table/.

Why: a directory called projects.table/ should self-identify. Without a manifest field, a reader has only the extension as a signal, which is filesystem-level and unreliable for tooling that operates on pipes/streams.

D12: Long-form bodies live in bodies/{id}.md

Named bodies/{title}--{id}.md since D64.

Optional. Each body is a standalone markdown file named by the row's stable system id. The Notion every-row-is-also-a-page pattern, made line-diffable.

For shorter inline markdown content (a description, a one-paragraph summary), use a string field with format: "markdown" instead.

Why: NDJSON's one-line-per-row promise breaks down for long-form content — a 500-line markdown body becomes a giant single line in rows.ndjson with \n-escaped newlines, and git diff shows the whole row as changed when a single paragraph edits. Splitting bodies into per-row files preserves line-diffable history for prose while keeping rows.ndjson tight and scannable. Each body is also independently readable as a standalone .md file (cat bodies/p1.md returns clean markdown).

D13: Spike workflow

Default branch is develop. Work lands via PR from feature branches. Open spec questions get filed as GitHub issues so they're discoverable.

Why: PR-driven workflow gives the spike a clean review surface and makes the rationale for each change auditable in the commit log. Topic-branch naming follows the standard feat/<slug> / fix/<slug> / docs/<slug> / chore/<slug> convention.

D14: Data versioning is the consuming app's concern (parked)

The format does not specify a data-versioning model — no per-row history, no edit log, no concurrency/conflict semantics, no audit trail format. The spec covers two distinct version axes only:

  • formatVersion in meta.json — versions the spec itself (currently 1).
  • schema-version in schema.json — versions the user's data schema (bumps on structural change: field added/deprecated, enum reordered, constraints tightened).

Everything else — undo/redo, "what did this cell look like yesterday," real-time collaboration, audit logs — is left to the consuming app.

Why: every NDJSON-row design choice in .table/ (line-diffable rows, per-row bodies in separate files, attachments by filename, append-friendly ordering) exists so git is the version-control substrate. For any consumer that uses git, the format gets full history, branching, merging, diffing, and authorship for free. Specifying a parallel in-format versioning system would reinvent what git already does well and would bias the format toward one app's UX needs over others.

Where each app-level need belongs:

Need Owner How
Undo/redo within an editing session App In-memory stack of inverse edits
Async collaboration (two users, different times) Git Line-diffable rows merge cleanly
Real-time collaboration (two users, same moment) App CRDTs / OT — separate research area
"What did this row look like yesterday?" App or git git log / git blame for git-backed; app-side log otherwise
Audit / compliance trail App Append-only event log; see reserved extension below
Schema migration tracking Format schema-version bumps on structural change

Reserved extension: history.ndjson

Not yet specified, not yet implemented. Reserved for if/when a consuming app needs a portable, in-format edit log. Likely shape when it lands: an optional history.ndjson at the directory root, one event per line:

{"id":"e_xyz","at":"2026-04-28T15:00:00Z","by":"leslie","op":"set","row":"p1","field":"status","from":"todo","to":"doing"}

Properties (intended):

  • rows.ndjson remains canonical; the log is purely additive.
  • Append-only, line-diffable, plays nicely with git on top.
  • Apps that care implement it; apps that don't, ignore it.
  • Readers MUST tolerate absence; MAY ignore unknown op values.

Specified by D44 (SPEC section 14); the shape above is its set event.

Why park rather than spec now: specifying a versioning model before a real consumer has built against it bakes assumptions we don't have signal for. The format stays lean; the first concrete history UX in a consuming app gets to drive what the extension needs to look like.

D15: SQLite cache — hash staleness, full rebuild, atomic swap

The index.sqlite contract (SPEC section 8): staleness is detected by content hash (schema_hash + rows_hash stored in a _meta table inside the index), rebuilds are whole-file inside one transaction, and writers build into a temp file then atomically rename. FTS5 indexes string fields and body contents.

Why hashes, not mtimes: git rewrites mtimes on checkout/pull even when content is unchanged — an mtime check rebuilds after every git operation. Hashing a multi-MB NDJSON costs ~50ms, paid once per open.

Why full rebuild: at this format's size class (Airtable caps at 50k rows/base) a transactional rebuild is sub-second. Incremental indexing is deferred until a real consumer outgrows that — the format is already incremental-friendly (append-only edits detectable by prefix hash + byte watermark) if that day comes.

Why FTS over bodies: searchRows already searches bodies; an index that omitted them would silently return fewer hits than the fallback it replaces.

D16: queryIndex takes the view AST, not raw SQL

The original locked interface was queryIndex(dirPath, sql). Changed (while still a stub, before any consumer existed) to a structured IndexQuery — the filter / sort shapes from views.json plus a search string — compiled to SQL internally.

Why: raw SQL freezes the cache's internal layout (column naming, encodings, FTS config) into a public contract — the very thing "never the source of truth" exists to prevent. The AST keeps the indexed path and the in-memory fallback speaking one query language so results can't diverge, and user search text never reaches an SQL string.

Extended (2 Oct 2026): queryIndex also takes the view's manual order, returns a count and a window reader rather than every row, and says null when it can't match the in-memory path exactly (the index is exact or absent, never approximate). One implementation runs on every platform over a small SqlDriver; D15's "incremental indexing is deferred" is superseded by putRows / removeRows because the large-tables work (docs/LARGE-TABLES.md) put a million rows in a table, where a rebuild is half a minute. Staleness is a caller-chosen content key, not hashes the indexer reads off disk, because the web and mobile have no files to hash.

D17: Sync posture — op-log transport, files as materialisation

For multi-writer sync (Hypercore/Autobase per the Workspace Protocol, formerly workspace-p2p-spike), the intended model is an op log per writer, Autobase linearisation, per-field last-writer-wins, and the .table/ directory materialised from the log as a deterministic checkout. Within a synced workspace the log is canonical and files are derived — which D14 already permits, since the authority model belongs to the consuming app. Full reasoning in docs/STORAGE-AND-SYNC.md.

Three knock-on rules recorded here because they constrain the format, not just consumers:

  • Canonical write order (SPEC section 3): identical state must produce byte-identical files, or convergence can't be hash-checked and git sees phantom diffs.
  • Append-only schema evolution is load-bearing for sync, not just for compatibility: field adds commute between concurrent writers; renames/removes would not. Don't relax it.
  • modified_at is stamped on user-initiated writes only (SPEC section 5): a sync engine touching it on every apply makes every replica differ by timestamp alone.

The reserved history.ndjson (D14) and the sync op log are one design: if the extension lands, it is the at-rest serialisation of the same event vocabulary, not a parallel format.

D18: Enum entries are string-or-object

An enum entry is either a bare string or an object { value, color?, label? }. Only value participates in validation and enum-ordered sort/group; color (a symbolic name; 8 here, widened to 14 by D43) and label are display-only. Readers coerce strings to { value } via enumOptions(); both forms may mix in one array.

Why: the flat string array couldn't capture author intent ("active = green"), so every consumer picked chip colors algorithmically and two consumers disagreed. Putting the intent in the schema makes it round-trip. Object-or-string (rather than a parallel enumConfig map keyed by value) keeps the common minimal case a plain string and the declaration in one place. Colors are symbolic, not hex, so each consumer themes them for light/dark.

D19: format is a closed vocabulary, not printf

Field format tokens come from a fixed per-type set (number: decimal:N / percent / currency:<ISO> / …; date: short / long / relative / …; string: markdown / url / email / …). Stored values stay raw; formatValue() renders locale-aware via Intl. Unknown tokens fall back to plain.

Why: arbitrary format strings (Excel's #,##0.00;[Red]) are a mini-language every reader must reimplement identically or diverge — and they bake locale assumptions into the data file. A closed enum of semantics ("this is USD", "show this date short") lets each consumer render correctly for its own locale. Reuses the existing format key (already "markdown" on strings) rather than adding a second display-hint field.

D20: Multi-target relations via cardinality, not a new type

Relations stay a single primitive (see D10). Multi-target is a cardinality: "one" | "many" flag on the existing relation declaration; "many" means the row value is an array of ids. Defaults to "one" — backwards compatible.

Why: "one project" and "many tags" are the same relation concept at different arity, not two different field types. A flag keeps the one relation primitive intact and the address grammar unchanged (each id still resolves to <path>#row=<id>), so navigation works for both shapes with no new machinery.

D21: Computed fields — reserved shape, deferred evaluator

A computed: { expr, dialect } field declaration is reserved in the spec and the Field type, but no evaluator ships. Results are defined as never persisted (recomputed on read); readers tolerate the field's presence and render it empty until an evaluator exists.

Why: the storage decision (computed = derived, never written) is safe to lock now and prevents a "stored value disagrees with recomputation" staleness class. The evaluation decisions — which expression dialect (CEL / JSONata / bespoke), the standard library, whether cross-row aggregation is ever in scope — need a real consumer to drive them; committing early bakes a language we can't yet justify. Same park-with-reserved-shape posture as D14's history.ndjson. Explicitly out of scope even when built: spreadsheet-style range references (A1:A10) — position-based addressing is wrong for an id-keyed row model.

Amended by D41: ranges are now in scope, counted in a named Sheet view's grid rather than in cell addresses, and references by row id stay the default.

D22: schema-version is single-writer scoped

The schema-version counter is meaningful only without concurrent writers (one device, or git with human-resolved merges). Under multi-writer sync it is advisory: the sync layer's linearisation order is authoritative for schema supersession, and consumers must not treat counter equality as schema equality across replicas — compare the field set itself. (Resolves issue #45; follows from the D17 op-log model.)

Why: a monotonic counter cannot converge — two offline peers can both bump 1 → 2 with different schemas, and on sync there are two distinct "v2"s. The honest options were: derive the version from content (loses the human-readable number), hand it to the sync layer (leans on a layer that isn't built), or scope the counter to the substrate where it works. The append-only schema rule (D18) already makes concurrent schema edits commute; only the number was lying. Scoping it is zero-code, honest, and correct for the 1.0 substrate (git / single device). When the sync layer lands, it owns supersession by log position — the counter stays what it is today: a human-facing "the schema changed" signal.

D23: Ids are case-safe; validity is loose, minting is opinionated

Amended 25 Oct 2026 (Leslie): the alphabet is z-base-32 (ybndrfg8ejkmcpqxot1uwisza345h769), 26 characters, 130 bits, for every id .table mints: rows, views and history entries, and fields' ids (D62) at 13 characters. It is lowercase, so the reasoning below stands; it has no look-alikes (0/o, 1/l); and it is the alphabet Workspace and Holepunch write keys and invite codes in, so one alphabet runs through .table and the protocol under it. Every fixture's ids were rewritten to it. Validity stays loose. What follows is the original decision, which chose lowercase base36.

Writer-minted ids are 25 chars of lowercase base36 (0-9a-z, ~129 bits) via customAlphabet — no uppercase anywhere in the alphabet. Validity stays loose: any non-empty string unique within the table is a legal id, so hand-authored ids (p1) remain fine. (Resolves issue #42.)

Why: ids are used verbatim as filenames (bodies/{id}.md), and the default nanoid alphabet mixes case — on case-insensitive filesystems (default APFS, NTFS, most sync targets) two ids differing only in letter case resolve to the same path and silently overwrite each other's bodies. Silent data loss is the worst failure mode, so the fix removes the failure class (case leaves the alphabet) rather than adding a filename-encoding layer both writer and parser would carry forever. Length went 21 → 25 to keep entropy at parity with the old base64url alphabet. Breaking for previously-minted mixed-case ids, which is acceptable pre-1.0 — no production data exists, and fixtures use hand-authored ids that were never affected. The loose-validity rule is deliberate (maintainer call): a .table/ outside a managed workspace should be writable by a human or an agent without opaque-id ceremony.

D24: Writer commits via stage → rename → trim

writeTable stages every file to a <name>.tmp sibling, commits each with an atomic per-file rename(), and performs deletions (stale bodies, emptied bodies/) only after every rename has landed. A failure during staging aborts with the previous table byte-for-byte intact. (Resolves issue #43.)

Why: the old writer wrote each file in place, sequentially — a crash, a concurrent reader, or a file-sync client could observe a new schema.json alongside the old rows.ndjson (a torn table), and a crash mid-bodies could leave bodies deleted but not rewritten. For a format whose pitch is local-first files under git and sync clients, the writer must never make a reader's view inconsistent. Full-directory swap (staging a sibling directory and renaming it into place) was considered and rejected for 1.0: it breaks open file handles and watchers on every save and costs a directory copy for unchanged attachments; per-file rename shrinks the torn window from "the whole serialisation" to a handful of renames, which is proportionate. Durability (fsync) is explicitly out of scope — the contract is about what readers can observe, not about power loss; the same posture as the index.sqlite rule (D15).

D25: Readers are skip-and-collect, not fail-fast

parseTable skips a malformed NDJSON line, a row without a system id, or a malformed optional file, and reports each as a diagnostic (ParsedTable.diagnostics, ValidationError shape, rowIndex = zero-based line number, or −1 for file-level). Valid rows always load. The single fatal case is a missing or malformed schema.json. (Resolves issue #44.)

Why: the format's pitch is hand-editable, line-diffable text under git. Fail-fast meant one typo or a merge-conflict marker made the entire table unreadable — an exception, with no way to see the surviving data. That punishes exactly the users the plain-text design courts. Skip-and-collect matches NDJSON's own design (each line independently parseable, SPEC section 3) and the format's existing tolerance posture (optional files may be absent; unknown root files are ignored). Strictness remains available one level up: a consumer can refuse to proceed when diagnostics is non-empty. Schema stays fatal because every downstream interpretation depends on it — degrading there would fabricate meaning.

D26: formatVersion 1 is frozen (2026-07-20)

The on-disk format is frozen at formatVersion: 1, tagged format-v1. Changes from here are additive only — new optional fields, annotations, or files that existing readers safely ignore (the tolerance rules in SPEC section 1 make this cheap). Breaking changes require a major formatVersion bump. The reference library's TypeScript API is versioned separately and may still move.

Why now: every open vocabulary question is implemented or reserved-with-a-shape (D18–D21), the storage/sync contracts are written (D15–D17, D22), the reader/writer behaviour contracts are implemented and tested (D23–D25), the architectural review (docs/REVIEW.md) found no remaining freeze-blockers after the access-model reconciliation landed, and the first real consumer (the Workspace app) is waiting on a stable target. A frozen format with an evolving library is the correct boundary: consumers bet on bytes, not on npm semver.

D27: Archive transport — nested root, in-memory reader, zero deps

<name>.table.zip contains exactly one root directory, <name>.table/ (SPEC section 13). The reference reader parses the zip entirely in memory — never extracting to disk — and the writer emits byte-deterministic archives. Zip handling is ~200 lines over node:zlib; no archive dependency. (Resolves issue #56, requested by the Workspace integration.)

Why nested, not files-at-root: Finder and CLI unzip both then produce the .table/ directory directly, nothing scatters loose files into the extraction directory, and the table keeps its name when the archive file is renamed. Why in-memory: it makes the zip-slip vulnerability class structurally impossible in the reference path (entry names are still validated for extracting consumers), avoids temp-directory lifetime questions, and a .table/ that fits an email fits memory. Why zero-dep: the format's pitch is implementable-in-an-afternoon; stored + deflate over a fixed layout doesn't justify an archive stack. Constraints accepted: no zip64, no encryption — readers MAY reject >4 GiB archives.

D28: Archive transport is portable; codec via fflate

readTableArchive / writeTableArchive run on Node, browsers, and React Native (Hermes): no Node globals, bytes-only API (the platform supplies bytes from a path, fetch, or document picker), string encoding via fflate's helpers rather than assuming global TextEncoder/TextDecoder. The raw-deflate codec is fflate (pure JS, zero transitive deps); the container logic — layout, security posture, determinism — remains bespoke. Supersedes D27's zero-dependency claim.

Why: a shared archive arrives on every platform — mail on a phone, upload in a browser, Finder on a Mac — so a Node-only reader served exactly one of the format's three UI targets. Hermes has neither node:zlib nor DecompressionStream, which leaves pure-JS deflate as the only implementation that runs everywhere; writing and maintaining our own inflate/deflate is not where this format's value lives. fflate is small, audited, and dependency-free, and only the codec crosses the boundary — everything the spec normatively constrains stays in-repo.

D29: Computed field dialect — table-expr-v1 is a canonical S-expression grammar; Excel-style syntax is a compiling authoring surface

The dialect: "table-expr-v1" placeholder in D21/SPEC section 2 is defined: an S-expression (EDN-style) grammar — (sum price quantity), (if (> total 4200) "over" "ok") — as the one form every reader's evaluator parses. dialect remains a string precisely so a future table-expr-v2 or an entirely different grammar can be introduced without a formatVersion bump; table-expr-v1 names this first one.

No second stored grammar is introduced. Excel-familiar syntax (=SUM(price, quantity)) is an authoring-surface convenience, not a storage format: a consuming app's editor compiles it down to table-expr-v1, and renders the stored form back into Excel-style syntax when it shows it. The file holds one formula in one notation.

Why no cached rendering beside expr: a client able to compile =SUM(price, quantity) down can equally print the stored form back, and printing is the easier of the two directions. Storing a second copy would save a consumer a few dozen lines, at the cost of a value that can silently disagree with the formula it describes. The format already refuses that trade for computed results ("never persisted, recompute on read"); a cached rendering is the same staleness in a different field, and is refused for the same reason. This is a deliberate omission — do not reintroduce a display key as a convenience.

Case: function names are case-insensitive at the authoring surface and normalise to lowercase in the stored expr — ROUND(price, 2), Round(price, 2) and round(price, 2) all compile to (round price 2). Uppercase is a spreadsheet typing convention, not a requirement, and carrying it into storage would oblige every reader to case-fold before dispatch.

Field references and string literals are case-sensitive and preserved verbatim. A field reference is a key in rows.ndjson, so price and Price are genuinely different fields and nothing can safely guess which was meant; folding them would silently resolve to the wrong column. Readers MUST NOT case-fold anything but the function position.

Why S-expressions over CEL, JSONata, or a bespoke infix grammar: the format's pitch is a minimal reader implementable in an afternoon (D9, D26's freeze rationale). CEL and JSONata both need real tokenizers with operator-precedence climbing before anything can be evaluated; an S-expression reader is closer to a hundred lines in any language — no precedence table, no ambiguity, (op arg arg…) uniformly. That cost is paid by every third-party reader that wants to resolve a computed field, not just this repo's own.

Why not restricted/sandboxed JS: same reason in sharper relief — even a minimal secure-subset JS parser is a substantially bigger implementation surface than an S-expression reader, for a format whose whole thesis is implementer accessibility.

Why one stored grammar rather than a dialect per column: dialect already makes multiple grammars representable, but every additional stored grammar is an interpreter every compliant reader must embed to be spec-compliant — directly opposed to the minimal-reader thesis. Mixing is fine at the authoring layer (one column's formula typed via an Excel-style bar, another hand-written in table-expr-v1 directly) because both compile to the same stored expr; it is a cost only when the storage layer forks.

Precedent: Grist (Python formulas, Excel-named functions exposed as callables in the same language) solves the "don't alienate spreadsheet users" problem the same way — one execution language, a familiar vocabulary layered on top — rather than by shipping two interpreters.

Composability payoff: because table-expr-v1 expressions are pure (no side effects, no cross-row state beyond what's explicitly referenced), they would compose cleanly with a future multi-value ("amb") scenario extension, should one be reserved — such an evaluator re-runs the same expr once per input combination with no special-casing. Nothing of the kind is reserved today; this notes a property worth preserving, not an existing commitment.

Coordinates are an authoring and display surface, never storage: a grid MAY label columns A, B, C… and rows 1, 2, 3…, and a formula bar MAY accept =B7. Neither reaches disk. A coordinate typed at entry is resolved immediately against the current view to a stable reference — the field name, plus a row id when it points at another row — and that is what is stored. On display the stored reference is rendered back into whatever coordinate it occupies in the current view.

The formula therefore never changes when rows are sorted, filtered or grouped; only its rendering moves. =B7 becomes =B3 after a sort, still meaning the same row. This is strictly stronger than A1: a spreadsheet must rewrite every affected formula on an insert or delete (O(formulas) per structural edit) and still cannot protect references that point INTO a sorted range from outside — they keep their coordinate and silently mean different data. A reference bound to a row id cannot be broken by reordering at all, so there is no rewriting pass and no #REF! arising from a sort. This extends D21 rather than adding to it: D21 already rules out spreadsheet-style range references (A1:A10) on the grounds that position-based addressing is wrong for an id-keyed row model. The same reasoning applies to a single coordinate, which is why one may be typed and displayed but never stored.

Amended by D41: a coordinate typed in a column's header editor, or pinned with $, is still stored as a row id. One typed in a Sheet view's cell for another row is now a reference by place, (at …), counted in that Sheet view's saved grid, and ranges are allowed. Letters and numbers still never reach disk: a place is a field, an offset or row id, and a Sheet view's id.

Row-local evaluation is a performance boundary, not only a scope decision: while a computed field may reference only its own row (D21, issue #34), each row's evaluation is independent and there is no cross-row dependency graph. Combined with recompute-on-read, this means a reader computes only the rows it is showing — a million-row table costs what is on screen, not what is on disk, and recalculation parallelises per row. Cross-row aggregation is precisely what reintroduces the dependency graph and the topological recalculation that makes large spreadsheets slow. That is a reason to keep it deferred, and when it is built it needs designing against that cost (incremental aggregates, or materialisation into the optional index.sqlite) rather than treating it as ordinary scope.

(Resolves issue #34.)

Addendum (2026-09-24): refusal, and what sum means.

  • A formula that can't compile is refused, never stored. An authoring surface compiles what was typed to table-expr-v1 before saving. If it can't, the formula is refused with an error at the point of entry, and nothing is written. expr never holds raw authoring text: a stored infix string would be the second grammar this decision rules out, and every reader would have to guess at it. A reader given an expr that does not parse renders the field empty and reports it.
  • sum adds its arguments within the row. (sum price quantity) is price + quantity, and a one-argument (sum price) is just price. It never means a column total. The case example above used SUM(price) until this addendum and was changed to ROUND, because a spreadsheet user reads SUM(price) as a column total. Cross-row aggregation is still deferred, for the performance reasons above; when it arrives it gets its own form rather than overloading sum.

Later (D52): a cell's own formula, kept in cells/, is stored in the same form and compiled the same way. There is still one stored grammar.

D30: Every field type has exactly one JSON encoding

SPEC section 2 named thirteen field types but said how only some of them are written. datetime did not say whether an offset is required, duration had no grammar, geopoint was a two-number array in the reference validator but a "lat,lon" string in the index.sqlite mapping, and geojson was a string in the validator where every other GeoJSON consumer expects an object. Two independent readers of one file could reasonably disagree about its values. For a format whose point is being read by software that isn't ours, that is the most serious kind of gap, so the encodings are now pinned (SPEC "Value encodings", "Empty values", "Numbers").

Standards, not inventions. Dates and times are RFC 3339; durations are ISO 8601; geojson is RFC 7946; geopoint is [longitude, latitude], GeoJSON's order and Frictionless's array form. A third party can check a value with a library they already have.

datetime offsets are optional. With one, the value is an instant, and writers SHOULD spell instants in UTC so that equal values are byte-identical. Without one, it is a floating wall-clock time, as in iCalendar: "the stand-up is at 09:30" means 09:30 wherever the reader is, and forcing an offset would misstate it. What IS required is that readers compare instants, not strings; the reference sort compared strings, which misorders 10:00+02:00 against 09:00Z.

Seconds are required in time and datetime, although HTML's own inputs omit them. Allowing both would give 09:30 and 09:30:00 as two spellings of one value, which breaks the byte-identical guarantee of canonical write order. The reference provides completeSeconds() for writers fed by those inputs.

Numbers are doubles, and the spec says so. This matches what spreadsheet applications do, but was never stated. Integers are bound to ±(2⁵³−1), where common JSON parsers start rounding silently. An exact decimal type is deliberately not added here: it is a real design question (string-encoded? a scale on the field?) and belongs with the formula work that would compute on it.

Absent, null and "" are one "empty". The reference already treated them alike in validation, filters and grouping, but sorted "" as an ordinary string — first when ascending. It now sorts last in both directions, like the other two, and writers SHOULD omit the key.

Additive under D26. No fixture in this repository uses any of the newly pinned types, so no stored value changes meaning. geojson now reads both the object and the old string form. One reference writer did produce a now-refused spelling: the table view's cell editor saved time and datetime without seconds, straight from the browser input. It now completes them. Otherwise, the newly refused values are ones no two readers could have interpreted consistently anyway.

Documented at the same time, because the reference already used them without the spec mentioning them: the field annotations title (the display name, which is how a column is "renamed" under append-only evolution) and align, and the view properties group, order and columnWidths.

D31: Withdrawn — rows.ndjson stays one row per line

D31 briefly split rows.ndjson into one cell per line with a blank line after each, so that git could merge edits to neighbouring cells without a conflict. It is withdrawn, and rows.ndjson is one row per line, as SPEC section 3 has always described.

Every plain-text format lives with git's line-based merges — CSV, JSON, Markdown, JSON Canvas, source code — and none of them reshapes itself to avoid conflicts. D31 did, at a real cost: files two to three times larger, rows no longer readable at a glance, and blank lines that strict NDJSON and JSON Lines readers reject (JSON Lines: "a blank line is not" a valid value). Conflicts in a .table/ are resolved the way they are everywhere else. Workspace itself doesn't sync .table/ through git at all.

There were no users, so nothing reads the withdrawn layout: no formatVersion 2, no migration, no conflict-marker handling in the reader.

D32: table-expr-v1 standard library — spreadsheet names, spreadsheet behaviour

D29 settled the grammar and left the standard library open. The reference evaluator now defines it (SPEC section 2, "Computed fields"): arithmetic, comparison, sum min max round abs, if and or not isblank, and concat upper lower len, row-local only.

Excel's names and Excel's behaviour, lowercased. People writing formulas already know them, and D29's authoring surface compiles =ROUND(x, 2) to (round x 2) one-for-one, so no renaming table has to be learned or maintained. Where Excel's behaviour is a convention rather than an accident, it is kept: sum/min/max skip blanks, round rounds halves away from zero, <> is not-equal, and failures show as #DIV/0!, #VALUE!, #NAME?, #REF! and #NUM!.

One deliberate departure: an empty operand makes arithmetic empty. Excel treats a blank as 0, so price * quantity with no quantity shows 0 — a plausible-looking wrong answer in a column of real ones. Empty-in, empty-out makes missing data visible instead. sum still skips blanks, so "add these up, ignoring gaps" stays one word.

Errors are values, not exceptions. A failed row shows its code in its own cell and the rest of the column still computes; anything built on a failed value carries the same code, so the first cause is the one shown. The untaken branch of if is never evaluated, so (if (= q 0) 0 (/ p q)) guards a division the way it does in a spreadsheet.

Left out on purpose (until D55, which brought today and now back): today/now, because a formula whose value changes with the clock is not pure (D29 relies on purity for recompute-on-read and for any future multi-value extension), and column totals, which stay deferred for the performance reasons in D29. Both can be added later without changing anything here.

D33: Currency is a unit, and nothing converts

currency:<ISO-4217> sat in SPEC section 2 as a display format, beside percent and decimal:2. It is more than that: it says what the stored number is in. 80000 in a currency:USD column is eighty thousand dollars, and relabelling the column EUR doesn't make it euros.

Treating it as display alone let a formula column say something false. (/ budget 5) over a USD budget, shown with currency:EUR, printed €16,000 beside US$80,000 as though a conversion had happened. None had.

Nothing converts. A .table/ stores no exchange rates, and a reader never fetches one: rates change by the minute, depend on a provider, and would make a formula's result depend on when and where it was read, which breaks the purity D29 relies on for recompute-on-read. Converting is a formula over a rate the table holds as data, (* budget usd_to_eur), so the rate is visible, dated if you like, and the same for every reader.

Formulas show their inputs' currency. A computed field with no format of its own is shown in the currency of the fields it reads, when they all share one. A formula over dollars is shown in dollars without anyone setting it. When the inputs are in different currencies there is no single unit, so the result is shown as a plain number. A field's own format still wins, and an authoring surface should say, when it differs from the inputs, that it relabels rather than converts.

Different columns in different currencies are fine. A table of prices by market can hold a USD column beside a EUR one. What the format refuses is implying that numbers in one were derived from the other by a rate that isn't there.

Reference: effectiveFormat() / inputCurrency() in @workspace.sh/table-core.

D34: Another row is named by its id: (field "name" "<row id>")

D29 decided that a coordinate such as =B7 may be typed and shown but is stored as the field name plus a row id. That left the stored form unwritten, so nothing could point at another row. It is the existing field form with a second argument: (field "q1" "income") is the field q1 of the row whose system id is "income". A bare word, and (field "name"), still mean the row being computed.

Why: it is D29's own wording made concrete, and it adds one optional argument rather than a new function, so a reader that already evaluates field needs only to look the row up. The id is the system id, which never changes (D23), so the reference survives sorting, filtering, grouping and edits to any other field.

Resolving a typed coordinate. An authoring surface resolves a coordinate against the grid it shows. One in the row being edited becomes a bare field, which means "this row" for every row: a spreadsheet's fill-down. One in another row becomes (field "name" "<row id>"), which is absolute. Relative offsets such as "the previous row" are not provided. Amended by D41: in a Sheet view's cell, a coordinate in another row is now relative ("the row above" is (at "c" -1 "<view>")), and $ pins it by id as described here; the header editor still pins by id. On display the reference is shown at whatever coordinate its row now holds, or as field("name", "<row id>") when the row is not in view.

Errors. A reference to a row that doesn't exist (deleted, say) is #REF!, as in a spreadsheet: shown, never silently empty. So is a loop that runs through other rows. Evaluation stays per cell: a formula reads the cells it names and nothing else, so D29's performance boundary for cross-row aggregation is untouched.

Reference: computeRows() and formulaRefs() in @workspace.sh/table-core; SPEC section 2 "References to another row".

D35: Multi-select is an array with a choice list

Notion and Airtable both have a multi-select: a cell holding several choices from one coloured list. The format had the parts, an array type and an enum constraint, but the enum checked the whole value, so an array with a choice list could never be valid (#97). Now an enum on an array field constrains each item, and colours and labels apply to each. contains and not_contains ask about an array's items, and in / not_in match when any item is in the list.

Why: it is what the two constraints already mean together, so no new type or key is needed and a reader that checks enums needs one loop. A separate multiselect type would duplicate array for one use.

Empty. An empty array is empty (SPEC "Empty values"): required rejects it, and a row with no items is none of any list.

D36: Reading across rows: values, related, linked, and lists

(values and related were column and lookup until D48.)

Totals, rollups and lookups are what Notion, Airtable and spreadsheets do across rows, and D29 deferred them because a naive version rebuilds a dependency graph over the whole grid. They are now three forms that each name what they read, plus lists:

  • (values "q1") is every row's q1.
  • (related "company" "industry") follows this row's relation to its row.
  • (linked "deals" "company" "value") is the value of every deals row whose company points at this row: the input of a rollup.

sum, min, max, average and count take lists, as spreadsheet functions take ranges, so a column total is (sum (values "value")) and a rollup is (sum (linked "deals" "company" "open_value")). Arithmetic on a list is #VALUE!: a list is an input to an aggregate, not a cell value.

Why these forms, and why the cost is bounded. Each form names its input, so evaluation stays per cell and nothing is inferred. A reader builds each list once and indexes each relation once per evaluation, so a table of rollups costs O(rows) rather than a recalculation graph. Nothing is stored: results are recomputed on read as every computed field is (D21), so there is no stale total to reconcile. Excel's SUMIF family is not added: a filtered rollup is a computed field on the other table (open_value) summed here, which keeps each piece checkable on its own row.

Tables are the app's to supply. Which table "deals" is resolves as a relation does (SPEC section 10). A reader without the other table shows #REF!. Loops are caught field by field, as in a spreadsheet: a field that depends on itself, through any rows or tables, is #REF!. Tables that depend on each other without a field depending on itself compute (#123: this originally read the other table "as stored", which silently emptied a lookup of a rollup of the looking-up table).

Reference: computeRows(schema, rows, { tables, self }) and applyView(table, view, { tables, self }) in @workspace.sh/table-core.

D37: A .table holds one or more tables

A .table is a bundle. Every table lives in its own directory under tables/<name>/, holding the files sections 2 to 7 describe. This applies even when there is only one table, so readers and writers have a single layout. The bundle root holds the manifest meta.json (format, formatVersion, title and the tables order), the optional index.sqlite for all its tables, and nothing else the format defines. Each table keeps its own meta.json for its own title and description (SPEC sections 1 and 5).

  • Names. A table's name is its directory name, which relations (D3), addresses (table=) and the manifest use. It is stable; the table's title is what people see and can change.
  • Relations resolve within the bundle first. A name the bundle doesn't contain is the app's to resolve elsewhere, as D3 always allowed.
  • The archive (D27) carries the whole bundle, so linked tables travel together.
  • The extension stays .table. Container formats are named for what they are, not how many things they hold (.xlsx, .numbers, .sqlite); .base is Obsidian's, and .tables read awkwardly.

Why: Leslie wants a .table to act like an Excel workbook as well as a Notion or Airtable base. The earlier convention, a folder of sibling one-table .table/s (PRIOR-ART "Multiple tables in one container"), fell short:

  • A folder can't travel as one file. The archive carried exactly one table, so a table sent alone arrived with its relations dangling.
  • There was no table order, no name for the whole, and nowhere for settings shared across tables.
  • The index had no natural unit for joins across tables.

Why not flat when there's one table: two layouts means every reader and writer carries both, and a one-table bundle gaining a second table would move its files. One layout keeps that a plain addition.

No version bump. The format was frozen at formatVersion 1 (D26), but no one used it yet. As with D31's withdrawal, nothing reads the old layout, so there is no formatVersion 2 and no migration.

D38: Functions come in published layers, each with a public test suite

A function is supported only when a published specification defines what it does and a public test suite checks it, so another .table client can implement it and prove it matches. Layers are added one at a time, each complete before the next (D32 and #124).

  1. OpenFormula (ODF 1.4 Part 4). The base, and the only layer until it is complete.
  2. ECMA-376 Part 1 §18.17.7 additions. The Excel file standard (ECMA-376-1:2016, 5th edition) defines 354 functions, with 885 worked examples giving expected results. 14 are not in OpenFormula. They form a separate, second layer, not an extension of OpenFormula. Of the 14:
    • Shipped in this layer (5): networkdays.intl, workday.intl, amordegrc, bahttext and usdollar. Public cases exist for each: the spec's own worked examples, and for the first four LibreOffice's function tests. The layer's suite is built from those and listed with its sources in conformance/openformula/README.md before anything ships. IronCalc's test workbooks and Formula.js's tests also cover the .intl pair; who wrote their expected answers is recorded there (for IronCalc, not yet verified). usdollar is a fixed US-format dollar, and no engine implements it.
    • Backlog (1): phonetic returns the furigana stored with a cell's text. A .table has nowhere to store furigana, and the spec doesn't say what it returns when there is none; implementations disagree.
    • Kept, not calculated (8): rtd and the seven cube* functions ask an outside live source (a Windows COM program, an OLAP server or data model) rather than the file. The spec gives no fixed answer to test against. A .table keeps these formulas intact so they survive a round trip, and calculating one without its source gives the error Excel gives (#N/A for rtd, #NAME? for cube*).
  3. Modern Excel functions (xlookup, let, lambda, filter and others). Held. Microsoft publishes only their names and argument counts. Each is added once an open specification (such as ODF 1.5) defines it and a public test suite covers it.

Why: without a published definition and a shared suite, two implementations have nothing to align on, and a formula that works in one client may give a different answer in another.

D39: .table's formula host settings are Excel's

OpenFormula leaves some behaviour to the host (ODF 1.4 Part 4, section 3.4): whether text comparison is case-sensitive, whether criteria match the whole cell, and whether criteria are read as regular expressions or wildcards. They change what =, < and the rest, the *if and *ifs functions, the database functions, match, vlookup, hlookup, lookup and search give.

A .table fixes them, and a file can't change them:

Host property .table
HOST-CASE-SENSITIVE false
HOST-SEARCH-CRITERIA-MUST-APPLY-TO-WHOLE-CELL true
HOST-USE-REGULAR-EXPRESSIONS false
HOST-USE-WILDCARDS true
HOST-NULL-DATE 1899-12-30
HOST-PRECISION-AS-SHOWN false

Why: these are how Excel, Numbers and Google Sheets behave, and .table formulas must match what those users expect. LibreOffice's defaults differ (case-sensitive, regular expressions), which the conformance suite records per case, so a difference that comes from the settings isn't counted against an engine.

D40: Right-to-left: layouts mirror, alignment is start and end

A .table reads right to left as well as left to right. Arabic, Hebrew, Persian, Urdu and the other right-to-left languages get a mirrored layout: the first column and the sidebar on the right, columns running leftwards, and sideways scrolling reversed.

  • The viewer's language decides the layout. An app lays a table out in the reading direction of the language it shows its interface in. textDirection(locale) in table-core works that out from the BCP 47 tag, by its script or the language's usual script, so every platform agrees.
  • Each value keeps its own direction. Text in a cell is shown in the direction its own characters set (the Unicode bidirectional algorithm, dir="auto" on the web), so a Hebrew name reads correctly in an English layout and an English one in an Arabic layout.
  • Alignment is start, center or end (SPEC section 2, field annotations), not left and right: numbers sit at the end in either direction, and a table mirrors as a whole.

Why: Leslie asked for left-to-right and right-to-left support. Physical left and right would pin a table to one direction; logical alignment is what CSS, Android and iOS use for the same reason.

No version bump. Pre-alpha (D26, D31): the one fixture using "right" now says "end", and nothing reads the old values.

D41: Sheet views are grids, and formulas can read by place

A formula can read a row in two ways. By row names the row itself, by its id, and follows it wherever it moves (D34). By place names a position, "the row above" or "rows 2 to 9", and reads whatever row is there. .table had only the first; spreadsheets have only the second. Running totals, ranges, row, offset and indirect need the second.

Where places come from: Sheet views. A Sheet view (coordinates: true) is a grid, numbered by what is saved in views.json: its grouping, then its manual order or its sort, ties in file order, and file order when nothing is saved. Filters hide rows without renumbering them. A table may have several Sheet views, each its own grid (SPEC section 4, "Sheet views").

A place always names its Sheet view. (at "c" -1 "by-date") is the row above in by-date, whatever view the formula is shown in, so every reader gets the same answer and sorting another view changes nothing. Views are named by id, so renaming one is safe; a deleted one is #REF! (SPEC section 2, "References by place").

Saved and personal arrangements. Only a saved sort, grouping or filter changes a grid. A reader's own sort, which an app keeps outside the file (D4), changes only their screen; a Sheet view shown that way keeps its grid's numbers. Sorting a view to look at it differently never changes anyone's results; "Save for everyone" does, deliberately.

Typing. In a Sheet view's cell, =C6 in row 7 means the row above, and =$C$6 pins that row by id, as Excel users expect when a formula fills down. In a column's header editor there is no current row, so a coordinate pins by id (D34). Another Sheet view typed in a cell is pinned too.

Rules at the edges.

  • A place above the first row or past the last reads as an empty cell.
  • A Sheet view sorted or grouped by something that depends on its own places is a loop: every place read in it is #REF!, and it numbers its rows in file order.
  • The saved order of text is fixed (SPEC section 4, "Sort behaviour"), so every device numbers a grid the same way.
  • File order is now meaningful (SPEC section 3): writers keep each row on its line, and a row can be inserted at a position.

Why: Leslie wanted both kinds of reference without losing what spreadsheets and Airtable already offer: several Sheet views, grouping in them, and a personal sort that doesn't disturb anyone. Naming the Sheet view in every place keeps answers independent of screens, and references by row id still never break when rows move.

Cost: positions are one list of rows per Sheet view that a formula reads, built when that grid changes. Measured with the reference code (grid.bench.ts) on an M1 with 8 GB, Node 22: at 50,000 rows, about 30 ms to sort and number a grid and 60 ms to compute a running total down it; at 1,000,000 rows, about 0.8 s and 1.3 s. References by id never recompute on a move.

Amends D21 and D29 (ranges and places are now allowed, counted in a Sheet view's grid), D34 (relative references in a Sheet view's cell), and SPEC section 3 (file order is meaningful). OpenFormula's offset, index and indirect read the same grids once the formula engine arrives (#124). A running total such as (+ (at "b" -1 "v") amount) is empty in the first row until that engine treats an empty cell as 0 in arithmetic, as OpenFormula does (section 6.3.5); (sum …) works now.

D42: Dates hold any year from 0000 to 9999; the editor refuses what a column can't hold

Decided (29 Sep 2026, Leslie: "go with your suggestion for now, document it also so we can revisit it"). Open to revisit.

A date is RFC 3339 full-date, so any year from 0000 to 9999: a .table can be a historical listing. Years before 1583 use the Gregorian calendar extended backwards (ISO 8601), whatever calendar was in use then. Dates before the Common Era stay out of date; text or a year holds them.

What others do (checked 29 Sep 2026 against each vendor's own documentation):

  • Excel calculates with dates from 1 January 1900 (1904 in its older Mac date system) to 31 December 9999; earlier dates are kept as text (Microsoft).
  • Google Sheets counts days from 30 December 1899, gives #NUM! for years below 0 or above 10,000, and its DATE() adds 1900 to any year from 0 to 1899 (Google).
  • Airtable date fields hold 1/1/0000 to 12/31/9999, with no BC dates (Airtable).
  • OpenFormula (ODF 1.4 Part 4, sections 4.3.3 and 7.4): evaluators must calculate 1904-01-01 to 9999-12-31, should from 1899-12-30, and may go wider; the optional "Year 1583" feature calculates correctly from 1583, and earlier dates may use the extended Gregorian calendar, implementation-defined.
  • Notion and LibreOffice: no statement of their range found in their own documentation, so not counted.

So .table stores what Airtable stores. Excel's and OpenFormula's limits are on calculation, which is the formula engine's concern (#124): date arithmetic before 1900 may not match Excel.

Entry. A cell editor refuses a value its column can't hold, for the reasons the validator would give, with the reason shown and the cell kept open (reference: checkEntry() in @workspace.sh/table-ui). A date before the year 1000 is valid but is far more often a year typed short (a browser's date picker saves 0025 part-way through typing 2025), so the editor asks once ("The year is 25. Did you mean 2025?") and keeps it if confirmed. Clearing a cell is always allowed.

Why: Leslie wants a .table usable for historical dates; the widest range a date type commonly holds (Airtable's) serves that, while catching typos at entry rather than narrowing the format.

Revisit when: the formula engine (#124) settles how dates before 1900 calculate, or if Excel round-trips need a narrower range.

D43: Choice colours are 14 symbolic names, each with a light and a dark pair that pass WCAG AA

Decided (1 Oct 2026, Leslie: "Any chance we can do a mix, and have a large corpus of light/dark colours? We can revisit this until launch and likely even after."). Open to revisit.

Amends D18. A choice's color is one of 14 names: the original gray, red, orange, yellow, green, blue, purple, pink, plus brown, lime, mint, teal, cyan, indigo. Names stay symbolic; a reader that doesn't know one shows gray, so a file written with a new name still opens in an older app. No per-choice custom colour in 1.0.

Reference pairs. Each name has a light and a dark pair, bg behind the label and fg for it. Every pair gives the label at least 4.5:1 contrast (WCAG AA for normal text), checked with the WCAG relative-luminance formula. An app SHOULD use these pairs, and MAY use the platform's own colour for a name it has an equivalent for (iOS's systemRed, say), if the label still meets 4.5:1 in light, dark and increased-contrast modes. Light yellow's fg moved from #8a6d00 (4.40:1) to #7a5f00.

Name Light bg Light fg Dark bg Dark fg
gray #e8e8ed #3a3a3c #2c2c31 #e5e5ea
brown #eee3d8 #7a4a21 #3b2a1d #d9b08c
red #fde2e1 #b42318 #4a1f1f #ff8a80
orange #fde8d4 #b54708 #4a2c14 #ffb86b
yellow #fdf3c4 #7a5f00 #433a10 #f5d565
lime #eaf5cc #4d6b00 #2b3a10 #c3e56a
green #dcf5e3 #1f7a2c #16341f #7ee08a
mint #d8f5ea #0b6b4d #12362b #7fe3c0
teal #d4f1f2 #0e6b73 #10353a #76dde6
cyan #d6eefb #075985 #0f3447 #7cd3f7
blue #dde9fd #1d4ed8 #15284a #8ab4ff
indigo #e1e4fb #4338ca #1f2347 #a5adff
purple #ece3fd #6d28d9 #2d1f4a #c4a8ff
pink #fce1f0 #be185d #4a1f36 #ff9ecb

Colour-vision differences. Checked by simulating protanopia, deuteranopia and tritanopia (Machado et al. 2009, full severity) and comparing neighbouring names. Some pairs of names come out hard to tell apart in the pills' colours alone, which no palette of this size avoids:

  • blue and indigo (all three simulations in light mode), and with purple under protanopia and deuteranopia;
  • yellow and lime; green and brown; red and brown; orange and lime;
  • mint, teal, cyan and green under tritanopia.

So an author who needs two choices told apart at a glance should pick from different families (say red, blue, yellow, gray), and an app never relies on colour alone: the label is always shown (SPEC section 4).

Why 14. Leslie asked for a large corpus. These add the hues iOS has system colours for (mint, teal, cyan, indigo, brown) and lime between yellow and green. Shades of one hue would add names an author can't tell apart, so there are none. The number is a result of that rule, not a target; adding names later is additive.

Revisit when: a consumer needs a name this set lacks, or a custom per-choice pair (a { light, dark } object) is wanted. Adding names is additive; removing or renaming one isn't.

Follow-ups, not in this change: the EnumColor type in @workspace.sh/table-core, PILL_PALETTE in @workspace.sh/table-ui, and the web's StyleX literals; iOS maps names with a system equivalent to PlatformColor; Android takes Material You tones (#308).

D44: history.ndjson is a table's append-only edit history, with whole values

Decided (1 Oct 2026, in the product review that made pages autosave: history comes from git or the app, and a plain .table carries its own). Open to revisit.

Amends D14 (no longer parked) and builds on D17 (the file is the at-rest form of the sync op log, so the event vocabulary is one).

The file is tables/{name}/history.ndjson, in the table's own directory because row ids are per table (D14 said "directory root"). Events are set, insert, delete and page, each carrying whole values (SPEC section 14).

Whole values, not diffs. The Workspace P2P core already keeps each revision's full contents and restores from them (foldHistory, packages/core/src/documents.ts, over an append-only Hypercore log, ADR 0003); with D17 the two should agree. A diff chain makes a reader replay every earlier line correctly, and one damaged line spoils all that follow. A hash with periodic full text can't restore the states in between, which is the point of history.

Size is handled by when an event is written, not how. Autosave writes bodies/{id}.md often; the history gets one page event per editing burst (editor closed, or about 60 seconds with no typing). That is a SHOULD, so readers never rely on it. The file is append-only, so git only ever sees added lines, however long.

op: "page", not set on a body field. A page isn't a field (SPEC section 7): it has no field key, and it is a file rather than a cell value. A separate op keeps set meaning "a cell".

What git and the app each give. Git still gives history for a git-backed .table. This file is for one that isn't, or that travels as a .table.zip, and an app can read it to offer "restore this version" without git.

Privacy. History keeps data that was later changed or deleted. That is the point, and also why an app offering to erase something must rewrite this file (SPEC section 14).

Not decided: compaction of a large log, whether schema and view changes are recorded, and how an app presents it. Adding ops is additive (readers skip unknown ones).

Revisit when: the first app builds a history UI, or the Workspace op log's event vocabulary needs something this lacks.

D45: the index is used where it pays, not for every table

Decided (9 Oct 2026, with the first apps reading a million rows through index.sqlite). Open to revisit.

Builds on D6 (the SQLite cache is optional and rebuildable) and D15 (how it's kept fresh); SPEC section 8.

A table is read through the index once it is large enough that memory is no longer immediate, and from memory below that. The line is the implementation's to measure; the reference apps start at 50,000 rows. The in-memory path stays in every implementation, as the fallback and for small tables.

Considered: an index behind every table, for one path through the apps. Against it: a small table is already immediate from text, and would gain a worker, a file about four times the size of its rows, and reads that arrive a moment late; the in-memory path can't go anyway (no SQLite, no space, formulas that read other rows, Sheet views); and on the web everyone would fetch the SQLite engine to open twenty rows.

To revisit when the index answers what forces memory today (formulas across rows, Sheet views), and when edit history (D44) and sync are built, which a database behind every table would simplify.

D46: an address can say how much of a view to show in place: rows=, cards= and rest=

Decided (13 Oct 2026, with the first table drawn inside a Markdown document). Open to revisit.

Builds on SPEC section 10 (addresses, whose unknown keys every reader ignores).

Where an address is drawn in place (a view inside a document that links to it), rows=<n> gives a table or a list the height of n rows, and cards=<n> gives a board n cards down each column and a gallery the lines holding n cards. Past that the view scrolls within itself. The keys limit height only, never which rows the view has. With neither, the app uses a height of its own.

It is in the address because the height belongs to one placing of a view, not to the view: the same view sits tall in one document and short in another, every platform reads the same link, and a tool that doesn't know the keys ignores them.

Considered: a property of the view in views.json. Against it: one height for every place the view is drawn, and a change to the format for something that is about the page around the table. A single key (show=<n>) counting whatever the layout shows: against it, the link no longer says what is counted, and a view whose layout changes would silently mean something else. Height in pixels: against it, it is not the same on every platform, and an author thinks in rows.

rest=more beside a count draws only the first n and says how many more there are, in a line that shows them when chosen; without it the view scrolls to them. It is a key of its own, not a second pair of counts (first=, top=), so one count means one thing whether the rest scrolls or waits, and a reader that doesn't know rest still shows the right rows at the right height, scrolling.

To revisit when a document wants a view narrowed for one placing (a filter or a search in the address), which is a different thing from how much of it is shown.

D47: a relation's table not in its bundle is the .table of that name beside it

Decided (14 Oct 2026, with relations followed out of an embedded table). Open to revisit.

Builds on D3 (relations name a table, not a path) and SPEC section 2 ("relation").

A relation's table that the bundle doesn't hold names <name>.table in the same folder: that file's table of that name, or its only table. Missing either, the relation is dangling, its values kept and shown as unresolved. Apps may look further only after this.

It keeps D3's promise (no paths in the format, so moving a folder of files together breaks nothing) and makes the answer the same in every app, rather than whatever each one's search of a workspace finds first. One step only: a file's own relations to further files are resolved when that file is open in its own right, so reading a table never walks a chain of files.

Considered: a path in the relation ("table": "../suppliers.table#table=suppliers"): against it, D3, and a folder renamed breaks every link into it. Searching the whole workspace by name: against it, two files of one name in different folders give different answers in different apps, and a search costs a walk of every folder.

To revisit when a workspace wants one table shared by files in different folders.

D48: .table's own forms never take an OpenFormula function's name: column is values, lookup is related, concat is concatenate

Decided by Leslie (14 Oct 2026). Open to revisit.

Builds on D36 (reading across rows) and D38 (functions come from OpenFormula, layer by layer).

Formula meaning is OpenFormula's (D38), so every one of its 393 function names is spoken for. Two of .table's own forms had taken names that mean something else there: column (OpenFormula's COLUMN is a cell's column number) and lookup (LOOKUP searches a range). Filling in OpenFormula on top of them would have broken both. They are renamed, and concat with them, before anyone depends on the old names:

Was Now Why this name
(column "spend") (values "spend") The word Airtable uses in a rollup for the list of a field's values, summed or counted after. "Sum the values of spend" reads as English.
(lookup "company" "industry") (related "company" "industry") DAX's RELATED() (Excel's Power Pivot and Power BI) does exactly this: from the current row, follow the relationship to the one row it points at and read a column there. DAX's RELATEDTABLE() is the rows pointing back, which is .table's linked, so the pair keeps the same two directions.
(concat a b) (concatenate a b) OpenFormula's own name for this, so it can never clash. Excel's later CONCAT joins whole ranges, which ours doesn't. Typed formulas still use &.

field, linked, at and range aren't OpenFormula names and stay. row and rows already mean what OpenFormula's ROW and ROWS mean (a position and a count) and stay.

Reading and writing. A reader takes the former names as the new ones (FORMER_NAMES in the reference reader), so files written before this read unchanged; the next save of such a formula stores the new name. The typed form accepts the old names too and compiles them to the new. Nothing in the format version changes: no one depends on the old names yet.

Considered: a prefix for every .table form (table.column, as OpenFormula's com.microsoft. names do): can never clash, but it lengthens every formula and keeps a misleading word. each, all, every, list for values: each has another meaning in common use ("are all true?"), or sounds like making a list rather than reading one. follow and via for related: follow is a verb among nouns; via reads in the opposite order to its arguments. Airtable, Coda and AppSheet call this field a "Lookup", which is why lookup felt natural and why it clashed.

To revisit when a later layer (D38) brings a function whose name collides with values, related, linked, field, at or range; none of OpenFormula's or ECMA-376's does.

D49: a .table is a folder or a single file, the same document either way

Decided by Leslie (15 Oct 2026). Open to revisit.

Builds on D26 (frozen format, additive changes), D27 and D28 (the archive's layout and reference reader and writer).

A .table has two forms with the one extension: the folder form (the directory every other section describes) and the file form, a regular file holding that directory as an archive in section 13's canonical layout. Apps open both, show both as one "Table" item where the platform allows, and save a document in the form it was opened in. A new document is a folder unless the user chooses a file. .table.zip is the file form with .zip added for sending: the same bytes. (Amended by D50: there is no .table.zip; the file form is sent as it is.)

This is how Apple's iWork documents work: a .numbers is a package or a single zipped file. Numbers exports two types for the numbers extension under one description, com.apple.iwork.numbers.numbers (conforming to com.apple.package) and com.apple.iwork.numbers.sffnumbers (conforming to public.data, not to a zip type), and opens both as an editor. Asked about a file itself, macOS gives each form its own type (sffnumbers for the zip, isPackage false; numbers for the folder, isPackage true), with the same kind, "Numbers Spreadsheet", and the same icon. A type looked up from the name alone can't tell the forms apart, and Spotlight's metadata reported the zip as the package type, so readers decide by what is on disk.

Why both forms.

  • The folder is the format's point: plain files that git diffs and merges, and that sync moves one file at a time (STORAGE-AND-SYNC.md). It stays the default.
  • A single file travels and is kept as people expect a document to be: mail, upload, the web's file inputs, and systems without packages (on Linux and Windows a folder form is always a folder). It is also smaller: the 1,000,000-row example is 165 MB of rows and a 19.6 MB archive.
  • One extension for both means a document keeps its name whichever form it is in, and nobody has to know the difference to open it.

What changes. It answers #552 (editing a .table.zip in place): a file-form document is edited in the app and saved whole, atomically, never patched entry by entry. Nothing in the bundle changes: a file-form .table holds exactly a folder form's files, so formatVersion stays 1. Section 13 gains the file form's rules: readers decide by what is on disk; a file-form save carries everything (attachments included, which transport may leave out) except the index; it replaces the file atomically; an app's index of a file-form document lives in the app's own storage. The Apple types are named in section 13 so that every app declares the same ones.

Considered.

  • .table.zip only, and keep it for transport (D27 as it was): a document kept as a file would always show as an archive and open in the archive utility, and its name would carry .zip.
  • The file form as the default, as iWork's is: it would give up git and per-file sync for every new document, which is what the format is for.
  • A second extension for the file form (.tablez, as some formats do): one document would have two names, and a renamed file would change what it is.
  • The file form conforming to public.zip-archive: the system would offer to expand it and show it as an archive; Numbers' single-file type conforms to public.data for this reason.

To revisit when sync or git needs to work on a file-form document, or a platform's file type for .table can't tell the forms apart.

D50: there is no .table.zip: a single-file .table is sent as it is

Decided by Leslie (15 Oct 2026). Open to revisit. Amends D49, and with it D27's transport name.

D49 kept .table.zip as the file form with .zip added for sending. Leslie dropped it: "Let's drop the .zip entirely." Both forms of a .table are named <name>.table, as both forms of a .numbers are. A single file is how a .table travels and how it's kept by anyone who wants one file; there's no second name for either. Folders stay the default for a new document, and saving as a single file is to be there on every platform an app supports.

Why.

  • One name: a document is called the same whether it's a folder, a file, an attachment or a download, and nobody has to choose between two names that mean the same bytes.
  • The case for .zip was that it "unzips anywhere". A person who wants the folder from a single-file .table can rename it to end .zip and unzip it; the layout (section 13) still gives the .table/ folder directly. Apps open a single-file .table without that step.

What changes. Apps stop offering and writing .table.zip: export and "save a copy" write a single-file .table, and open dialogs accept .table as either form, told apart by what is on disk (D49). Nothing in the bundle or the archive's layout changes, so formatVersion stays 1. A .table.zip someone still has is a single-file .table under another name: renamed, it opens.

Considered: keeping .table.zip alongside for sending (D49 as it was): two names for the same bytes, and a sent file opening in an archive utility on many systems rather than in an app that reads it.

To revisit when a channel a .table must travel through refuses or mangles a file not named .zip.

D51: a table's rows are files in rows/, split at about 25 MB, named to sort the same everywhere

Decided by Leslie (15 Oct 2026). Open to revisit. Breaking: formatVersion 2. Closes #582.

A table's rows were one file, rows.ndjson. At a million rows that's 165 MB (442 MB for wider rows), and GitHub warns at 50 MB and refuses 100 MB, so a large table couldn't be kept in git as a folder, the folder form's point (D49). Now every table's rows are NDJSON files in its rows/ folder, read in name order as one file order (SPEC section 3).

  • Always the folder (Leslie: "normalise the format"). A small table's is one file, rows/0001.ndjson; one rule for every reader and writer, and nothing changes shape as a table grows.
  • About 25 MB a file. The aim is only to fit git without a large-file extension, at the least computation: a writer counts the bytes it writes (no cost), starts a new file once the one it's writing passes 25,000,000 bytes, and never rebalances or merges files, so their sizes vary. 25 MB keeps every file well under GitHub's 50 MB warning, with room to grow by edits between splits, and keeps a save (which rewrites only the files it changes, not the whole table) and an archive entry small enough for a phone. That's about 57,000 to 150,000 rows a file for rows of 442 to 165 bytes.
  • Names: four digits, then letters for splits. New files at the end take the next number; a file that passes the limit in the middle splits into a name made by adding letters (0002m between 0002 and 0003), so no other file is renamed. Digits then letters sort the same as bytes compare (git, GitHub, a terminal) and as file browsers sort numbers by value (Finder, Explorer, GNOME Files), so the folder lists in file order everywhere; 00025 would sort after 0003 in a browser.
  • Where the files split isn't canonical. It depends on how the table was edited, so two writers holding the same rows may split them differently. The rows, in order, and each row's serialisation stay canonical (SPEC section 3).
  • formatVersion 1 (one rows.ndjson) is still read, as the table's only rows file; a writer writes rows/ and removes it.

Also gained. A save rewrites only the rows files it changes, not 165 MB for a cell. A single-file .table (section 13) holds each rows file as its own entry, so reading or changing part of a large table needn't inflate all of it.

Considered.

  • rows.0.ndjson, rows.1.ndjson beside the table's other files: dozens of files next to schema.json, and numbers that force renames on a split.
  • Files of about 1 MB: hundreds of files at a million rows for no gain; the aim is git's limit, not small diffs (git already stores a changed line as a small delta).
  • A row count per file: as cheap, but rows vary in size, so a table of wide rows could still pass 50 MB.
  • Only for large tables (rows.ndjson until a limit): two layouts for every reader, and a table that changes shape as it grows.
  • An index file listing the files' order (Delta Lake, Iceberg, LevelDB's MANIFEST): names stop mattering, but every split edits one shared file, which two people editing in git then clash on.
  • Content-defined chunking (Dolt, restic, rsync: a file ends where a row's id hashes to a pattern, so splits depend on the rows, not on edits): any two writers split alike and an insert only ever changes its own file. Kept for later: it needs a size cap beside it, and more to build.

To revisit when git hosting's limits change, or two writers splitting differently costs more than it saves.

D52: a cell may have its own formula, kept beside the rows in cells/

Decided by Leslie (22 Oct 2026). Open to revisit. formatVersion 3.

A field's formula is the same for every row, as in Airtable or Notion. A spreadsheet's is per cell. A .table should hold what spreadsheet users expect without giving up what it already is (Leslie: "as long as we don't break our own format").

  • A cell's own formula (expr), in any field but id. In a computed field it is that row's exception. Its result is never stored, as a computed field's isn't (D21), and is a value like any other: views, other formulas and validation see it as they see a computed field's.
  • Kept in cells/, not in the rows. The rows files stay plain values that any tool can read as records, no field name is reserved, and a table without cell formulas has no new file. The folder is named and split as rows/ is (D51), so a table with 250,000 cell formulas fits git the same way.
  • A typed value beats a formula. A row with a value where cells/ has a formula was written by an app that doesn't know cells/, after the formula: what the person typed last stands.
  • Lines aren't lost by accident. A line whose row or field can't be found is kept, as an unreadable row is (D25): a merge may bring the row back. Only removing the formula, the row or the field removes it.
  • A version bump. An older reader ignores cells/ and shows wrong values, an empty cell or the field's own formula, without knowing it. That is a breaking change, so cells/ came with formatVersion 3.
  • The stored form doesn't grow. Only lists, bare words, numbers, strings, true, false, nil and vectors; nothing more of EDN than a formula needs. A function or form joins only if it is one of .table's own or a published standard defines it (D38: OpenFormula first), so it converts to that standard's formula text and back (Leslie: "the stored version should match what we already have and be easily transpilable"). No one application's formula language is the test.

Considered.

  • A cell's formula inside its row ("@cells": {…} on the row): one file to keep in step, but the format's own data among a person's values, and every field name beginning with @ reserved, which would break a file that already has one.

D53: a view may colour rows and cells by their values; three more number formats

Decided by Leslie (23 Oct 2026). Open to revisit. Additive: no formatVersion change.

Seven apps were compared: Excel, Numbers, Google Sheets, LibreOffice Calc, Airtable, Notion and Coda. Spreadsheets style each cell (fills, fonts, borders, any colour). Database apps never style a single cell: formats are per field, and colour comes from rules in a view or from coloured choices. .table already works the second way. What all seven have, and .table didn't, is colour driven by values.

  • Colour rules in a view (colors): a filter and a named colour, for the row or one cell. In the view, not on the cells, so the same table can be coloured differently for different people's work, and the colour always follows the data (PRIOR-ART, "Cell-level decoration").
  • The choice colours, not hex. Fourteen names each reader maps onto its own light and dark themes (D43), as choices already are.
  • scientific:N, fraction, :parens. Number formats spreadsheets have and an import needs, in the closed vocabulary the field format already is.

Not adopted. Styling single cells by hand (fills, bold, borders, fonts): only the spreadsheets have it. An importer reports what it can't carry.

D54: a repeated row id is one row, the first; a later copy that differs is kept as it is

Decided by Leslie (23 Oct 2026). Open to revisit. Additive: no formatVersion change.

New rows go at the end of the last rows file (D51), so two git branches that add rows conflict. Merging the rows files with merge=union keeps both sides' lines, and a row changed on both sides comes out twice (#620).

  • The first copy is the row. Not the last: a reader that hands rows on as it reads them (a large table into its index, a table drawn before its rows are read, #603) can't take back a row it has handed on. The same rule now holds for a cell's formula lines (D52).
  • A later copy that differs is kept as it is, as a line the reader can't read is (D25): the two copies are two people's edits, and dropping either quietly is the loss D25 exists to prevent. The person sees it when the table opens, and in the file.
  • A later copy that is the same exactly is left out. Union repeats unchanged lines next to changed ones; keeping those would leave every merge with lines to fix that lose nothing when they go.
  • merge=union is advice, not the format. It's how a person keeps a table in git; the format only says what a reader does with what a merge leaves.

Not adopted: the last copy wins (D52's first rule for cells, changed to match); collapsing every repeat on the next save.

D55: today, now and rand come back

Decided by Leslie (Oct 2026: "bring back"). Open to revisit. Additive: no formatVersion change.

D32 left today and now out because a formula whose answer changes with the clock isn't pure. Spreadsheet users expect them (a due date against today, a timestamp), and OpenFormula defines TODAY(), NOW() and RAND().

  • Read once for a computation. Every cell worked out together sees the same moment and the same source of chance, as a spreadsheet recalculates. today is the reader's own date, as a date is stored (YYYY-MM-DD); now the instant in UTC; rand a number from 0 up to 1.
  • Never stored, never remembered. Results aren't stored anyway (D21). Nothing keeps them between computations either: a formula that reads the clock or chance isn't its row's alone, so a table that uses one is worked out whole each time it's read, and isn't held in an index, whose results would go stale.
  • What D29 relies on still holds: the stored form is the same; only the answer depends on when it's asked.

D56: an any field holds a value of any kind, as a spreadsheet column does

Drafted for Leslie (23 Oct 2026; "any value: yes"). Open to revisit. Built: "Any value" in the type picker, and a spreadsheet column mostly of numbers with some words opens as one. Additive: no formatVersion change.

A spreadsheet's column holds a number in one row and text in the next. Every .table field has one type, so an import had to choose one and lose the rest, or fall back to text and lose the numbers. any keeps each value's JSON kind as it is. Sorting goes kind by kind, and a filter compares like with like, so nothing is coerced behind a person's back.

D57: a cell may have a note

Drafted for Leslie (23 Oct 2026; "cell comments: yes"). Open to revisit. Built: Shift+F2, as spreadsheets have it, or a row's Cell Note…; a mark in the cell's corner and the note on hover. Additive: no formatVersion change.

A spreadsheet's cell note (Excel's notes, Sheets' notes, Numbers' comments) is text attached to one cell, outside its value. It goes on the cell's cells/ line (D52) as note, beside or instead of an expr. A line with only a note leaves the value alone, so a reader that ignores note loses nothing it needs. Threaded comments with authors and replies are a collaboration feature: they belong to the app (Workspace's comments), not to the file.

D58: views freeze rows and columns, hide rows, and merge cells

Drafted for Leslie (23 Oct 2026; "merged cells, frozen panes, hidden rows and columns: yes"). Open to revisit. Built: hidden rows; frozen columns (the apps freeze a view's first frozen.columns on a wide window, always leaving one to scroll; View Settings sets it: Freeze); frozen rows on Linux and the web (the header stays too, and alone when the view doesn't say). merged cells drawn (mergedBlocks in core says which can be). A row's menu merges and unmerges them (Merge Cells…, as B2:C4). Not built yet: frozen rows on iOS and the Mac. Additive: no formatVersion change.

  • Frozen rows and columns are how a view is looked at, so they're the view's (frozen), as column widths are.
  • Hidden rows are the view's too (hidden): a row left out by hand, not by a rule. A Sheet view keeps their numbers, as it does for filtered rows. Hidden columns were already there: a view's fields.
  • Merged cells are layout, kept in the view (merged), in a Sheet view only, and by row id, so a sort can't merge the wrong cells. The cells under a merge keep their values. Nothing in the data changes, so a formula reads them as ever.

D59: a spreadsheet without a header row

Drafted for Leslie (23 Oct 2026; "no header: an option"). Open to revisit. Built: the apps tell a headerless sheet by itself (firstLineIsData), a first line of numbers, dates or yes/no where the column below has them.

Not every sheet starts with headings. tableFromCSV(csv, { header: false }) reads the first line as a row and names the fields for their columns (A, B, C…), each with that as its title, for the person to rename. It's a converter's option, not the format's: a .table always names its fields.

D60: circular references may be worked out by iteration

Drafted for Leslie (23 Oct 2026). Open to revisit. Built: a table's own meta.json asks for it, and a looping cell's formula panel sets it (Repeat Until It Settles: 100 passes, to 0.001, Excel's defaults) and takes it away.

A loop between formulas is #REF! (D32): no answer is better than a wrong one. A spreadsheet can instead iterate, repeating the calculation until it settles, for models that mean to loop (interest on a balance that includes the interest). A table may ask for that in meta.json (iteration: { max, change }), with the spreadsheet's meaning: a loop reads what the pass before gave (0 on the first: from empty, every pass would stay empty, D32), repeat up to max passes, stop when no number changes by more than change. Without it a loop stays #REF!.

Held, from the same list: LET, LAMBDA and named ranges. The stored form takes a function only when a published standard defines it (D52), and OpenFormula 1.4 defines none of these (LET and LAMBDA are Excel's own). A named range is closest to a name for a place in a Sheet view (D41), which can be drafted when it's wanted.

D61: a failed formula is shown in plain words, marked by its kind

Leslie (25 Oct 2026, #685). Built on the web, Linux, iOS and the Mac (#688, #689, #690, #691).

The file and every evaluator keep the spreadsheet codes (#DIV/0!, #VALUE!, #NAME?, #REF!, #NUM!, D32): they are what a failed formula is, and what reaches anything that uses it. What an app shows is another matter. A code says something went wrong, not what, nor that it can be fixed. So Workspace's apps show a few plain words in every formula syntax, and keep the code where a spreadsheet user looks for it: first in the hover, and beside the words in the formula's panel when formulas are shown Excel style.

The words come from the code and the evaluator's message. Both evaluators (the workbook and the EDN core, #638) give the same messages, and the check that compares them covers the messages too. The words are table-ui's formulaErrorShow; each renderer only draws them.

Each kind has its own mark, so a column of errors can be read at a glance before anyone opens one. The kinds are sorted by what fixing one takes:

Kind The cell says Mark (Lucide on the web and Linux / SF Symbol on iOS and the Mac)
Loop Loops back on itself refresh-cw / arrow.triangle.2.circlepath
Points at something gone No field "price", No table "deals", No view "by-date", Row is gone, No row there, Column isn't in the view unlink / questionmark.square.dashed
Doesn't fit the column Not a date, Not a whole number, Not true or false, Not text, Not a map point (and the like, by the field's type), Number too big equal-not / notequal
Can't be worked out Divides by zero, Wrong kind of value, Wrong number of inputs, Unknown function triangle-alert / exclamationmark.triangle

Hovering, or on iOS the selected cell's details, says what went wrong and where the fix is: opening the formula, whose panel offers Repeat Until It Settles for a loop (D60). A true/false cell whose formula failed shows its error, not an unticked box, which would read as false.

Every one of these is in fixtures/formula-errors.table: a row each, its cell's own formula giving that error, for seeing them all at once on each platform.

D62: every field has an id, and every id is z-base-32

Leslie (25 Oct 2026). Built in table-core; every fixture rewritten.

A field was identified by its name, kept stable by never renaming it (section 2, "Schema evolution"). That made the name do two jobs: the readable key in rows and formulas, and the field's identity. Now each field also has an id (SPEC section 2, "A field's id"): 13 z-base-32 characters, minted when the field is made, never shown, never changed. name stays the key, so files stay readable as text, and title the label. Ids are added beside names, not in their place: rows keyed by id would read {"k3x9q2m7v1pa": 12} in a text editor, a diff or another tool.

What an id gives, with or without peer-to-peer sync:

  • A link to a field that survives anything done to it, renaming included, once renaming lands.
  • Two people adding "notes" on two devices, or two git branches, make two fields, not one field with two meanings: a new field's id is random.
  • A field removed and another added with its name are different fields, so old values can't be read as the new one's.
  • A field whose name is itself sensitive can be referred to by its id alone, its name kept sealed (the Workspace Protocol's hidden schema entries, workspace-format.md).

Older files. A field without an id takes one derived from its name (FNV-1a, mixed by MurmurHash3's finaliser): the same on every device and at every save, so a file opened on two devices doesn't get two sets of ids. Readers do this, so a file another tool wrote still opens.

Cost. On the rig, a random field id takes about 1 µs, a row id about 2 µs, a derived field id about 3 µs, once per field; a phone a few times that. Ids are made once, when the thing is made.

The alphabet (D23, amended), weighed against the others, at about 62 bits:

Alphabet Characters Length Against it
Decimal 0-9 19 long; tools read it as a number
Hex 0-9a-f 16 long
RFC 4648 base32 A-Z2-7 13 upper case by convention
Crockford base32 0-9A-Z less ILOU 13 a second alphabet beside the protocol's
z-base-32 (chosen) ybndrfg8ejkmcpqxot1uwisza345h769 13 one character longer than base36
Base36 (D23 as first made) 0-9a-z 12 look-alikes; not the protocol's
Base58 no 0OIl 11 mixed case: unsafe as file names
Base62 0-9a-zA-Z 11 mixed case
Base64url A-Za-z0-9-_ 11 mixed case, punctuation
Base85 printable ASCII 10 quotes and slashes break JSON and links
Proquints syllables 4 groups long; for reading aloud
Word lists words 6 words longest

z-base-32 is lowercase, has no look-alikes, wastes none of the random bits (32 is a power of two), and is what Workspace and Holepunch already write.

D63: a field may be renamed, and every use of its name is rewritten

Leslie leaned towards it when field ids were agreed (25 Oct 2026); built 26 Oct 2026.

A field's name was never to change ("Schema evolution", before): it was both the key rows and formulas read it by and the field's identity, so changing it would break everything that named it. With D62 the field has an id for its identity, and the name is only the key. So a field may now be renamed, as a spreadsheet's column may: the new name is written everywhere the old one was used, in one save, and the id stays.

Where a name is used, all rewritten (table-core's renameField):

  • the field itself, and primaryKey;
  • every row's key;
  • every view's keys that name a field: fields, sort, filter, group, columnWidths, totals, colors, merged, calendar_range, board_field, gallery_field, calendar_field and calendar_end_field;
  • cells/ lines;
  • every formula that reads it, in its table or another of the same .table: a bare word, and field, values, related, linked, at and range. A formula that doesn't read it is left as it is, to the byte; one that does is written in the stored form's canonical spelling; one in another dialect is left;
  • every relation whose field is it.

Not rewritten: history.ndjson, which records what was (its lines before the rename name the field as it was then), and links in other documents. A link that names the field by id (SPEC section 10) still finds it; one that names it by name doesn't.

Not yet: a table held in the index (a large one) has its rows there, and renaming would write every row again, so its fields aren't renamed in the apps yet.

The title stays what a person reads, and changing it changes nothing else. Renaming is for when the name formulas read should change too.

D64: a row's page is named for its row; a view's id is short

Leslie (27 Oct 2026). A .table is to be read by people, even when they don't edit it, and bodies/wexwuo344aoowkqiieeb8fk56z.md tells a person nothing. A page is now bodies/atlas-freight--wexwuo344aoowkqiieeb8fk56z.md: the row's title, --, its id (SPEC section 7).

  • The id still decides. The reader takes the row from the id after the first -- and never from the title, so a stale or hand-edited title breaks nothing, and a plain {id}.md still reads.
  • The id stays whole. It is the row's own id, 26 characters; a shorter one would be a second id per row.
  • A new title renames the page at the next save, so the folder reads like the table. It is one file moved, and only for a row with a page.
  • Titles are slugs: lowercase for case-insensitive file systems, letters and digits in any script, at most 40 characters.

A view's id is 13 characters, as a field's is (D62). The length follows how many there can be: rows and history entries run to millions, minted on many devices and merged, so 26 (130 bits); a table's views and fields are a handful each, so 13 (65 bits), which also keeps links short. Views stayed at 26 when D23's amendment came before D62 set the shorter length; that was never a decision. Views already minted at 26 stay valid: a reader takes any id.

D65: what's typed is kept, never refused for good

Leslie (27 Oct 2026). An editor that refuses an edit locks the reader in a cell they may not know how to fix, or loses what they typed. The rule is Google Sheets' and Numbers': what's typed is kept, and the cell says what's wrong.

  • Leaving a cell keeps the edit at once. A tap on another cell, or the editor closing, never asks and never drops.
  • A key asks once. Enter or Return with a problem says what it is; the same draft entered again is kept. (An early year, D42, already worked this way.)
  • A value the column can't hold is kept as typed, as a string; the cell shows "Not a number" (and the like), and validation reports it, as for any value of the wrong type in a file.
  • A formula that reads is kept as it stands, an unknown function as a call to it, which shows #NAME? (compileFormula's keepUnknownFunctions).
  • A formula that doesn't read is kept as typed, without its =. SPEC section 5 already says what a reader does with an expr that doesn't parse: the cell is empty and the reader reports it. The apps report it in the cell itself, "Formula can't be read", so it's never an empty cell with no reason.
  • Undo puts back what was there before, as for any edit.

Considered and not taken: Excel's and Airtable's, refusing until it's fixed or cancelled, which is the lock or the loss; and a mix (keep what reads, drop what doesn't), which has no rule a reader could guess.

D66: a table can say where it came from

Decided 27 Oct 2026. Either meta.json may carry source: { uri, format, retrieved_at }, the address it came from, the media type it was in, and when it was read (SPEC section 5).

It records origin and does nothing else. Reading, computing and writing are the same with or without it, and no app fetches the address. That keeps it safe to copy from a file someone sends: an address in it is a fact about the past, not an instruction.

One object, not a list: a table made by merging several sources says so in its description. A media type rather than a name of our own, because one exists for every format worth naming. The same idea as a TextBundle's sourceURL in its info.json, so a document and a table copied from the web carry their origin the same way.

D67: borrowed from Data Package, under its names

Where Frictionless Data Package v2 and its Table Schema already name something a table needs, .table takes it under the same name and meaning: the yearmonth type, the exclusiveMinimum and exclusiveMaximum constraints, uniqueKeys, missingValues, a field's example and rdfType, and the bundle's licenses, contributors, keywords and version.

Why: D9 still holds; .table is not a Frictionless superset and keeps its own format, enum and relation. But where a standard already has the word, inventing another only makes the formats further apart for nothing. Each of these is something a table needs anyway (a combination that must be unique, a licence, a column's meaning in a shared vocabulary), and taking Table Schema's names keeps a converter to and from Data Package close to a copy.

Status: specified; table-core and the apps don't read or check them yet (#836).

D68: format as Table Schema means it; display and categories

A field's format says how its stored value is written, as Table Schema's does: email, uri, uuid or binary for a string, default otherwise. How a value is shown, which format held until now, is display (currency:GBP, percent, long, relative, phone, markdown). A link is format: "uri" (it was "url"). A field's choices, with their labels and colours, are categories, as Table Schema's are; constraints.enum keeps its plain meaning.

Why: a table's schema.json beside its CSV export is then a Table Schema that Frictionless tools read as intended. Before, a date column with "format": "long" read there as a date pattern that matched nothing. Nothing a table could say is lost: every display token and every choice's label and colour has a place. D9 still holds: .table is its own format, and relation stays on the field (D10).

Reading older files: readers take the old form for good (a display token in format, url, choices in constraints.enum), and every write puts a schema in the new form, so a file is converted the next time it is saved. scripts/migrate-d68.mts converts every table under a folder at once (#839).