Skip to content

TraceAGTAdapter.build_trust_record() always claims an affirming appraisal it never performed #331

Description

@Yatsuiii

appraisal.status is a verifier-owned field — spec/trace-v0.2.md §3.3.1: "A verifier MUST record the depth it actually checked in appraisal.provenance_depth_verified" and "the verifier MUST set appraisal.status to contraindicated" when evidence fails. TraceAGTAdapter.build_trust_record() sets it unconditionally to "affirming" at record-construction time, before signing and before any verifier has run:

# src/agentrust_trace/adapters/agt.py
"appraisal": Appraisal(
    status="affirming",   # hardcoded; no constructor parameter to change it
    ...

TraceAGTAdapter.__init__ has no appraisal_status parameter. Every record this adapter produces claims an affirming appraisal regardless of whether one happened.

Reproduction

inspect.signature confirms no such parameter exists; the docstring's own usage pattern is followed exactly, no override:

adapter = TraceAGTAdapter(model_provider="x", model_id="y", build_provenance_digest="sha256:"+"e"*64, transparency="https://x")
record = adapter.build_trust_record(session)
record["appraisal"]["status"]  # 'affirming'
signed = sign_record(record, key)
verify_record(signed, public_key_or_jwk=key.public_key())  # passes

Produces a cryptographically valid, verified Trust Record asserting an appraisal that never ran.

What the sibling adapter already does correctly

TraceSandboxAdapter (adapters/sandbox.py) already handles this: appraisal_status is a constructor parameter defaulting to "none", with tests (test_appraisal_status_defaults_to_none, test_appraisal_status_is_configurable_when_one_actually_happened) proving both the default and the override. TraceAGTAdapter has neither.

tests/test_agt_adapter.py's 14 tests cover every other field this adapter produces but never assert anything about appraisal.status.


🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions