The three-stage pipeline

Three-step Traceweave workflow: Fingerprint, Private catalogue, Checkable reportStep 1 extracts deterministic token fingerprints and original byte spans from local source files. Step 2 stores those fingerprints in a private local catalogue that contains no source text. Step 3 compares two catalogues under a pinned configuration to emit a byte-identical, checkable comparison report.STEP 01 · EXTRACTFingerprintTurns local files intodeterministic fingerprintsand exact content spans.STEP 02 · STORE LOCALLYPrivate catalogue13c53975ffd60dcc · [16, 29]no source text storedKept offline outside git trees.Holds digests and fingerprints,never your raw content.STEP 03 · COMPARECheckable reportcontainment: 14/14 · jaccard: 14/39bodySha256: 081d8600…Emits matched byte ranges,config digests, and exact countsthat another party can re-run.
Comparison reads only catalogues and pinned configuration bytes — never source text — so a recipient with the same inputs reproduces the exact canonical report bytes.
Stage 1

Extract fingerprints

A profile lexer scans UTF-8 input bytes with pinned Unicode 17.0.0 tables — no parser, compiler, or network access. It produces two streams: an exact channel keeping names and literals, and a normalized channel clearing identifier and literal values so simple renaming still aligns.

Overlapping token k-grams are hashed to 64-bit SHA-256 prefixes and selected with rightmost-minimum winnowing. Every fingerprint keeps its original half-open UTF-8 byte span. spec/extraction.md

Stage 2

Build a private catalogue

Selected fingerprints, artifact SHA-256 digests, and the exact extraction configuration bytes are serialized into a canonical JSON catalogue. Source text, token strings, and file paths are discarded.

Catalogues are stored outside git working trees by default. Because hashes are unkeyed, someone holding a catalogue can still test guessed code against it — so catalogues are treated as private material. spec/catalogue-report.md

Stage 3

Compare and report

Comparison reads only the reference catalogue, candidate catalogue, optional boilerplate-suppression catalogue, and comparison configuration bytes. It never reads source text.

Matching hashes on a consistent offset diagonal merge into regions when their reference-position gap is at most mergeGap, and become reportable once they reach minRegionDistinctHashes distinct non-common hashes. spec/catalogue-report.md

Worked example from published test vectors

Finding a small Go function inside a larger file (go-function-in-host)

This example comes verbatim from the published matching vectors (test-vectors/matching/extraction-go.json and test-vectors/matching/example-report.json). Both files are extracted under go-tokens draft-1 with k = 5 and window = 4, and compared with minRegionDistinctHashes = 2 and mergeGap = 4.

Reference: sum.go

40 tokens · 14 exact fingerprints · 17 normalized fingerprints

func sumPositive(values []int) int {
	total := 0
	for _, v := range values {
		if v > 0 {
			total += v
		}
	}
	return total
}

Candidate: host.go

100 tokens · 39 exact fingerprints · 42 normalized fingerprints

package stats

type Point struct {
	X, Y float64
}

func (p Point) String() string {
	return fmt.Sprintf("(%g, %g)", p.X, p.Y)
}

func sumPositive(values []int) int {
	total := 0
	for _, v := range values {
		if v > 0 {
			total += v
		}
	}
	return total
}

var names = map[string]bool{"a": true, "b": false}

What the canonical report records

Channel / modeOutcomeReference in candidateWhole-file JaccardReference byte spanCandidate byte span
exactmatch14/1414/39[16, 124][146, 254]
normalizedmatch17/1717/42[0, 126][130, 256]

Why two metrics matter: in the exact channel, every fingerprint from sum.go appears inside host.go (14/14 directional containment), while whole-file Jaccard similarity is only 14/39 because host.go has surrounding code. Reporting raw unreduced fractions keeps the small copied fragment visible.

Canonical digest: the RFC 8785 canonical report body hashes to 081d860084af229d77137e32dedd9f40f7d0bbeca6b18424b6d51cc1d89ed3be. As evidence that the specification can be implemented independently, both the Rust and Go implementations emit those exact deterministic, byte-identical report bytes for this vector.

Two companion cases from the same vector set

go-renamed

Identifiers changed

When variable and function names are renamed, the exact channel reports no-shared-fingerprints (0/4), while the normalized channel still matches (4/4). test-vectors/matching/matching.json

go-independent-same-task

Independent control

When someone writes a separate solution to the same summing task, exact reports no-shared-fingerprints (0/14) and normalized reports below-minimum-evidence (2/17 split across single-hash regions). test-vectors/matching/matching.json

Evidence architecture

Independent layers, recorded separately

Traceweave keeps exact byte digests, similarity comparison, cryptographic signing, timestamps, and origin notes in separate fields so each layer can be verified on its own (spec/core.md):

LayerWhat it recordsStatus
Exact artifact & commitmentSHA-256 subject digest and private salted catalogue commitment (32-byte nonce)Draft format & vectors
Fingerprint comparisonDeterministic extraction, private catalogues, and seed-merge comparison reportsWorking (Go & Rust case studies)
Signed & timestamped recordsDSSE / in-toto attestation, explicit trust policy, and optional RFC 3161 timestampPlanned (M4.3–M4.6)
Origin & licence historySeparate review-packet record linked by bodySha256Planned (M2.7)
Agent interoperabilityOptional CLI-wrapping skill with transcript canary checksPlanned (SK.1–SK.2)