Skip to main content

verify_extra_scoped

Function verify_extra_scoped 

Source
pub fn verify_extra_scoped(
    repo: &Path,
    scope: &Path,
    base: Option<&str>,
    extra_scopes: &[PathBuf],
    excludes: &[PathBuf],
) -> Result<Verification>
Expand description

Verify the e2e decision at repo, joining extra scopes outside scope into what counts as scoped source.

With base, both checks are content diffs of <base>...HEAD, read from the merge base — indifferent to commit identity, so rebases and squash merges never disturb a receipt:

  1. A branch whose diff leaves the scoped source untouched owes no decision and passes. The scoped source is the union of scope and every repo-root-relative extra_scopes entry (a shared source tree beside the package — a native core bound into several bindings — which no scope at-or-below repo can reach), minus the excludes (feature-gated subtrees compiled out of the package). Receipts and the retired single-file attestation are never scoped source.
  2. Otherwise the branch passes when its diff adds or updates a receipt under repo’s receipts directory. A deletion (the prune) is not a decision.

Without base there is no branch diff to read, so presence is the check: a committed receipt at repo passes.