docs: Verify and document append-only immutability guarantees #136
Reference in New Issue
Block a user
Delete Branch "issue-60-"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR completes issue #60 by documenting and verifying that the Aether event store provides immutability guarantees at multiple levels: interface design, storage implementation, and tests.
The EventStore interface is append-only by design - it provides no Update or Delete methods. JetStreamEventStore implements this with file-based storage and a limits-based retention policy that ensures events are immutable during their lifetime.
Changes
Testing
All immutability tests pass:
All existing tests continue to pass with no regressions.
Closes #60
Co-Authored-By: Claude Code noreply@anthropic.com
Code Review: Changes Requested
Issues:
store/memory.go:30-32- Errors from json.Marshal and json.Unmarshal are silently discarded. While Event should always be JSON-marshallable, ignoring errors is bad practice and could mask future bugs if struct fields change.Suggestions:
Fixed review feedback
Code Review: Approved ✓
Error handling for json.Marshal and json.Unmarshal properly implemented with appropriate panic behavior documented. All tests passing including new immutability verification tests.
78aaea9330to6549125f3d