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
Maintainer ruling
Implements the ruling in #596 / #592: structural malformation wins.
If the TRACE Claim does not establish a valid structure,
verify_trace_claim()now returnsCLAIM_MALFORMEDbefore signature or key-binding interpretation. This is deliberately scoped to the structural stage only; it does not establish any new precedence between signature failure and key-binding failure.What
The schema stage is now a prerequisite boundary rather than a result that later stages may overwrite:
VerificationStatus.UNVERIFIEDwithCLAIM_MALFORMED;details["malformed_field"]preserves the most specific malformed intermediate established by Pydantic, whiledetails["schema_error"]retains the complete validation diagnostic;This preserves the semantic distinction from the maintainer ruling: a malformed claim has an unevaluated signature, not an invalid signature.
Regression coverage
The former xfail reproducer is now a plain assertion matrix covering:
trace;trace.cnf;trace.cnf.jwk;trace.cnf.jwk.x;gateway;gateway.audit_chain;gateway.attestation_evidence.Fourteen malformed-shape vectors assert
CLAIM_MALFORMED, no verified fields, only the schema stage unverified, and the exact malformed intermediate. A separate mutation-oriented test replaces both crypto helpers with fail-fast sentinels and proves malformed structure cannot reach either signature or key-binding interpretation.Current lineage
Reconstructed directly on current upstream
main:d9fc737c2e964dc8e63b579382b4fb8b43a4df8a;141c5b2ee96c46213f53907260d61139db3f28a8;src/cmcp_verify/verify.pyandtests/unit/test_verify_malformed_claim_shapes.py.The four commits that landed after the original reproducer baseline changed OPAQUE/embodied-action code and workflow files; none overlaps these two files.
DDC review
No schema or wire-format change is proposed.
AI-assistance disclosure: ChatGPT assisted with source triage, maintainer-ruling translation, DDC falsification design, implementation drafting, exact-lineage reconstruction, and diff review.
altrudevreviewed the bounded claim and remains responsible for the contribution.