correctover 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {correctover-2.0.0 → correctover-2.0.1}/PKG-INFO +1 -1
- {correctover-2.0.0 → correctover-2.0.1}/correctover/__init__.py +1 -1
- {correctover-2.0.0 → correctover-2.0.1}/correctover/validator.py +10 -7
- {correctover-2.0.0 → correctover-2.0.1}/correctover.egg-info/PKG-INFO +1 -1
- {correctover-2.0.0 → correctover-2.0.1}/setup.py +1 -1
- {correctover-2.0.0 → correctover-2.0.1}/LICENSE +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/README.md +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/correctover.egg-info/SOURCES.txt +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/correctover.egg-info/dependency_links.txt +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/correctover.egg-info/requires.txt +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/correctover.egg-info/top_level.txt +0 -0
- {correctover-2.0.0 → correctover-2.0.1}/setup.cfg +0 -0
|
@@ -73,10 +73,12 @@ class CCSValidator:
|
|
|
73
73
|
|
|
74
74
|
# Integrity check (if enabled)
|
|
75
75
|
if self.enable_integrity:
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
stored_hash = output.get("integrity_hash")
|
|
77
|
+
computed_hash = self._compute_integrity(output)
|
|
78
|
+
|
|
79
|
+
if stored_hash is None:
|
|
78
80
|
warnings.append("No integrity hash in output")
|
|
79
|
-
elif
|
|
81
|
+
elif stored_hash != computed_hash:
|
|
80
82
|
errors.append("Integrity hash mismatch")
|
|
81
83
|
|
|
82
84
|
return ValidationResult(
|
|
@@ -87,9 +89,10 @@ class CCSValidator:
|
|
|
87
89
|
)
|
|
88
90
|
|
|
89
91
|
def _compute_integrity(self, output: Dict[str, Any]) -> str:
|
|
90
|
-
"""Compute HMAC-based integrity hash"""
|
|
91
|
-
#
|
|
92
|
-
|
|
92
|
+
"""Compute HMAC-based integrity hash (excludes integrity_hash field)"""
|
|
93
|
+
# Exclude integrity_hash from computation
|
|
94
|
+
filtered = {k: v for k, v in output.items() if k != "integrity_hash"}
|
|
95
|
+
sorted_items = sorted(filtered.items())
|
|
93
96
|
data_str = str(sorted_items)
|
|
94
97
|
|
|
95
98
|
# Compute HMAC
|
|
@@ -104,5 +107,5 @@ class CCSValidator:
|
|
|
104
107
|
def add_integrity_hash(self, output: Dict[str, Any]) -> Dict[str, Any]:
|
|
105
108
|
"""Add integrity hash to output"""
|
|
106
109
|
output_copy = output.copy()
|
|
107
|
-
output_copy["integrity_hash"] = self._compute_integrity(
|
|
110
|
+
output_copy["integrity_hash"] = self._compute_integrity(output_copy)
|
|
108
111
|
return output_copy
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="correctover",
|
|
8
|
-
version="2.0.
|
|
8
|
+
version="2.0.1",
|
|
9
9
|
author="Guigui Wang",
|
|
10
10
|
author_email="wangguigui@correctover.com",
|
|
11
11
|
description="CCS v1.0 - Conformance Protocol for Agentic Runtime Systems",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|