Repository navigation
Description
Decision
We are restructuring the SDK following the DDD + Light Hexagonal architecture validated in the PoC branch.
This is not a proposal the architecture is proven and the design decisions are settled. (#199 , #301)
This issue tracks building the production SDK properly on a new branch, informed by the PoC.
The Split
The monolith client-python is divided into two packages with distinct responsibilities:
│ Package │ Role │
| --- | --- |
│ xtm-oaev-sdk │ Shared core: domain logic, data contracts, protocols, configuration, signature pipeline │
│ pyoaev │ Transport layer: HTTP client, connector runtime, OpenAEV concrete implementation │
xtm-oaev-sdk has no dependency on pyoaev .
pyoaev depends on xtm-oaev-sdk and implements its protocols.
The actual work not gonna be to 'rewrite the world in a different shape', simply split it in two.
So that, later one, we gonna have more freedom/ease to refactor/enhanced the code.
Architecture
Three explicit layers inside xtm_oaev_sdk :
public/ ← flat re-export surface;
contracts/ ← stable ports: protocols, data models, enums
_core/ ← private implementations
Dependency direction is strict and one-way.
contracts/ defines the interfaces.
_core/ implements them.
contracts/ never imports from _core/ .
This is the Light Hexagonal pattern:
contracts/ is the ports layer;
_core/ is the adapters layer.
Internal layout of _core/ may change freely;
Shim Strategy
During migration, pyoaev keeps backward-compatible __getattr__ -based shims that proxy old import paths to xtm-oaev-sdk and emit DeprecationWarning
# Old path, still works, warns
from pyoaev.helpers import ssl_cert_chain
from pyoaev.exceptions import OpenAEVError
# New path, clean
from xtm_oaev_sdk import ssl_cert_chain
from xtm_oaev_sdk import OpenAEVError
Once all connectors are migrated, the shim module is removed from pyoaev .
xtm-oaev-sdk becomes the sole source.
Status and Next Steps
Next:
- Create new branch; build xtm-oaev-sdk as production code from scratch, informed by the PoC
- Update pyoaev to declare xtm-oaev-sdk as a dependency and remove duplicated symbols
- Delete PoC branch once new branch is created and populated
- Migrate connectors to import from xtm_oaev_sdk directly.
- Remove shim module from pyoaev once connector migration is complete.
Activity