writeonce/scripts
shoney.arickathil b74e13d21e feat(db): durable:false skips the WAL append and replay
Task 4 of docs/superpowers/plans/2026-08-26-table-residency.md — the first
behavioural change in the iteration.

- db.c: one predicate, `table_is_durable`, gating the three EXISTING mutation
  sites. Kept as a function rather than an inlined condition so
  database/src/CODE-LOGIC.md's "nothing else may mutate storage" claim keeps
  holding — the choke points stayed three
- the ack contract is untouched for durable tables: RAM applied, record
  staged, one commit before the ack, and a failed commit still removes the row
- replay: a log holding records for a class the image now declares volatile is
  a real migration case, not corruption. apply_record returns -2 (distinct
  from -1), wo_wal_replay_ex reports the class id, and main.c names it and
  exits 2. `wo_wal_replay` stays as the NULL wrapper, so all 156 WAL unit
  checks are untouched
- measured, not asserted: 50 inserts wrote 1500 WAL bytes into a durable
  table and ZERO into a volatile one. The file's SIZE proves nothing (it is
  fallocate'd to 1 MiB up front), so the gate measures the non-zero prefix

BUG I INTRODUCED AND CAUGHT: the mismatch message first printed the class name
with %s, but wo_str.data is `char data[]` with NO NUL terminator (obj.h) — a
buffer over-read. Now %.*s with the explicit length, and re-verified under
ASan.

New gate `just residency` (8 checks), because everything above was otherwise
a one-off manual measurement: restart behaviour, the zero-byte write path, the
mismatch refusal (exit 2, names the class, NOT reported as corruption), and
both compile-time refusals. Its own first run failed two checks for a bug in
the script rather than the feature — `woc | grep` under `set -o pipefail`
returns woc's exit 1 even when grep matches, since woc exits 1 whenever it
reports diagnostics. Captures first now, with the reason noted inline.

Also new: corpus run/table-volatile-inprocess pins that a volatile table is a
FULL table in-process — same @unique enforcement, same index probe, same query
surface. Only survival differs, and that is unobservable from inside one
process.

Gates: woc-test 557/0, 18 runtime suites 0 fail, cli_smoke OK, oop-e2e 119/0
(was 118), residency 8/0, employee 8/0, db-actor 8/0, site 21/0, ASan clean on
the new replay path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 08:23:49 +02:00
..
db-actor-accept.sh feat: arc stage 3 T7 — transparent DB actor (WO_T_DB hole closed) 2026-08-21 13:10:26 +02:00
db-bench.py feat: bounded mailboxes + WO_T_ACTOR (trap 13); try-arm place-copy fix 2026-08-23 01:05:13 +02:00
deps-accept.sh test: deps-accept — iteration 15's gate (Task 4) 2026-08-19 19:21:32 +02:00
employee-accept.sh feat: FK restrict on delete + employee sample runs; group-by parked (9b) 2026-08-16 18:37:23 +02:00
fibers-accept.sh feat: cross-shard actors — placement, envelopes, home-routed frees, WO-E222 (arc T6) 2026-08-20 12:06:13 +02:00
install-accept.sh feat: installable toolchain — version, wovm self-locate, dist tarball 2026-08-18 01:19:20 +02:00
install-readme.tmpl.md feat: installable toolchain — version, wovm self-locate, dist tarball 2026-08-18 01:19:20 +02:00
linkcheck.py docs: audit all markdown against the code, fix findings, flatten status folders 2026-08-26 19:20:22 +02:00
log-watcher-accept.sh fix: close per request, soak the daemon, kill five soak-found leaks (Tasks 5+6) 2026-08-15 00:32:49 +02:00
mkdist.sh feat: installable toolchain — version, wovm self-locate, dist tarball 2026-08-18 01:19:20 +02:00
oop-e2e.sh feat: cross-shard actors — placement, envelopes, home-routed frees, WO-E222 (arc T6) 2026-08-20 12:06:13 +02:00
residency-accept.sh feat(db): durable:false skips the WAL append and replay 2026-08-27 08:23:49 +02:00
single-binary-smoke.sh feat: milestone 1 complete — .wob emitter, conformance corpus, single binary; GC redesign specced 2026-08-11 19:31:26 +02:00
site-accept.sh refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00
web-app-accept.sh refactor(porch): name the web framework porch, fix the wo.toml identifier claim 2026-08-26 19:36:34 +02:00