AI Initiative logoAI Initiative
Reading room / Manthan

HERALD Verifier Return-Code Reference Card

HERALD Verifier Return-Code Reference Card. Covers 0. The contract in one paragraph; 1. Quick-reference table; 2. Per-code entries; 2.1 `valid`.

Project explanation / technical method
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly stated in source · Date not established

Provenance, authorship and editorial notes

HERALD Verifier Return-Code Reference Card

Id

manthan-herald-protocol-docs-verifier-codes

Project

Manthan

Source path

manthan/herald-protocol/docs/verifier-codes.md

Source sha256

c4adee72bfe736c79a5fcb0f830c72bb36db2886dad8fc60d0764219f65a4353

Local copy sha256

c4adee72bfe736c79a5fcb0f830c72bb36db2886dad8fc60d0764219f65a4353

Repo head

3a94084024a3434cef331fecac91c2c3b43f0313

Date
Not recorded
Date basis

Original publication date not established; Git revision date retained separately.

Author

Not explicitly stated in source

Author basis

Unknown; Git committer not substituted for document author.

Last source commit

8b75d1b0157c20a0a463f0e31008ef9f73099beb

Last source commit date

2026-06-08T07:40:14Z

Document status

Project explanation / technical method

Summary

HERALD Verifier Return-Code Reference Card. Covers 0. The contract in one paragraph; 1. Quick-reference table; 2. Per-code entries; 2.1 `valid`.

Topics
  • Exploration architecture and selection
  • 0. The contract in one paragraph
  • 1. Quick-reference table
  • 2. Per-code entries
Theme

Exploration architecture and selection

Priority

deep

Related ids
  • manthan-readme
  • manthan-docs-architecture
  • manthan-docs-business-overview
  • manthan-docs-demo-walkthrough
  • manthan-docs-principles
  • manthan-docs-qd-measurement-direction-plan
  • manthan-docs-swarm-evolution-integration
Evidence concerns
  • Recovered source text is preserved verbatim. Assertions, comparisons, commands and results belong to its original context; they were not re-executed or externally re-verified during this corpus review.
Word count

3467

Bytes

23650

Source relative

herald-protocol/docs/verifier-codes.md

Remote mirror

manthan/herald-protocol/docs/verifier-codes.md

Full text preserved

True

HERALD Verifier Return-Code Reference Card

Status: Reference (informative). Normative source is SPEC §6 (../../../SPEC.md) (lines 316–337) extended by EXT §6.5–6.6 (../../../EXT.md) (lines 450–462). Where this card and the spec disagree, the spec wins.

Audience: authors of reference verifiers (T-003, T-004), conformance test runners (T-017), audit-log walkers (T-009, T-010), and UI/renderer authors who must surface verifier output to end users (T-021, T-023, T-025).

Scope. This card enumerates every distinct return code a conformant HERALD verifier may emit when walking a single envelope or a trace, gives the canonical trigger conditions for each, names the spec rules that produce it, and tells the caller what to do with it. It does not redefine any code — it is a navigation aid layered over [SPEC §6].


0. The contract in one paragraph

A reference verifier walks a trace from leaf to genesis and emits a set of return codes per envelope. valid is empty-set-equivalent in the sense that no failure code applies. Every other code is a reason a caller might wish to refuse, downgrade, or annotate the envelope. The verifier MUST surface every applicable reason — the first failure does not short-circuit subsequent checks ([SPEC §6] line 337). Application policy decides how to act on the set.


1. Quick-reference table

CodeCategoryDispositionCombines withSource
validterminal-success—mutually exclusive with every code below[SPEC §6]
partialterminal-success-with-caveat—augmented by signature-invalid for named failing co-signers ([EXT §6.5])[SPEC §6], [EXT §6.5]
signature-invalidcryptorejecttampered, unknown-alg, expired-key, deprecated-sigil[SPEC §6], [SPEC §3.4]
tamperedintegrityrejectany[SPEC §6], [SPEC §3.5]
orphanedchaindeferparent-trace-mismatch (if the orphan's claimed trace is also wrong on its face)[SPEC §6]
parent-trace-mismatchchainrejecttampered, signature-invalid[SPEC §6], [SPEC §3.3a]
replayed-noncereplayrejectsignature-invalid (if the duplicate is also unsigned-correctly)[SPEC §6], [SPEC §3.7]
expired-envelopetimerejectclock-skew, replayed-nonce[SPEC §6], [SPEC §3.7]
expired-keyidentityrejectsignature-invalid (always — an envelope signed by a deprecated key fails both)[SPEC §6], [SPEC §2.4]
deprecated-sigilidentityrejectsignature-invalid, expired-key[SPEC §6], [SPEC §2.4]
unknown-sigilidentitydefer-or-rejectorphaned (frequently co-occurs)[SPEC §6], [SPEC §8.1]
unknown-algsuiterejectsignature-invalid[SPEC §6], [SPEC §3.4], [EXT §6.6]
clock-skewtimerejectexpired-envelope[SPEC §6]
lineage-unverifiedadvisoryinform — render distinctly per [SPEC §2.3], [THREATS §3.3]any[SPEC §6], [SPEC §2.3]

Categories defined. crypto, integrity, chain, replay, time, identity, suite are failure categories. advisory is informational and never alone causes rejection. terminal-success and terminal-success-with-caveat are the only positive outcomes; every other code is a failure reason.

Disposition vocabulary.

DispositionMeaning
rejectApplication MUST NOT treat the envelope as authoritative.
deferVerifier lacks information to decide; caller may retry after fetching the missing context (parent envelope, sigil discovery record).
informSurface to the caller / UI; do not refuse on this alone.
defer-or-rejectBehaviour is policy-governed; see per-code entry below.

2. Per-code entries

Each entry below names: the trigger (what the verifier observed), the rule (the spec clause invoked), co-occurring codes the caller should expect to see in the same set, and caller guidance.

2.1 valid

Signatures verify, chain intact, all required scopes present, no replay. — [SPEC §6] line 322

2.2 partial

Origin signature valid, but at least one optional/required-by-policy signature is invalid or missing. Reasons enumerated. — [SPEC §6] line 323

``
{ "code": "partial",
"failing_scopes": ["tool-sandbox"],
"missing_scopes": ["human-approval"] }
`
Reviewers checking conformance MUST reject a
partial` emission that omits this structured naming.

2.3 signature-invalid

Origin signature failed verification. — [SPEC §6] line 324

2.4 tampered

id does not match the canonical body hash. — [SPEC §6] line 325

2.5 orphaned

parent references an envelope not yet known. — [SPEC §6] line 326

2.6 parent-trace-mismatch

E.trace ≠ parent.trace (violates §3.3a). — [SPEC §6] line 327

2.7 replayed-nonce

(from, nonce) pair already seen. — [SPEC §6] line 328

2.8 expired-envelope

expires < now - skew_tolerance. — [SPEC §6] line 329

2.9 expired-key

Signing key in deprecated state at envelope ts. — [SPEC §6] line 330

2.10 deprecated-sigil

Sender's sigil deprecated. — [SPEC §6] line 331

2.11 unknown-sigil

Cannot resolve from to a public key. — [SPEC §6] line 332

2.12 unknown-alg

alg not in registry. — [SPEC §6] line 333

2.13 clock-skew

ts outside acceptable window. — [SPEC §6] line 334

2.14 lineage-unverified

Lineage claim has no Herald endorsement (informational, not a failure on its own). — [SPEC §6] line 335

3. Combination rules and emission discipline

3.1 The "all reasons" rule

[SPEC §6] line 337: "Verifiers MUST surface ALL applicable reasons, not just the first."

3.2 Severity is caller-determined

The disposition labels in §1 (reject/defer/inform/defer-or-reject) are default caller posture, not normative ordering. An application policy may:

3.3 Precedence matrix (informative)

When multiple codes apply, this card recommends the following surface ordering for human-readable output (UI / logs). It is not normative.

1. tampered — the envelope is not what it claims to be at all; nothing else matters until this is resolved.
2. signature-invalid — cryptographic gate, primary security claim.
3. parent-trace-mismatch — chain integrity, second.
4. replayed-nonce / expired-envelope / clock-skew — temporal/replay.
5. expired-key / deprecated-sigil / unknown-sigil — identity.
6. unknown-alg — suite.
7. orphaned — verifier-side state, deferrable.
8. partial — co-signature policy.
9. lineage-unverified — advisory.

This is for UI hierarchy only; the verifier MUST emit every applicable code regardless of order.


4. Known wrinkles (interpretation notes)

These items reflect ambiguities in the spec language that this card has resolved one way; reviewers should sanity-check.

4.1 valid ⊕ lineage-unverified per envelope?

[SPEC §6] line 335 calls lineage-unverified "informational, not a failure on its own," implying it is emitted alongside valid. This card adopts that reading: per-envelope, the verifier may emit {valid, lineage-unverified} together, and a strict caller treats valid as the disposition while a UI surfaces the advisory. The §1 quick-reference's "mutually exclusive with every code below" line refers to failure codes; advisory codes are the documented exception.

4.2 partial on a genesis envelope

A genesis envelope has only signatures[0] (origin) and possibly Herald lineage co-signatures. If the Herald co-signature is invalid, this card directs the verifier to emit partial with failing_scopes: ["herald-lineage"]. The spec does not address genesis specifically — this card extrapolates from [EXT §6.5] uniformly.

4.3 unknown-alg on origin vs. non-origin

If the origin signature carries an unknown alg, both unknown-alg and signature-invalid fire. If a non-origin signature carries an unknown alg, unknown-alg fires together with partial. The combined emission preserves caller distinguishability (was it crypto failure or suite failure?) — this card recommends both codes always co-fire so that conformance vectors (T-017, T-026) can probe each leg.

4.4 EXT-only codes?

[EXT §6.5] line 452 says "EXT adds the partial state" — but partial is already in the [SPEC §6] table (line 323). This card treats EXT §6.5 as an elaboration of the same code, not a separate code. There is no EXT-only code in v0.2. Future EXTs adding new conformance dimensions (capability manifest non-conformance, conduit-receipt absence on state-transition envelopes, stale Herald Charter) should either map to existing codes or extend this enum with explicit registry entries.

4.5 What about MUST-reject rules elsewhere in EXT?

EXT contains several MUST-reject rules (cool-off violation [EXT §1.2], missing SIP [EXT §1.3], stale Herald Charter [EXT §3.5], manifest below economic floor [EXT §4.4], capability strings not in registry [EXT §4.4], conduit co-located log [EXT §5.4]). This card maps them as follows:

EXT ruleVerifier code
Cool-off violation in moltsignature-invalid (the molt is treated as never having existed; subsequent envelopes from K_new produce expired-key/unknown-sigil until a valid molt is observed)
Missing SIP for state-transition envelopesignature-invalid (state-transition envelopes are inert without SIP)
Stale Herald Charter on a Herald-signed attestationsignature-invalid for the lineage scope → partial if non-origin
Manifest below economic floor without subsidised: trueOut of scope for envelope verification; this is a manifest-validation code, not enumerated here. T-112 / [EXT §4.4]
Capability strings not in registrySame as above — manifest-validation, not envelope-verification

If a future spec revision wants verifier-level codes for any of these, they should be added to [SPEC §6] and this card updated.


5. Conformance pointers


Appendix A — One-line gloss per code

For embedding in error toasts, log lines, and small UI surfaces.

CodeGloss
validThe envelope is what it claims to be.
partialThe envelope is genuine but a co-signature is missing or invalid.
signature-invalidThe origin signature does not verify.
tamperedThe body has been altered since id was computed.
orphanedThe parent envelope is unknown to this verifier.
parent-trace-mismatchThe parent's trace does not match this envelope's trace.
replayed-nonceThis (from, nonce) pair has been seen before.
expired-envelopeThe envelope's expires time has passed.
expired-keyThe signing key was no longer authoritative at the envelope's ts.
deprecated-sigilThe sender's sigil is retired.
unknown-sigilThe sender's sigil cannot be resolved to a public key.
unknown-algThe signature suite is not in the registry.
clock-skewThe envelope's timestamp is outside the acceptable window.
lineage-unverifiedNo Herald has endorsed the claimed lineage.

End of card. Authoritative source: [SPEC §6].

Continue exploring