Skip to content

fix(agt-adapter): appraisal.status is the verifier's, so default it to none - #336

Merged
imran-siddique merged 1 commit into
mainfrom
fix/agt-adapter-appraisal-status
Sep 12, 2026
Merged

fix(agt-adapter): appraisal.status is the verifier's, so default it to none#336
imran-siddique merged 1 commit into
mainfrom
fix/agt-adapter-appraisal-status

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Closes #331.

build_trust_record() set appraisal.status to "affirming" on every record it produced, and __init__ had no parameter to change it. appraisal.status is verifier-owned: section 3.3.1 says a verifier MUST record the depth it actually checked and MUST set the status to contraindicated when evidence fails, and models.Appraisal carries the same point in a comment, "What this verifier ran, not what the issuer claimed."

The record signed and verified, so a consumer reading that field to find out whether anybody checked was told yes by a record nobody had appraised.

Change

appraisal_status becomes a constructor parameter defaulting to "none", mirroring TraceSandboxAdapter, which already had this right with tests pinning both the default and the override. agt.py:163 was the only remaining hardcoded status in the package.

This changes the content of records this adapter emits. An unappraised record now says none where it used to say affirming. That is the correct direction, and a caller who really did appraise declares it with appraisal_status="affirming".

Docs that described the old behaviour

  • docs/integration/agt.md said the adapter "populates an affirming appraisal without independently evaluating the session".
  • docs/tutorials/agt-adapter.md carried a post-hoc record["appraisal"]["status"] = "none" line, so the gap was known well enough to be worked around in a tutorial rather than fixed in the adapter. That line is gone because the default now does it, and tests/test_docs_quickstart.py executes that tutorial, so the edit is checked rather than asserted.

Verified in both directions

  • With the fix: tests/test_agt_adapter.py 25 passed, docs quickstart 2 passed, repository 1444 passed.
  • Against origin/main's agt.py: 7 of the new cases fail.
  • Coverage is the default, the override, every status the model allows reaching the record and validating as a TrustRecord, and a control that an unappraised record still signs and verifies so the new default costs a caller nothing.
  • The four repository-wide failures in test_generators_reproduce_fixtures.py and test_safe_integer_range.py are pre-existing Windows path-separator artifacts.

Reported by @Yatsuiii, who found it by comparing the two adapters rather than by reading either one alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01X27MBo6tGVw1UmmchuGFnW

…o none

build_trust_record() set appraisal.status to "affirming" on every record it
produced, and __init__ had no parameter to change it. The field is
verifier-owned: spec section 3.3.1 says a verifier MUST record the depth it
actually checked and MUST set the status to contraindicated when evidence
fails, and models.Appraisal carries the same point in a comment, "What this
verifier ran, not what the issuer claimed."

The adapter set it at record-construction time, before signing and before any
verifier existed. The result signed and verified, so a consumer reading the
field to find out whether anybody checked was told yes by a record nobody had
appraised.

TraceSandboxAdapter already had this right, with appraisal_status defaulting to
"none" and tests pinning both the default and the override. TraceAGTAdapter now
matches it, and that was the only remaining hardcoded status in the package.

This changes the content of records this adapter emits: an unappraised record
now says none where it used to say affirming. A caller who really did appraise
declares it with appraisal_status="affirming".

Two documents described the old behaviour. docs/integration/agt.md said the
adapter "populates an `affirming` appraisal without independently evaluating the
session", and docs/tutorials/agt-adapter.md carried a post-hoc
record["appraisal"]["status"] = "none" line, so the gap was known well enough to
be worked around in a tutorial rather than fixed in the adapter. Both are
corrected, and the tutorial line is gone because the default now does it.

Reported by @Yatsuiii in #331, found by comparing the two adapters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X27MBo6tGVw1UmmchuGFnW
@imran-siddique
imran-siddique requested review from a team and lywinged as code owners September 12, 2026 04:44
@imran-siddique
imran-siddique merged commit 1151ad1 into main Sep 12, 2026
9 checks passed
@imran-siddique
imran-siddique deleted the fix/agt-adapter-appraisal-status branch September 12, 2026 04:49
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.

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

1 participant