Skip to content

Implement Stable Domain Models for Herald#8

Merged
jorisvilardell merged 7 commits intomainfrom
7-data-plane-action-dispatcher
Feb 9, 2026
Merged

Implement Stable Domain Models for Herald#8
jorisvilardell merged 7 commits intomainfrom
7-data-plane-action-dispatcher

Conversation

@jorisvilardell
Copy link
Collaborator

This pull request refactors and expands the core domain model for the aether-herald-core library. 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:

  • Introduced new domain types: DeploymentId, Deployment, and DataPlaneId in 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]
  • Refactored the Action model: replaced previous enum-based action kinds and normalization logic with a simplified struct containing deployment_id, resource, kind, and payload fields. Also added the ActionEvent struct for agent consumption. (libs/aether-herald-core/src/domain/action.rs)

Error Handling Improvements:

  • Moved the HeraldError enum into its own module and used the thiserror crate 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:

  • Updated repository and service traits to use the new domain types and async_trait, simplifying interfaces and aligning with async Rust best practices. (libs/aether-herald-core/src/domain/ports.rs)

Sharding Support:

  • Added a new ShardConfig struct with deterministic hashing logic to assign deployments to shards, supporting horizontal scaling. (libs/aether-herald-core/src/domain/shard.rs)

Dependency Additions:

  • Added async-trait as a dependency to support async trait definitions. (libs/aether-herald-core/Cargo.toml)

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
@jorisvilardell jorisvilardell self-assigned this Feb 3, 2026
@jorisvilardell jorisvilardell added help wanted Extra attention is needed good first issue Good for newcomers labels Feb 3, 2026
@jorisvilardell jorisvilardell linked an issue Feb 3, 2026 that may be closed by this pull request
8 tasks
Copy link
Owner

@NathaelB NathaelB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jorisvilardell jorisvilardell merged commit 9a11bfc into main Feb 9, 2026
3 of 5 checks passed
@jorisvilardell jorisvilardell deleted the 7-data-plane-action-dispatcher branch February 9, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Herald: Data Plane Action Dispatcher

2 participants