AI Initiative logoAI Initiative
Reading room / Manthan

T-017 — HERALD v0.2 Conformance Test Runner

T-017 — HERALD v0.2 Conformance Test Runner. Covers Run; What it does; Output formats; Exit codes.

Conformance method / historical test inventory
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

T-017 — HERALD v0.2 Conformance Test Runner

Id

manthan-herald-protocol-tests-conformance-readme

Project

Manthan

Source path

manthan/herald-protocol/tests/conformance/README.md

Source sha256

04bc2d59fc45e5553b1aa56b7d5b984ddce6c8523002dc6db549e82b378f2877

Local copy sha256

04bc2d59fc45e5553b1aa56b7d5b984ddce6c8523002dc6db549e82b378f2877

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

Conformance method / historical test inventory

Summary

T-017 — HERALD v0.2 Conformance Test Runner. Covers Run; What it does; Output formats; Exit codes.

Topics
  • Protocol and verification
  • Run
  • What it does
  • Output formats
Theme

Protocol and verification

Priority

reference

Related ids
  • manthan-herald-protocol-spec
  • manthan-herald-protocol-threats
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.
  • Historical record: current deployment, task completion and test status must not be inferred from this date-bound document.
Word count

614

Bytes

4827

Source relative

herald-protocol/tests/conformance/README.md

Remote mirror

manthan/herald-protocol/tests/conformance/README.md

Full text preserved

True

T-017 — HERALD v0.2 Conformance Test Runner

A small TypeScript runner that loads the canonical test vectors produced by T-001 and exercises the reference TypeScript library produced by T-003, reporting deterministic pass/fail per vector and a per-category summary.

Output path declared in TODO.md line 32: tests/conformance/. This deliverable lives in the manthan sandbox at learning/herald-protocol/manthan/state/findings/T-017/ until promoted.

Run

cd learning/herald-protocol/manthan/state/findings/T-017
npm test          # node --test driver, 12 assertions
npm run run       # the runner CLI, human-readable report
npm run run:json  # the runner CLI, JSON report (CI-friendly)

Node 24 is required (--experimental-strip-types). No npm install is needed; this directory has no third-party dependencies.

What it does

1. Loads learning/herald-protocol/test-vectors/v0.2/vectors.json (overridable via --vectors-path or VECTORS_PATH).
2. Verifies the keypair derivation against the library: each declared keypair is re-derived from its seed; if the derived sigil or public-key bytes disagree with the vector, the runner aborts. This catches SPEC §2.1 lines 74-84 regressions in the library.
3. Dispatches each vector to a category through a small registry. The built-in envelope-core category covers the seven T-001 vectors; T-024 (cultural-attestation) and T-026 (reserved-sigil rejection) attach by calling registerCategory() from their own modules.
4. Reconstructs the wire envelope from the vector inputs and calls verifyEnvelope from the T-003 library. Replay vectors are reconstructed by following inputs.based_on; tampered vectors are reconstructed in their post-tamper form so the verifier exercises its id-mismatch path.
5. Compares observed verdict against expected, classifies failures, and emits a stable report.

Output formats

Exit codes

CodeMeaning
0All vectors passed or were skipped on a declared coverage gap.
1One or more genuine implementation failures. The runner has surfaced a real regression.
2Every failure is flagged as known-interop-gap (see NOTES.md). Distinguished from 1 so CI can alert without panicking.

Files

Extending (T-024, T-026)

Both follow-on tasks add new vector files alongside tests/conformance/. The extension shape:

import { registerCategory, type Category } from "./categories.ts";

const culturalAttestation: Category = {
  name: "cultural-attestation",
  description: "T-024 vectors exercising CHARTER-driven attestation handling.",
  matches: (v) => v.name.startsWith("cultural-"),
  run: (vector, ctx) => {
    // build an envelope, call verifier, return VectorReport
  },
};

registerCategory(culturalAttestation);

T-024 should land its vectors under tests/conformance/cultural/ (per TODO.md line 129) and import the runner's category API. T-026 lands under tests/conformance/reserved-sigils/ (per TODO.md line 131). Both should keep the current envelope-core category untouched.

Caveats

The runner reports two pre-existing divergences between T-001 and T-003 as known-interop-gap. These do not block the runner; they are the very thing a conformance runner exists to surface. Read NOTES.md before triaging any failure.

Continue exploring