Expand description
Git-backed event store satisfying the GASP store contract (the rules
restated inline here are authoritative for this crate; the full spec lives
in the gasp repo’s SPEC.md):
- Durable append, boundary commit. Every
appendopens the log in append mode, writes, flushes, and fsyncs (plus a parent-directory fsync when the log file is first created), so a crash loses at most the batch being written. A crash mid-write can leave a torn final line;scanreports it with a recovery hint rather than reading past it.commit_runmakes the one closing git commit per run boundary. - The lease lives inside the append path.
appendtakes or renews the cross-process lease at.agent/lease(local-only, gitignored) before writing; acquisition races on the lease file are decided by an atomic exclusive create.worker_idMUST be unique per worker — two processes sharing a worker id are treated as the same writer. Residual caveat: stealing an expired lease has a narrow three-process race window, and file-based leases are advisory on network filesystems.
Structs§
Constants§
Functions§
- init_
agent_ repo - Convenience for examples/tests: initialize a git repo suitable as an agent repo (git init + minimal AGENT.md/identity), returning the store.