Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions specs/001-agentready-scorer/contracts/assessment-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
"overall_score",
"certification_level",
"attributes_assessed",
"attributes_skipped",
"attributes_total",
"findings",
"duration_seconds"
],
"anyOf": [
{"required": ["attributes_skipped"]},
{"required": ["attributes_not_assessed"]}
],
"properties": {
"schema_version": {
"type": "string",
Expand Down Expand Up @@ -60,7 +63,14 @@
"attributes_skipped": {
"type": "integer",
"minimum": 0,
"maximum": 25
"maximum": 25,
"description": "Canonical key name for skipped/not-assessed attributes"
},
"attributes_not_assessed": {
"type": "integer",
"minimum": 0,
"maximum": 25,
"description": "Deprecated alias for attributes_skipped (backwards compatibility)"
},
"attributes_total": {
"type": "integer",
Expand Down
2 changes: 1 addition & 1 deletion src/agentready/models/assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def to_dict(self) -> dict:
"overall_score": self.overall_score,
"certification_level": self.certification_level,
"attributes_assessed": self.attributes_assessed,
"attributes_not_assessed": self.attributes_not_assessed,
"attributes_skipped": self.attributes_not_assessed,
"attributes_total": self.attributes_total,
"findings": [f.to_dict() for f in self.findings],
"config": self.config.to_dict() if self.config else None,
Expand Down
2 changes: 1 addition & 1 deletion src/agentready/services/learning_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def extract_patterns_from_file(
certification_level=assessment_data["certification_level"],
attributes_assessed=assessment_data["attributes_assessed"],
attributes_not_assessed=assessment_data.get(
"attributes_not_assessed", assessment_data.get("attributes_skipped", 0)
"attributes_skipped", assessment_data.get("attributes_not_assessed", 0)
),
attributes_total=assessment_data["attributes_total"],
findings=findings,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/assessment_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def create_test_assessment_json(
"overall_score": overall_score,
"certification_level": certification_level,
"attributes_assessed": num_findings,
"attributes_not_assessed": 0,
"attributes_skipped": 0,
"attributes_total": num_findings,
"findings": findings,
"config": None, # CRITICAL: Must be present in current schema
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_learning_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def sample_assessment_file(temp_dir):
"overall_score": 85.0,
"certification_level": "Gold",
"attributes_assessed": 2,
"attributes_not_assessed": 0,
"attributes_skipped": 0,
"attributes_total": 2,
"findings": [
{
Expand Down Expand Up @@ -352,7 +352,7 @@ def test_extract_patterns_missing_assessment_keys(self, temp_dir):

def test_extract_patterns_with_old_schema_key(self, temp_dir):
"""Test extract_patterns handles old schema key names."""
# Old schema used "attributes_skipped" instead of "attributes_not_assessed"
# Old reports used "attributes_not_assessed" instead of "attributes_skipped"
old_schema_assessment = {
"schema_version": "1.0.0",
"timestamp": "2025-11-22T06:00:00",
Expand Down Expand Up @@ -428,7 +428,7 @@ def test_extract_patterns_empty_findings(self, mock_extractor, temp_dir):
"overall_score": 0.0,
"certification_level": "Needs Improvement",
"attributes_assessed": 0,
"attributes_not_assessed": 1,
"attributes_skipped": 1,
"attributes_total": 1,
"findings": [
create_dummy_finding()
Expand Down
Loading