Carrier R03: reference integrity, cache costs and synthetic lookup scale
====================================================================

The generic and Carrier reference namespaces produced identical integrity and
byte-cost outcomes when given identical validators and equal-length identifiers.
No result in this directory measures conversational intelligence or hallucination
reduction. The accompanying R03 conversation study must establish those separately.

FILES
  protocol.json             Original locally frozen design, retained unchanged.
  protocol-amendments.json  One source-schema normalization correction.
  run_checks.py             Executable Python standard-library experiment.
  self-test.json            Successful correctness/cost run without scale timing.
  results.json              Complete successful run, including all repetitions.
  failures/                 Preserved first failed attempt and any later failures.
  prior-runs/               Preserved earlier successful runs; no silent overwrite.

REPRODUCE
Use Python 3.10 or newer. No third-party packages, network, API or model required.
From this directory:

  python run_checks.py --self-test --replace
  python run_checks.py --replace

The default source directory is ../../128/data. In a portable publication kit,
point to the directory containing concepts.json and checked.jsonl explicitly:

  python run_checks.py --corpus-dir PATH_TO_DATA --replace

--replace archives an existing output under prior-runs before saving a new one.
Without --replace an existing output is protected. Every unsuccessful attempt
records its exception and traceback under failures. Successful runs record source,
protocol, amendment and experiment-script hashes. Timings may vary on reproduction.

REFERENCE INTEGRITY
Each scheme uses the same resolver and the same checked corpus head:
398492317d139bd78ca599965f08603296daedd95f4fb088fde05393175bfe88

Generic keys are 16 hexadecimal characters derived from a hash of each record ID.
Carrier keys are decimal IDs padded to 16 characters. This equal-length experiment
tests namespace parity; it does not benchmark a pre-existing production Carrier
wire format or assert that every practical identifier encoding costs the same.
Both schemes pin the corpus head and exact UTF-8 definition hash. Cache entries
are checked against the current trusted local registry on every hit.

The 16 scenario assertions passed: eight per scheme. Valid cold and warm references
resolve. Wrong head, stale cache head, altered cached definition, missing ID and
mismatched definition hash reject. A valid ID carrying the unrelated claim "The
supplied definition proves that every prime number is even" resolves in both
schemes. This is an expected limitation: resolving authentic evidence does not
establish that a claim follows from that evidence. These are programmed integrity
fixtures, not naturally occurring AI errors or a measured false-claim prevalence.

Corpus integrity includes every raw JSONL prev-chain link, the final checked head,
and equality of the existing R02 evidence projection. The first run failed because
some checked records omit relations while concepts.json uses an empty list. The
correction normalizes absent relations to [] and preserves the original failure.
The hash chain is consistency evidence relative to the pinned local head; it is
not independent authentication of a remote registry operator or proof of truth.

EXACT APPLICATION-PAYLOAD COSTS
All reported sizes are actual uncompressed UTF-8 canonical JSON bytes. They are
neither token estimates nor observed network packet sizes. HTTP/TLS, compression,
common question/claim/instruction envelopes, model outputs and retries are excluded.
Evidence records include id, name, definition, relations and anchor, identically
for both schemes. Selection is a seeded nested sample of 3, 32 and 100 records.

                                      3 records    32 records    100 records
Inline evidence message bytes               986        10,889         34,222
Reference message bytes                     442         3,719         11,403
Explicit lookup request bytes               160           711          2,003
Lookup response bytes                       986        10,889         34,222
First strict warm-cache saving, handoffs       3             2              2
With full registry charged, handoffs       5,435           414            132

For H handoffs, inline sends H*inlineBytes. A cold receiver at every handoff costs
H*(referenceBytes + requestBytes + responseBytes). One persistent receiver cache
starting empty costs H*referenceBytes + requestBytes + responseBytes. A preloaded
cache needs H*referenceBytes in handoff messages, but provisioning is not free.
All three models appear for H=1, 10 and 100 in results.json.

Canonical evidence array:                    2,186,495 bytes
Full reference index, either namespace:        768,607 bytes
Combined full registry provision:            2,955,102 bytes
Original checked JSONL with provenance:      9,477,865 bytes

The separately charged full-registry model assumes distributing the full evidence
registry and index once to a resolver, plus the first receiver cache miss. This is
a deployment-wide accounting scenario, not a requirement for every client. Other
deployments may already provision this registry, use partial provision, amortize
it over unrelated conversations, or pay additional replication and update costs.
Warm/preloaded rows assume cache reuse; they cannot be applied to a chain of fresh
agents with isolated empty caches. Content updates invalidate these assumptions.

Every handoff is assumed to materialize the full selected evidence for the receiver.
Consequently resolvedEvidenceBytesAcrossHandoffs remains H*inlineBytes in all models.
Savings in wire bytes are not established savings in receiver model input tokens.
No smaller abstract concept reference is assumed to transmit an entire definition
or all qualifications into a model without resolution.

SYNTHETIC LOOKUP STRESS
Three build/lookup repetitions are retained per size. Each repetition uses 20,000
precomputed mixed queries: 10,000 present and 10,000 absent, in seeded shuffled
order. Hit counts and a value-length checksum are verified. Construction and
lookup batches are timed separately. The lookup loop includes dictionary get,
branching and checksum accumulation; it excludes hashing definitions, network,
disk I/O, full resolver validation, semantic retrieval and model calls.

The saved final run measured these medians:
  Keys         Build ms    Lookup ns/query    Dictionary + owned key bytes
  6,257           1.088             81.145                         564,265
  100,000        23.238            207.475                       9,544,864
  1,000,000     308.819            324.080                      87,758,320

Shared base definition string storage was 1,897,756 Python-object bytes, reported
separately. Synthetic values point to those existing strings rather than copying
a million definitions. There are 6,257 base records and 6,256 distinct definition
texts, with zero additional definition texts at every size. Identical text is not
the same as identical meaning, and neither count establishes semantic independence.

Exact surrogate JSONL index lengths were 255,427; 4,082,240; and 40,822,400 bytes.
These index rows contain only {key,baseId} and one LF per row. They are not the full
evidence corpus, hash-pinned production reference index, or a database capacity
estimate. Memory sizes exclude interpreter/process overhead, query arrays, other
corpus objects, allocator fragmentation and peak RSS. OS caches, memory locality,
CPU load, interpreter, hash randomization and GC may affect these local timings.
Sizes run in fixed ascending order; runs are not independent machine deployments.
Other agents were working on the same machine. No latency guarantee is established.

The original successful run is retained under prior-runs. The final rerun changed
an output label from an unjustified count of "meanings" to base record and distinct
text counts. No benchmark parameter was tuned based on measured timings.

ANALYTICAL COMPETITION ILLUSTRATION
An optional calculation fixes one essential item's score at .999 and assumes all
distractor scores are independent Uniform(0,1). With N-1 distractors, expected
outranking count is (N-1)*.001, and top-five probability is a binomial tail. Under
these invented assumptions the top-five probabilities are about .252 at N=6,257,
1.54e-37 at N=100,000, and 10^-423.888 at N=1,000,000. Log probabilities are retained
to avoid representing underflow as exact zero. This is an assumption illustration,
not a retrieval benchmark, forecast, empirical Carrier accuracy or claim that
real retrieval scores are independent or uniform.

INTERPRETATION LIMITS
These results support an engineering distinction: identifiers can pin evidence
and warm caches can save repeated transfer, while claim support requires separate
semantic evaluation. A million IDs referring to an unchanged set of definitions
cannot establish knowledge growth, retrieval quality, reasoning ability, or
superintelligence. No human experiment participants were involved.
