Repository navigation
fix(aggregator,checkpoint): validate aggregator parameters/raw_bytes and enforce anchor profile in entry_leaf_digest (#161) - #166
Conversation
…and enforce anchor profile in entry_leaf_digest (agentrust-io#161) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Raghuvar Durga <177662415+drk-ram@users.noreply.github.com>
dinakarjs
left a comment
There was a problem hiding this comment.
Bounded source/execution review at exact head f1c25a6. I fetched the actual aggregator and verifier modules plus tests/test_aggregator.py at this SHA and ran unittest discovery for that file with source imports pinned to those local paths, Python 3.12.
38 tests ran: 35 passed and three signature-fixture setup cases errored because this review environment lacks rfc8785. Those three errors are environment limitations, not demonstrated defects in this PR. In particular, test_distinct_raw_bytes_same_parsed_claim_get_distinct_proof_files passed here: the two valid JSON encodings remain distinct proof files, so please include that existing regression in the reported validation rather than excluding it without explanation. The new aggregator/input/profile test also passed. Existing loopback tests emitted socket ResourceWarnings; no TLS or live witness call was exercised.
No new blocker established in the tested batching/raw-byte/profile slice. I have not completed the complete locked-environment/signature/checkpoint validation and am not substituting these 35 passes for it. Retain exact-byte commitment versus parsed-claim equality as separate contracts. Reviewed with OpenAI Codex.
dinakarjs
left a comment
There was a problem hiding this comment.
Completing review of exact head f1c25a6 in a fresh Linux/Python 3.12.14 environment installed from requirements/ci.txt and requirements/witness.txt with hashes, plus a no-deps editable local installation. Full unittest discovery passes all 407 tests, including the previously unavailable signed controls and exact-byte distinct-proof regression. Repository Ruff passes. No blocking finding in the changed aggregator/raw-byte/entry-profile paths; approving this scoped change. Please include the existing exact-byte regression in reported validation rather than leaving the exclusion unexplained. Hosted checks and maintainer disposition remain separate. No live external witness or hardware validation. Reviewed with OpenAI Codex.
|
Thanks @dinakarjs for the review and verification! Updated the PR description's validation section to explicitly record that full |
What and why
Closes #161
Summary
flush_interval(positive finite number) andmax_batch_size(non-negativeint, notbool) inTRACEAggregator.__init__.claims(list),timeout(positive finite number), andraw_bytes(byteselements that UTF-8 decode vialoads_uniqueto the submittedclaimobject) inTRACEAggregator.submit.anchor_profile_violation(body)intrace_verify._checkpoint.entry_leaf_digestand catchValueErrorinverify_chain_against_entriesso malformed entry bodies produce a structured verification error.subTest-isolated unit tests intests/test_aggregator.py.Validation
python -m unittest discover -s tests -q— passed (fullunittestdiscovery: 407 tests, includingtest_distinct_raw_bytes_same_parsed_claim_get_distinct_proof_files)pytest tests/test_aggregator.py -q— passed (38 passed, includingtest_distinct_raw_bytes_same_parsed_claim_get_distinct_proof_files)python tools/validate_registry.py— passed (OK: 3 day file(s) valid)python tools/validate_producers.py— passed (OK: 3 producer key file(s) valid)Registry impact
registry/Existing entries are append-only. If you are changing one, say why here: mirrors
and auditors may already have observed the current commit hashes, and a rewrite
diverges them.
Checks
pytestpassestools/validate_registry.py,tools/validate_producers.py)docs/anchor-format.mdis updated in the same PR, and existing inclusion proofs still verify