From 73a472b05b4020cafaea9a3c70cb8279f5a14243 Mon Sep 17 00:00:00 2001 From: Imran Siddique <45405841+imran-siddique@users.noreply.github.com> Date: Fri, 11 Sep 2026 08:25:11 -0700 Subject: [PATCH] test(sandbox): name verify_record(expected_nonce=...) in the docstring Follow-up to #315, closing the one clause @lywinged flagged and declined to hold the merge for. The field docstring now names `verify_record(expected_nonce=...)`, while this test docstring beside it still said `nonce` is never checked "against anything else". A verifier can compare it against a value it chose; what that establishes is freshness rather than key binding, which is the distinction the rest of the paragraph is making. Says that instead. Also drops a doubled "unrelated,". Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01X27MBo6tGVw1UmmchuGFnW --- tests/test_sandbox_adapter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_sandbox_adapter.py b/tests/test_sandbox_adapter.py index 85d75ba..1d2cec1 100644 --- a/tests/test_sandbox_adapter.py +++ b/tests/test_sandbox_adapter.py @@ -244,9 +244,10 @@ def test_genuinely_verified_evidence_is_still_not_bound_to_the_signing_key() -> asks of them -- still cannot get real Level 1 assurance out of this adapter, because nothing here binds that evidence to the specific key the record ends up signed with. ``nonce`` is carried through verbatim and is never checked against - ``cnf.jwk``, against the signing key passed to ``sign_record``, or against - anything else. Two records built from the identical (hypothetically genuine) - attestation but signed with unrelated, unrelated-to-the-hardware keys both verify + ``cnf.jwk`` or against the signing key passed to ``sign_record``. A verifier can + compare it against a value it chose, via ``verify_record(expected_nonce=...)``, + which establishes freshness rather than key binding. Two records built from the + identical (hypothetically genuine) attestation but signed with unrelated keys both verify successfully; nothing distinguishes "the verified key" from "any key the caller felt like using afterwards". Per docs/trust-levels.md, Level 1 requires "authenticated evidence binding the record-signing key to the expected