Implement Stable Domain Models for Herald#8
Merged
jorisvilardell merged 7 commits intomainfrom Feb 9, 2026
Merged
Conversation
Add dataplane and deployment domain types and simplify Action struct from the previous normalized action model to a minimal Action type. Replace the old ControlPlaneActionSource and MessageBusPublisher traits with a single async ControlPlane trait (uses async-trait) exposing list_deployments and claim_actions. Update mod exports and add the async-trait dependency in Cargo.toml/Cargo.lock
Remove description field from Deployment and add dataplane_id of type DataPlaneId. Derive Hash for DeploymentId and implement new() and Display
Derive Hash for DataPlaneId and remove obsolete DataPlane and DataPlaneMode types
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and expands the core domain model for the
aether-herald-corelibrary. It introduces new domain types for deployments and dataplanes, simplifies and restructures the action/event model, moves error definitions into their own module, and updates repository and service traits to use the new types and async patterns. These changes improve clarity, extensibility, and support for future agent consumption.Domain Model Refactoring:
DeploymentId,Deployment, andDataPlaneIdin their respective modules, providing clearer representations for deployments and dataplanes. (libs/aether-herald-core/src/domain/deployment.rs,libs/aether-herald-core/src/domain/dataplane.rs) [1] [2]Actionmodel: replaced previous enum-based action kinds and normalization logic with a simplified struct containingdeployment_id,resource,kind, and payload fields. Also added theActionEventstruct for agent consumption. (libs/aether-herald-core/src/domain/action.rs)Error Handling Improvements:
HeraldErrorenum into its own module and used thethiserrorcrate for more ergonomic error definitions. (libs/aether-herald-core/src/domain/error.rs,libs/aether-herald-core/src/domain/mod.rs) [1] [2]Repository and Service Trait Updates:
async_trait, simplifying interfaces and aligning with async Rust best practices. (libs/aether-herald-core/src/domain/ports.rs)Sharding Support:
ShardConfigstruct with deterministic hashing logic to assign deployments to shards, supporting horizontal scaling. (libs/aether-herald-core/src/domain/shard.rs)Dependency Additions:
async-traitas a dependency to support async trait definitions. (libs/aether-herald-core/Cargo.toml)