Skip to content

Commit 6a88c6b

Browse files
committed
docs: honor the is_issued attestation contract in the README mint example (Sentry/CodeRabbit)
mint_diagnostic_attestation can return BLOCKED/UNVERIFIABLE with token=None (e.g. crypto unavailable). The example now checks .is_issued and raises before to_verification_context, mirroring qwed-verification's documented caller contract instead of silently degrading to UNVERIFIABLE/DENY. Re-verified runnable end-to-end.
1 parent 4c2e90f commit 6a88c6b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ diagnostic = NetworkGuard.to_diagnostic(
234234
attestation = mint_diagnostic_attestation(
235235
diagnostic, engine="NetworkGuard", query=statement
236236
)
237+
if not attestation.is_issued:
238+
# fail-closed contract: never proceed on an unissued attestation
239+
raise RuntimeError(f"Attestation unavailable [{attestation.error_code}]")
237240

238241
doc = net.to_verification_context(
239242
infra, # raw topology — the guard verifies this itself

0 commit comments

Comments
 (0)