Skip to content

Trust Residuals Evaluation Artifact

This folder contains the public, deterministic corpus evidence for the navigation-QR trust residuals paper.

Files

  • trust_residuals_corpus.v1.json is the public corpus manifest. Each case includes a synthetic QR artifact identifier, decoded payload, verifier profile, policy/governance reference, evidence facts, expected residual vector, and exactly one expected result: capture_outcome for D0 or primary_state after decode.
  • trust_residuals_results.v1.json is the machine-readable evaluation report generated from the corpus.
  • trust_residuals_results.v1.md is the human-readable report with semantic-match, baseline unsafe-positive/attention-undercut/state-mismatch, and residual-ablation tables.
  • key_lifecycle_evidence.v1.json is a public-safe, allowlisted extraction from the E1 persistent-revocation and E2 rotated-key backdating runs. It pins the ignored source-record hashes and exposes only checkpoint times, key states, decision states, verifier stages, and the timing facts needed to evaluate the two findings.
  • fixtures/ contains deterministic PNG, PDF, and email fixtures used by artifact-integrity corpus cases. Image, PDF, and email fixtures are extracted and analyzed by the local QR artifact analyzer during evaluation.

Rebuild

Run:

./backend/.venv/bin/python scripts/generate_trust_residuals_artifact_fixtures.py
./backend/.venv/bin/python scripts/trust_residuals_evaluation.py --check
./backend/.venv/bin/python scripts/key_lifecycle_evidence.py --check

The generator and runner are intentionally offline and deterministic. They do not use Postgres, Redis, NATS, private keys, remote reputation feeds, or live scanner services.

The key-lifecycle checker is also offline and deterministic, but the evidence it validates came from a controlled local Postgres-backed compose deployment. The full E1/E2 records remain ignored because they contain complete trust-store snapshots. Maintainers can reproduce the allowlisted record and verify its source hashes by supplying both raw run paths to scripts/key_lifecycle_evidence.py --check.

Scope

This artifact measures agreement on an author-constructed controlled corpus. The corpus comparator checks capture outcome or primary state and annotations without regard to annotation order. The separately encoded internal formal-table comparator checks primary state and annotation-set equality with a duplicate guard. Neither comparator establishes exact agreement on the draft's full output of primary state, ordered annotations, and attention. Attention properties are checked elsewhere; they must not be attributed to these comparators alone.

The 37 corpus cases and historical 2,212,160 modeled sweep comparisons are internal checks, not results from independent implementers. That historical grid omits the declared unavailable destination/redirect tiers; the additive check below covers them without rewriting the frozen v1 result files. The runtime differential suite classifies 15 corpus cases as in scope, none as deliberately divergent, and 22 as out of scope for that suite. C15a now exercises an unsigned URL's deterministic runtime block. C2 is excluded: an unknown local key cannot prove the valid-but-unaccepted signature required by D2. Its in-scope assertions compare expected product state and attention, not the full model output on identical acquired residuals. Excluded cases are not runtime passes.

The decode-only, HTTPS-only, signature-only, and reputation-only functions are simplified author-defined baselines. Their unsafe-positive and attention-undercut counts describe those functions on the supplied fixtures, not measured browser, mobile-platform, or Safe Browsing behavior. They do not by themselves establish novelty or the benefit over a complete issuer-authorization implementation.

Additive exact-output check

The separate checker below validates primary state, annotation order and the supplied attention value. It does not change either historical comparator or rewrite the frozen corpus and result files:

./backend/.venv/bin/python scripts/trust_residuals_exact_output.py
# From backend/, using that environment:
./.venv/bin/python -m pytest -q tests/test_trust_residuals_exact_output.py

The expected state and annotation membership reuse the separately encoded formal table. Annotation order and attention are derived from the posted draft-elmasri-qr-trust-residuals-00, sections 7.1, 7.2 and 8.2. Expected outputs do not call the production decision or attention helpers. Reusing the formal table means this is a stronger comparison, not another independent implementation or a new proof of the table's interpretation.

Expected field or rule Derivation / test
Primary state and annotation membership Existing formal table; literal examples cover adverse precedence, profile differences and mandatory evidence
Accumulated annotation order Section 7.2 step 6: freshness, unavailable runtime evidence, artifact warning, redirect warning, testing-profile marker
Invalid-claim testing exception Section 7.1 D3: invalid-claim warning then profile warning; terminal before subsequent block rules
Other terminal warnings D11 preserves artifact warning; D13/D14/D15 use incomplete-verification warning without later accumulation
Attention Section 8.2's state/annotation mapping, compared to the actual supplied value rather than reconstructed by the comparator
D0 Separate unreadable capture outcome and re-capture action; never a decision primary state
Negative controls Changed order, wrong attention, duplicates, unknown values, missing fields and mixed capture/decision outputs fail comparison

The additive v2 grid contains all 11,520 vectors over the posted Table 1 tier vocabulary under five profiles and all 64 mandatory-family subsets: 3,686,400 decision comparisons. D0 adds 320 repeated invocations across those policy contexts, not 320 distinct physical capture experiments. The checker reports counts, mismatches and zero independent implementations; it exits nonzero on a mismatch. It does not read raw network evidence or validate the scanner's appraisal of a URL or managed envelope.

The literal-output tests also exercise the actual production serializer with temporary annotation-order and attention faults. Those faults must be detected while the expected output stays unchanged. The modeled grid does not exhaust arbitrary future tier vocabularies. decide_validated rejects undeclared tier, profile, family and mandatory-list inputs before Delta; the internal decision core retains defensive treatment of unexpected tiers separately. The research harness additionally validates rich record shapes, causes and evidence references.

It does not prove user comprehension, real-world scanner adoption, runtime-feed accuracy, artifact-forensics precision, or production governance legitimacy. Those require separate deployment and user-study evidence.

The E1 record is narrower still: it captures the verdict before and after an operator-observed API restart while Postgres stayed up, but the source record does not carry a container identity or restart receipt. It is not a machine-verifiable restart attestation or longitudinal field result. E2 shows that a holder of a retired private key can sign after rotation and self-assert an earlier in-window issued_at; it does not establish how often that attack occurs in deployment.