I-001: Single-Stream Command Execution (End-to-End) #137
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jwilger/eventcore!137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i-001-single-stream-command"
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
Implements core single-stream command execution infrastructure for EventCore, culminating in ADR-012's domain-first Event trait design. This PR delivers a working foundation for event-sourced commands with clean, idiomatic Rust patterns.
✅ Ready to Merge
This PR contains complete, tested, production-ready functionality. While I-001 will continue with additional features, this increment is self-contained and safe to merge.
Key Achievements
✅ Working Command Execution
execute()function orchestrates: load state → validate rules → persist eventsCommandLogictrait withapply()andhandle()methodsInMemoryEventStore✅ ADR-012: Event Trait for Domain-First Design
Event<T>to trait that domain types implementtype Event: Eventstream_id()method✅ Idiomatic Rust Patterns
FromIterator<E: Event>for StreamWrites enablescollect()thiserrorpreserves full contextFrom/Intotraits for NewEvents conversions✅ Quality Infrastructure
#[allow(dead_code)]TDD markersWhat's Included
Core Types
Domain Types
Architectural Decisions
Test Coverage
Test Status: All passing. No dead code. Clean working tree.
Implementation Details
Event Trait Design (ADR-012)
Domain types implement Event directly:
Commands produce events via
handle():Execute function leverages idiomatic patterns:
Migration Path
Non-breaking - New functionality only. No existing code affected.
What's Next (Future PRs)
While this PR is complete and ready to merge, I-001 will continue with:
Review Focus
The two most recent commits contain the key work:
feat(I-001): Implement ADR-012 Event trait for domain-first design- Core implementationrefactor: Add FromIterator for StreamWrites and improve error handling- Idiomatic polishReady to merge! 🚀
This provides a solid, tested foundation for event-sourced command execution while maintaining clean, idiomatic Rust patterns throughout.
Pull Request Overview
This PR implements core single-stream command execution infrastructure for EventCore, culminating in ADR-012's domain-first Event trait design. The implementation includes a complete, tested foundation for event-sourced commands with clean Rust patterns.
Key Changes:
Reviewed Changes
Copilot reviewed 86 out of 108 changed files in this pull request and generated no comments.
Show a summary per file
tests/single_stream_command_test.rssrc/store.rssrc/lib.rssrc/errors.rssrc/command.rsflake.nixCargo.toml.pre-commit-hooks/check-no-dead-code.shTip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.