writeonce/docs/superpowers/specs
shoney.arickathil da30aa6527 docs: amend principle 7 — the log is authoritative, residency is declared
- driving case: a 120 GB order table on a 32 GB host. Not a tuning problem;
  no eviction policy fixes it. Developer accepted reconsidering the principle
- principle 7 rewritten: durability half UNCHANGED and unconditional
  (WAL-logged, fsync before ack, CRC-dropped torn tail); residency half
  demoted from law to per-table declaration. Old wording quoted in place so
  the amendment is legible, with the reason: a doctrine a real workload
  cannot satisfy gets ignored, and the failure it produced was an OOM kill
- spec: docs/superpowers/specs/2026-08-26-table-residency-design.md
  One log-structured engine — the WAL already holds every row, so keep an
  in-RAM id->offset map and pread rows back. No second engine, no user-space
  row cache (the kernel page cache is the hot copy, which is already this
  repo's stated position and why it avoids O_DIRECT)
- arithmetic that makes it work: 240M rows x 16 B of index = ~3.8 GB
  resident in 32 GB. Indexes stay resident, rows do not. Buys ~2 orders of
  magnitude, not infinity — stated plainly in the spec
- grammar: two optional keys, `durable: true|false` and `resident: all|index`,
  both defaulting to today's behaviour, so all 28 existing @table
  declarations compile untouched and no golden is reblessed
- rejected, with reasons recorded: mmap (rows are pointer-bearing —
  table.c returns (uintptr_t)t as the slot word), buffer pool (the Rust-era
  phase-12 design that died with that track), paged B-tree (stays rejected),
  a three-valued enum, automatic spill, disk-backed-by-default
- self-review caught the budget defaulting to "none" while promising the ERP
  developer a diagnostic instead of the OOM killer — contradiction fixed:
  the budget defaults to a fraction of host memory, and its value comes from
  databasev2 1's swap-onset measurement
- live docs that contradicted the amendment updated (subagent doctrine,
  its guide, discarded.md's two rows, iteration 04's read claim, 07, 38);
  dated specs/plans left as records. linkcheck 0 broken / 0 anchors

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 22:42:27 +02:00
..
2026-08-01-oop-compiler-vm-design.md docs: iteration 7b migration — amend the normative docs (Phase 4) 2026-08-19 17:11:35 +02:00
2026-08-01-systems-track-design.md docs: status board at docs/00-status.md; gap-closure spec applied; recover lost doc 2026-08-10 23:42:26 +02:00
2026-08-03-blue-green-vm-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-07-logwatcher-sample-and-principles-design.md docs: compiler front-end specifications and plans (Tasks 2-6) 2026-08-10 09:11:04 +02:00
2026-08-10-logwatcher-gap-closure-design.md docs: status board moved to docs/stories/00-status.md 2026-08-21 10:07:20 +02:00
2026-08-11-inferred-gc-mark-sweep-design.md feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
2026-08-15-table-relations-query-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-18-web-framework-design.md docs: sync superpowers specs/plans to hold decision 2026-08-21 05:00:56 +02:00
2026-08-20-library-kind-internal-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-20-memory-db-features-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-20-shard-fiber-arc-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-21-db-bench-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-23-chat-websocket-actor-lifecycle-design.md docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
2026-08-23-net-seams-park-design.md feat: iteration 35 — net seams + the serving slice (fiber-per-connection) 2026-08-23 08:04:32 +02:00
2026-08-26-table-residency-design.md docs: amend principle 7 — the log is authoritative, residency is declared 2026-08-26 22:42:27 +02:00