writeonce/docs/stories/language-runtime-database
shoney.arickathil 5943bf6890 docs: iteration 9b spec + plan — @table, relations, query (employee)
- spec settles 9b's three forks: SQL/Cypher layer superseded as the
  program surface (design history + wo-db engine-semantics reference);
  comprehension syntax desugared at compile time (no function values);
  System.Linq = operator vocabulary + edge cases, PostgreSQL = execution
  + integrity vocabulary (both references surveyed 2026-08-15)
- aggregate semantics normative: count/sum total 0 on empty, avg/min/max
  are ?T with nil (empty is data, not a fault); nil skipped; sum wraps
  like language arithmetic; GroupBy lowers as group-and-reduce
  (AggregateBy shape), transition/finalize ABI from nodeAgg
- relations: ref = FK with direct-index-probe check (nil passes,
  unchanged-key skips), backlink = secondary-index scan, delete is
  restrict-only; nil never joins, nil is a legal group key
- lowering: the compiler is the planner — queries become bytecode loops
  over cursor/group builtins, longest-prefix index selection, no plan
  tree, no SQL text in the image (disassembly-provable)
- plan: 6 tasks gated by a new docs/examples/employee sample
  (Department/Employee, @unique, composite index, ref/backlink,
  GroupBy report mode) with its own acceptance script + crash step;
  blocked on iteration 9's engine plan
- story 09b + status board updated; 02-wo-language.md carries the
  supersession note

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-15 09:10:08 +02:00
..
00-story.md feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
01-principles-doc.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
02-vm-core.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
03-compiler-front.md docs: compiler front-end specifications and plans (Tasks 2-6) 2026-08-10 09:11:04 +02:00
04-single-binary-e2e.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
05-language-surface.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
06-program-mode-stdlib.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
07-logwatcher-proof.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
07b-inferred-gc-mark-sweep.md docs: reprioritise to log-watcher-executable only; update stories and plans 2026-08-14 22:16:14 +02:00
08-shard-actor-runtime.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
09-database-engine.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
09b-table-relations-query.md docs: iteration 9b spec + plan — @table, relations, query (employee) 2026-08-15 09:10:08 +02:00
10-http-service.md language-runtime-database iterations 2026-08-07 19:36:49 +02:00
11-fibers.md docs: story iterations 11-12 (fibers, blue-green deploy) 2026-08-10 09:58:52 +02:00
12-blue-green-deploy.md docs: story iterations 11-12 (fibers, blue-green deploy) 2026-08-10 09:58:52 +02:00