feat(crypto): skip rollup for local labelers whose signing key differs from the DID document
When a developer points the tool at a local copy of a production labeler
(e.g. `test labeler http://localhost:8080 --did did:plc:<prod>`), the
local instance almost never has the production signing key. The crypto
stage then failed every label against the DID-document key and emitted
`SpecViolation`, masking the rest of the run.
This commit changes `crypto::run` so that per-label violations are
buffered rather than pushed directly, and the final rollup decision
considers locality:
- If every label verifies against the current key: `Pass` (unchanged).
- Otherwise, if `is_local_labeler_hostname(&identity.labeler_endpoint)`:
emit `crypto::rollup` `Skipped` with a reason naming the production
key's absence, and discard the buffered violations. PLC history
fallback is also skipped — a key swap in a test environment is
expected and not a rotation event.
- Otherwise: commit the buffered violations and fall through to the
existing PLC-history / did:web branches.
Adds two unit tests: one that drives a mismatched-key local labeler
and asserts `Skipped`, and one that confirms a matching local key
still produces `Pass`. The `PanicHttpClient` stub asserts that the
skip path short-circuits before any network request.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
authored by