fix(verify): preserve structural claim failure - #596
Conversation
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
|
Batch response for this cluster is here: agentrust-io/agent-manifest#357 (comment) Short version: the finding class is real and welcome. Your CI had never run, held under first-time-contributor gating, until I released 36 runs across your PRs an hour ago, and five of your eight are now red. Please fix those, sequence trace-spec#258 against #252 which touch the same two files, and tell me the order you want them reviewed in. |
|
I reconciled the released CI failure. The red step was Because this PR is explicitly a draft test-first reproducer, I also changed the current-head behavior at I am keeping #596 out of the review queue until the implementation/precedence decision is ready. Fresh CI is currently waiting on workflow approval; no green claim yet. |
|
Thanks for splitting this the way you did. Asserting only the uncontested invariant and holding the precedence question for a maintainer is the right call, and it is the reason this is a useful reproducer rather than a change that quietly decides something. The ruling: structural malformation wins. If the claim structure is malformed, The reason is not aesthetic. A signature verdict is a statement about a specific set of bytes. When the structure did not parse, the verifier never established what those bytes were, so whatever it computed is a verdict about something it could not identify. Reporting it as The practical consequence is the one that matters to a caller: Two things I do want from the shape of it:
Once that is in, I am happy for the xfails on the escaping shapes to become plain assertions, since the escape itself is a bug we agree on. Separately, on CI: the one thing still red is |
99ba8a3 to
141c5b2
Compare
imran-siddique
left a comment
There was a problem hiding this comment.
Review/test follow-up on 141c5b2ee96c.
The schema-first return correctly prevents malformed claims from reaching cryptographic interpretation, and the new boundary regressions pass. The full suite is not green: fresh CI reports 25 failed, 1470 passed, 6 skipped. Besides the shared SDK/TPM-root failures tracked by #616, five existing TPM tests now stop at schema validation because their claims contain trace.runtime.raw_evidence, which RuntimeClaim rejects. Update those positive-path fixtures to the valid claim/evidence shape and verify that their intended TPM checks still execute; preserve the early CLAIM_MALFORMED return. Local results also include a distribution metadata mismatch and an oversized-request test failure. Keep this draft until the full suite passes.
Full local python -m pytest -q (Windows, Python 3.12, existing review environment): 7 failed, 1528 passed, 16 skipped, 1 warning in 64.20s (0:01:04).
Fresh workflow evidence: 33664858111 (failure).
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Closes agentrust-io#592. Reconstruct agentrust-io#596 on current main with the strict schema prerequisite preserved. Move legacy TPM fixtures to the signed gateway evidence envelope and pin schema refusal for unsupported platform aliases. Supersedes the earlier draft implementation and its overbroad compatibility workaround. AI-assisted implementation and verification; Altru.dev remains responsible for the contribution. Signed-off-by: Altru.dev <altrudevelop@gmail.com>
877c506 to
6ffad28
Compare
|
@imran-siddique Thank you for the review. I have replaced the intermediate compatibility workaround with the strict schema-first implementation you requested and corrected the positive-path fixtures instead. The new head is The original structural boundary and 15 regression tests are preserved byte-for-byte. TPM raw evidence and the separate EK chain now travel through the signed gateway envelope. The full local suite is green (1,671 passed, 14 skipped), as is the CI-scoped suite (1,629 passed, 6 skipped; 87.56% coverage), Ruff, and mypy. I also corrected the cross-platform fixture that had treated a TRACE-unsupported OPAQUE platform value as a valid positive case; supported hardware paths retain positive coverage and unsupported aliases now have explicit schema-refusal tests. The PR body contains the exact test evidence and scope. I am keeping it draft until your review and hosted checks are complete. No manual Actions run was triggered. |
Closes #592.
Maintainer ruling and correction
Reconstructed on current upstream
mainafter the review of141c5b2. The strict schema prerequisite is preserved: anyRuntimeClaimvalidation failure returnsCLAIM_MALFORMEDbefore signature, key-binding or other downstream interpretation. No general ordering between signature and key-binding failures is introduced.The intermediate compatibility workaround at
877c506was too broad and has been removed. The original strict structural boundary and its 15 regression tests are preserved byte-for-byte. The positive-path TPM fixtures now use the valid, signedgateway.attestation_evidenceenvelope rather than placing evidence in schema-closedtrace.runtime.Fixture and representation corrections
AttestationReportInfoand included in the final envelope signature.DDC executable evidence
Exact candidate
6ffad28da75560dfba5a0c242839403f871e9c53, parentcc27f91ec9b2d623dc633e24f1c368fb20f7566f(current upstream main at reconstruction). One DCO-signed commit, five changed files, no unrelated source changes. Tested in an isolated local virtual environment with Python 3.14.4, agent-manifest 0.12.0 and agentrust-trace 0.10.0.ruff check src/ tests/: PASS.mypy src/cmcp_runtime/: PASS, 54 source files.mypy src/cmcp_verify/verify.py: PASS.python -m pytest -q: 1,671 passed, 14 skipped.141c5b2and found byte-for-byte identical.Scope and lineage
No schema, wire-format, cryptographic primitive, or general failure-precedence change. The old draft history is replaced by a single signed-off commit on current main, preserving original implementation credit and making the DCO history complete. The PR remains draft for maintainer review and hosted validation.
AI-assistance disclosure: ChatGPT assisted with source triage, DDC boundary analysis, implementation and fixture correction, local differential testing, clean-history reconstruction, and exact-diff review.
altrudevreviewed the bounded claim and remains responsible for the contribution.