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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: correctover
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: CCS v1.0 - Conformance Protocol for Agentic Runtime Systems
5
5
  Home-page: https://correctover.github.io
6
6
  Author: Guigui Wang
@@ -3,7 +3,7 @@ Correctover - CCS v1.0
3
3
  Conformance Protocol for Agentic Runtime Systems
4
4
  """
5
5
 
6
- __version__ = "2.0.0"
6
+ __version__ = "2.0.1"
7
7
  __author__ = "Guigui Wang"
8
8
  __email__ = "wangguigui@correctover.com"
9
9
 
@@ -73,10 +73,12 @@ class CCSValidator:
73
73
 
74
74
  # Integrity check (if enabled)
75
75
  if self.enable_integrity:
76
- integrity_hash = self._compute_integrity(output)
77
- if "integrity_hash" not in output:
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 output["integrity_hash"] != integrity_hash:
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
- # Create deterministic string representation
92
- sorted_items = sorted(output.items())
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(output)
110
+ output_copy["integrity_hash"] = self._compute_integrity(output_copy)
108
111
  return output_copy
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: correctover
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: CCS v1.0 - Conformance Protocol for Agentic Runtime Systems
5
5
  Home-page: https://correctover.github.io
6
6
  Author: Guigui Wang
@@ -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.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