writeonce/database
shoney.arickathil c19a01564f feat(db2-7): WO_DATA=<file> — the store as one file, two refusals
- `wo_wal_resolve_data_path` (database/src/wal.c|h): an existing directory
  or a trailing `/` → `<dir>/shard-0.wal` byte for byte (the `//` after a
  trailing slash included); otherwise the path IS the log — opened if a
  regular file, created by `wo_wal_open` if absent under an existing parent.
- Refusals as codes for main.c: WO_WAL_PATH_NO_PARENT (out = the parent, so
  the line names it), WO_WAL_PATH_NOT_A_FILE (fifo/socket/device),
  WO_WAL_PATH_TOO_LONG (today's snprintf truncated silently).
- `parent_dir_of` shared by the resolver and `sync_parent_dir`: the parent
  checked at boot IS the parent fsync'd after a compaction/migration rename.
- runtime/src/main.c: the resolver replaces the unconditional
  `"%s/shard-0.wal"`; each refusal is one stderr line, exit 2 through the
  6a destroy sequence; never mkdir -p. The 6a block is untouched.
- Failing first: test_resolve_data_path — 4× -Werror (implicit declaration
  + three undeclared codes); green after: 21 assertions (dir, trailing
  slash, absent file, regular file, bare name, missing parent, parent is a
  file, fifo, two too-long).
- `make -C runtime test`: 21 suites, 8374 pass / 0 fail (was 8353/0).
  `make -C runtime wovm-asan` clean; smoke: file form seeds + replays with
  `app.db` the only artifact; missing parent and fifo refuse rc 2 naming
  path + parent; dir and trailing slash unchanged; WO_EPHEMERAL conflict
  inherited from 6a.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit b31bd4052624be460de1c18cf208661539397e09)
2026-09-15 01:16:13 +02:00
..
src feat(db2-7): WO_DATA=<file> — the store as one file, two refusals 2026-09-15 01:16:13 +02:00