feat(examples): demonstrate idempotent appends - #11
Conversation
yordis
commented
Sep 8, 2026
- Event IDs do not provide stream-wide uniqueness, which makes retry semantics easy to misuse for inventory operations.
- Executable evidence keeps client guidance aligned with the server concurrency guarantees.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview Introduces No changes to the client library implementation—only executable guidance and CI-backed behavior checks. Reviewed by Cursor Bugbot for commit 6603020. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe change adds API tests for append idempotency, wires them into single-node integration tests, and adds an executable reservation example that retries the same event. ChangesAppend idempotency
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to The reservation example documents retry behavior but cannot be run as a Cargo example in its current static library configuration, leaving the intended executable guidance unverified. Resolve the target configuration before merge. Sequence Diagram(s)sequenceDiagram
participant Example
participant TrogonEventstore
participant InventoryStream
Example->>TrogonEventstore: Create inventory-created event
TrogonEventstore->>InventoryStream: Store initial event
Example->>TrogonEventstore: Append inventory-reserved event
TrogonEventstore->>InventoryStream: Store reservation event
Example->>TrogonEventstore: Retry same event ID and revision
TrogonEventstore-->>Example: Return same write result
Example->>TrogonEventstore: Read stream
TrogonEventstore-->>Example: Return two events
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 4 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit retries one event in flight Comment |