Skip to content

feat: Added Verifiable Agents - #772

Merged
AmitoVrito merged 4 commits into
mainfrom
fix/pr766-bugs
Jul 14, 2026
Merged

AmitoVrito merged 4 commits into
mainfrom
fix/pr766-bugs

Conversation

@AmitoVrito

Copy link
Copy Markdown
Collaborator

Merges #766 (verifiable agents / audit system from @Abhay-Mmmm) with review fixes applied on top:

  • CreditCardDetector matched any 13-16 digit run with no Luhn check, over-redacting ordinary numeric IDs. Added a Luhn checksum gate before redaction.
  • AuditRecord.from_dict skipped deep_freeze on payload, so records reconstructed from a loaded bundle were mutable, unlike records created via AuditTracer.record. Fixed to freeze consistently.
  • verify_chain had no run_id awareness, so an unfiltered multi-run record list could validate a bogus cross-run chain link. Now raises on mixed run_ids.
  • Canonical JSON hashing had no Unicode normalization, so combining vs precomposed forms of the same text hashed differently. Added NFC normalization before hashing.
  • Only internal Merkle nodes were domain separated per RFC 6962, leaves were not. Added the leaf domain prefix to match the spec fully.

Regression tests added for all five, full suite passing.

Closes #738

Abhay-Mmmm and others added 4 commits July 5, 2026 20:29
Add Luhn checksum validation to CreditCardDetector so it stops
over-redacting ordinary 13-16 digit numeric IDs that are not real card
numbers.

Deep-freeze the payload in AuditRecord.from_dict so records reconstructed
from a loaded bundle are tamper-evident like freshly recorded ones, and
teach verifier.py's standalone canonicalizer to unwrap the resulting
frozen containers.

Make AuditTracer.verify_chain reject a record list spanning more than one
run_id instead of silently validating a bogus cross-run chain link.

Apply Unicode NFC normalization to strings (including dict keys) before
canonical JSON hashing, so combining and precomposed forms of the same
text hash identically, in both serializer.py and verifier.py.

Add RFC 6962 leaf-hash domain separation (0x00 prefix) via a new
merkle.hash_leaf helper, used by bundle.py when building Merkle leaves
and by verifier.py when recomputing them, so leaf hashes can no longer
be replayed as internal node hashes. Kept within schema 1.2 since it has
not shipped yet.

Co-authored-by: Abhay Krishna <[email protected]>
# Conflicts:
#	src/synapsekit/cli/main.py
@AmitoVrito
AmitoVrito merged commit a86fb56 into main Jul 14, 2026
8 of 9 checks passed
@AmitoVrito AmitoVrito mentioned this pull request Jul 14, 2026
4 of 8 tasks
@AmitoVrito
AmitoVrito deleted the fix/pr766-bugs branch July 14, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2.0: Verifiable Agents — cryptographically signed audit trails of every LLM call and tool invocation

2 participants