From 1ab12346a7711ac288461e193fe36a59882cb051 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Fri, 3 Apr 2026 19:06:10 +0000 Subject: [PATCH 1/2] docs(api): add DomainBaseModel to core API reference Document the new DomainBaseModel base class introduced in PR #1941. Adds a dedicated section at the top of docs/api/core.md covering the class signature, model_config semantics table, and a usage example. ISSUES CLOSED: #1941 --- docs/api/core.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/docs/api/core.md b/docs/api/core.md index 82c3b7431..23d7e0b4b 100644 --- a/docs/api/core.md +++ b/docs/api/core.md @@ -6,6 +6,56 @@ the entire CleverAgents platform. --- +## Domain Base Model + +**Module:** `cleveragents.domain.models.base` + +### `DomainBaseModel` + +```python +from cleveragents.domain.models.base import DomainBaseModel + +class DomainBaseModel(BaseModel): + model_config = ConfigDict( + str_strip_whitespace=True, + validate_assignment=True, + arbitrary_types_allowed=False, + populate_by_name=True, + use_enum_values=True, + ) +``` + +Shared Pydantic base class for all standard domain-layer models. Inherit +from `DomainBaseModel` instead of `pydantic.BaseModel` directly to get the +canonical domain-layer configuration in one place. + +**Configuration semantics:** + +| Setting | Effect | +|---------|--------| +| `str_strip_whitespace` | Leading/trailing whitespace stripped from all `str` fields on assignment and validation | +| `validate_assignment` | Field assignments after construction are validated like constructor arguments | +| `arbitrary_types_allowed=False` | All field types must be Pydantic-compatible — keeps the domain layer clean | +| `populate_by_name` | Models can be constructed using either the Python field name or the JSON alias | +| `use_enum_values` | Enum fields are stored and serialised as their underlying primitive values | + +**Usage:** + +```python +from cleveragents.domain.models.base import DomainBaseModel +from pydantic import Field + +class MyDomainModel(DomainBaseModel): + name: str + count: int = Field(ge=0) +``` + +> **Note:** This class was introduced in v3.7.0 (PR #1941) to eliminate the +> duplicated `model_config` that previously appeared in 14 separate domain +> model files. It is a pure structural refactor with no behavioral changes. + +--- + ## Exception Hierarchy All exceptions inherit from `CleverAgentsError`. Catch the most specific -- 2.52.0 From c1b09b901439c2fb2c5b7257479f7ff7173729b8 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Fri, 3 Apr 2026 19:30:20 +0000 Subject: [PATCH 2/2] docs(changelog): add CI template DB extension entry for PR #2399 Document the noxfile improvement that extends the pre-migrated SQLite template database to slow_integration_tests and e2e_tests sessions, eliminating redundant Alembic migrations across all test suites. ISSUES CLOSED: #2334 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fde1e4f..7ce57615e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,15 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). previously duplicated across 14 domain model classes. This is a pure structural refactor with no behavioral changes. (#1941) +- **CI — Pre-migrated database template extended to all test suites**: The + `slow_integration_tests` and `e2e_tests` nox sessions now call + `_create_template_db()` and set `CLEVERAGENTS_TEMPLATE_DB` before running, + matching the fast-path DB copy already used by `unit_tests`, `integration_tests`, + and `coverage_report`. `slow_integration_tests` is also upgraded from `robot` to + `pabot` for parallel Robot Framework execution, consistent with `integration_tests`. + This eliminates redundant Alembic migrations across all test suites and reduces + total test suite wall-clock time. (#2334) + ### Fixed - **CLI — `agents actor add` rich output**: The `actor add` command now renders -- 2.52.0