Description
Zathras is introducing UUIDs to support better tracking and linking of test results across the pipeline. Chronicler's schema needs to include three new UUID fields to align with this change.
Required Changes
Add the following UUID fields to the Chronicler schema:
project_uuid - Identifies the parent project/test suite
run_uuid - Identifies the specific test run/execution
result_uuid - Identifies the individual result document
Affected Components
Primary: chronicler/src/chronicler/schema.py
The UUID fields should be added to the Metadata dataclass:
@dataclass
class Metadata:
"""Document metadata section"""
document_id: str
document_type: str = "zathras_test_result"
zathras_version: str = "1.0"
# UUIDs for tracking
project_uuid: Optional[str] = None
run_uuid: Optional[str] = None
result_uuid: Optional[str] = None
# Timestamps
test_timestamp: Optional[str] = None
# ...rest of existing fields...
Secondary: Schema validation
Update validate_json_schema() if these fields should be validated (format checks, required vs optional).
Context
- Zathras is introducing UUID-based tracking for better result correlation
- UUIDs enable linking results across different indices and systems
- This change supports the OpenSearch migration to v2 schema
Implementation Notes
- All three UUID fields should be optional (
Optional[str]) to maintain backward compatibility
- UUIDs should be included in the
to_dict() method output when present
- Consider whether UUIDs should be excluded from
calculate_content_hash() (likely yes, as they're identifiers not content)
Testing
- Verify schema serialization/deserialization with UUIDs present and absent
- Confirm backward compatibility with documents that lack UUID fields
- Update
test_schema.py with UUID test cases
Related Files
chronicler/src/chronicler/schema.py - Main schema definition
chronicler/tests/test_schema.py - Schema validation tests
- Downstream: OpenSearch index mappings may need updates to include these fields
Priority: Medium
Type: Enhancement
Component: Schema
Description
Zathras is introducing UUIDs to support better tracking and linking of test results across the pipeline. Chronicler's schema needs to include three new UUID fields to align with this change.
Required Changes
Add the following UUID fields to the Chronicler schema:
project_uuid- Identifies the parent project/test suiterun_uuid- Identifies the specific test run/executionresult_uuid- Identifies the individual result documentAffected Components
Primary:
chronicler/src/chronicler/schema.pyThe UUID fields should be added to the
Metadatadataclass:Secondary: Schema validation
Update
validate_json_schema()if these fields should be validated (format checks, required vs optional).Context
Implementation Notes
Optional[str]) to maintain backward compatibilityto_dict()method output when presentcalculate_content_hash()(likely yes, as they're identifiers not content)Testing
test_schema.pywith UUID test casesRelated Files
chronicler/src/chronicler/schema.py- Main schema definitionchronicler/tests/test_schema.py- Schema validation testsPriority: Medium
Type: Enhancement
Component: Schema