Implement the writer for the hot segment — the active-ingest store that owns one Chunk's events while it's being filled.
Scope:
- Per-ledger ingest: write events to storage, update in-memory bitmap mirror, update ledger offset array — all atomic in one batch.
- Up-front validation: ledger must be in the chunk's range AND must be the next-expected ledger (no duplicates, no gaps).
- Per-ledger commit with fsync and durability guarantees.
- Open / Close lifecycle; warmup on reopen to reconstruct the in-memory mirrors from the on-disk caches.
Out of scope (separate issues):
Add tests for write correctness, per-ledger durability, sequence validation, and reopen-after-close recovery.
Implement the writer for the hot segment — the active-ingest store that owns one Chunk's events while it's being filled.
Scope:
Out of scope (separate issues):
Add tests for write correctness, per-ledger durability, sequence validation, and reopen-after-close recovery.