← Back to Pull requests

refactor(verify)!: typed signature, artifact, SCT and log evidence errors #369

Closed
unknown closed this pull request without merging on Dec 03, 2026 09:08 UTC
View on GitHub
unknown unknown commented on Nov 14, 2026 14:04 UTC
Author

Part of stack #370 (base: refactor/verify-typed-error-payloads).

Motivation

Found while porting ocx to sigstore-rust. ocx reports a bad signature, an artifact that doesn't match, a missing SCT and missing log evidence as different refusals. With String payloads it could match the variant but not the cause, for example whether the DSSE envelope or the artifact signature failed. It also couldn't tell which piece of log evidence was missing.

Change

  • SignatureInvalid { content, source }: which content was signed (the

  • new SignedContent: DSSE envelope or artifact) and the
    sigstore_crypto::Error that failed, instead of a message.
  • ArtifactMismatch { binding }: which binding failed (the new

  • ArtifactBinding: message digest, statement subjects, log entry
    digest).
  • CertificateError::SctMissing for a certificate without an SCT.

  • TransparencyLogError::{MissingInclusionProof, MissingInclusionPromise,

  • MissingCheckpoint, NoInclusionEvidence}
    for absent evidence, and
    CheckpointRootMismatch { checkpoint_root, proof_root }.

    Detail-only conditions (malformed entries, entry/bundle mismatches,
    other SCT and checkpoint failures) keep their messages in the existing
    category variants.

    BREAKING CHANGE: Error::SignatureInvalid and Error::ArtifactMismatch
    are struct variants. Missing SCTs, missing log evidence and checkpoint
    root mismatches have their own variants instead of Sct,
    InclusionProof, InclusionPromise or Checkpoint messages.

    Testing

    cargo fmt --all --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo doc --no-deps --all-features --workspace (warnings as errors) and cargo test --workspace --all-features pass on this branch.

    🤖 Generated with Claude Code

    Diff: 230 lines (+172 / -58) across 2 files Reviewer: baszalmstra Review duration: 27064m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 230 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #369"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37% (MEDIUM) · Higher = larger blast radius
    37%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%