Repository navigation
v0.0.4 - Crash harness & failpoint hooks
What's new
BeachDB now has a structured crash testing harness and an internal failpoint framework for exercising durability under process crashes and injected engine faults.
Crash harness (cmd/crash)
Replaces the previous kill-loop orchestrator with a controller/worker architecture:
- Deterministic workloads — pre-generated from a seed, fully reproducible
- NDJSON protocol — binary-safe controller↔worker communication over stdin/stdout
- Oracle verification — after every crash/reopen cycle, recovered state is checked against all acknowledged operations
- Replayable artifacts — each run writes a JSON artifact containing workload, events, cycle metadata, and any verification failure
- Subcommands:
crash run,crash replay,crash worker
Failpoint framework (internal/crashhook)
Environment-variable-armed crash and fault injection hooks wired into the engine:
- Crash points:
wal_after_append,wal_after_sync,flush_after_file_sync,flush_after_publish - Fault points:
wal_sync_error,sst_write_error,sst_publish_error
All hook sites are marked with // FAILPOINT: <name> for grep-ability.
Other changes
make crash-checkruns a short deterministic smoke rundocs/testing.mdupdated with harness and fault injection documentation- Engine-level subprocess tests for crash hooks (
engine/crashhook_test.go)