UAT: Session export schema version is "1.0" but spec defines "v3" #1344

Open
opened 2026-04-02 16:56:34 +00:00 by freemo · 0 comments
Owner

Bug Report

Feature Area: Session export/import — schema version

What Was Tested

The EXPORT_SCHEMA_VERSION constant in src/cleveragents/domain/models/core/session.py was compared against the specification's documented schema version.

Expected Behavior (from spec)

The specification shows the export schema version as v3 in the CLI output example:

Contents
  Messages: 6
  Plan References: 1
  Metadata Keys: 2
  Actor Config: included
  Schema Version: v3

And in the JSON output:

"contents": {
  "messages": 6,
  "plan_references": 1,
  "metadata_keys": 2,
  "actor_config": "included",
  "schema_version": "v3"
}

Actual Behavior

The code defines:

# src/cleveragents/domain/models/core/session.py line 58
EXPORT_SCHEMA_VERSION = "1.0"

The exported JSON contains "schema_version": "1.0" instead of "v3".

Steps to Reproduce

from cleveragents.domain.models.core.session import Session, EXPORT_SCHEMA_VERSION
from ulid import ULID

session = Session(session_id=str(ULID()))
export_data = session.as_export_dict()
print(export_data['schema_version'])  # Outputs: "1.0"
print(EXPORT_SCHEMA_VERSION)          # Outputs: "1.0"
# Expected: "v3"

Impact

  • Any tool or system that validates the schema version against the spec-documented v3 will reject exports produced by this implementation.
  • The import validation in session_service.py line 239 checks schema_version != EXPORT_SCHEMA_VERSION, so it will reject files exported by a spec-compliant system that uses v3.

Code Location

  • src/cleveragents/domain/models/core/session.py line 58: EXPORT_SCHEMA_VERSION = "1.0"
  • src/cleveragents/application/services/session_service.py line 239: schema version validation

Severity

Medium — Schema version mismatch breaks interoperability with spec-compliant implementations and any documentation/tooling that references v3.

## Bug Report **Feature Area:** Session export/import — schema version ### What Was Tested The `EXPORT_SCHEMA_VERSION` constant in `src/cleveragents/domain/models/core/session.py` was compared against the specification's documented schema version. ### Expected Behavior (from spec) The specification shows the export schema version as `v3` in the CLI output example: ``` Contents Messages: 6 Plan References: 1 Metadata Keys: 2 Actor Config: included Schema Version: v3 ``` And in the JSON output: ```json "contents": { "messages": 6, "plan_references": 1, "metadata_keys": 2, "actor_config": "included", "schema_version": "v3" } ``` ### Actual Behavior The code defines: ```python # src/cleveragents/domain/models/core/session.py line 58 EXPORT_SCHEMA_VERSION = "1.0" ``` The exported JSON contains `"schema_version": "1.0"` instead of `"v3"`. ### Steps to Reproduce ```python from cleveragents.domain.models.core.session import Session, EXPORT_SCHEMA_VERSION from ulid import ULID session = Session(session_id=str(ULID())) export_data = session.as_export_dict() print(export_data['schema_version']) # Outputs: "1.0" print(EXPORT_SCHEMA_VERSION) # Outputs: "1.0" # Expected: "v3" ``` ### Impact - Any tool or system that validates the schema version against the spec-documented `v3` will reject exports produced by this implementation. - The import validation in `session_service.py` line 239 checks `schema_version != EXPORT_SCHEMA_VERSION`, so it will reject files exported by a spec-compliant system that uses `v3`. ### Code Location - `src/cleveragents/domain/models/core/session.py` line 58: `EXPORT_SCHEMA_VERSION = "1.0"` - `src/cleveragents/application/services/session_service.py` line 239: schema version validation ### Severity **Medium** — Schema version mismatch breaks interoperability with spec-compliant implementations and any documentation/tooling that references `v3`.
freemo self-assigned this 2026-04-02 18:45:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#1344
No description provided.