What does Beyond Distillation conclude, in numbers, about “Crystallinity and Bootstrapping: Mutation Testing, a Composite Index and the Limits of Self-Fingerprinting”?

Answer: Chapter 6 tests the organ itself with mutation testing, a crystallinity index and fingerprint self-checks: an outside anchor catches all of 1,000 random changes, while a replaced self-check catches none.

Scope of the numbers: Parameters are illustrative and all calculations are generated by the book's programs. This is general business analysis, not investment, legal or medical advice, and the code it generates is teaching material deployed to no site.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1000

manifest1e068fc5d7484f2ca44789e365889a55
f8ca8d18ccdcb3620c6e84b81c74835b
anchor696788d12968bec71c48c0052e3360f1
quine reproduces its own text: True
quine fingerprint 2bf977a65f705d7020948bc8
single-character changes tried1,000
caught by honest self-check1,000
caught by a replaced self-check0
caught by the outside anchor1,000
Show the full program
# Chapter 6. p63: self-check by fingerprint, and where it stops working.
# An organ carries four parts (price table, state table, objection tree,
# probe settings). Its manifest is the SHA-256 of the parts in a fixed
# order with their lengths. At start-up it recomputes the manifest and
# refuses to run on a mismatch. A small quine shows a program text that
# reproduces itself exactly, so the fingerprint can cover the checker's
# own source. Then the limit: a checker that has itself been replaced
# can report the stored digest and pass anything (Thompson's point); an
# outside anchor, a second digest kept in a ledger the organ cannot
# write, still catches it. Self-check only: nothing is copied or spread.
import hashlib
import random

PARTS = [
    ("price", "tier,off,seats,price\n1,0.45,50,71.90\n2,0.30,100,83.90\n"
              "3,0.15,200,101.90\n4,0.00,open,119.90\n"),
    ("state", "landing>form;form>free_view;free_view>paywall;"
              "paywall>checkout;checkout>paying;paying>paid;"
              "paying>pay_failed;pay_failed>checkout;paid>report\n"),
    ("objection", "price.too_high;trust.method;trust.refund;"
                  "timing.later;fit.language\n"),
    ("probe", "p0=0.040;p1=0.028;h=4.0;lam0=2;lam1=4;h_err=6.0\n"),
]


def manifest(parts):
    h = hashlib.sha256()
    for name, text in parts:
        b = text.encode("ascii")
        h.update(name.encode("ascii") + b"|" + str(len(b)).encode() + b"|")
        h.update(b)
    return h.hexdigest()


def anchor(parts):
    h = hashlib.blake2b(digest_size=16)
    for name, text in parts:
        h.update(name.encode("ascii") + b"\x00" + text.encode("ascii"))
    return h.hexdigest()


def honest_check(parts, stored):
    return manifest(parts) == stored


def replaced_check(parts, stored):
    return True          # a subverted checker that always says "fine"


def flip(parts, rng):
    i = rng.randrange(len(parts))
    name, text = parts[i]
    j = rng.randrange(len(text))
    c = chr(((ord(text[j]) - 32 + rng.randint(1, 94)) % 95) + 32)
    new = list(parts)
    new[i] = (name, text[:j] + c + text[j + 1:])
    return new


if __name__ == "__main__":
    stored = manifest(PARTS)
    ledger = anchor(PARTS)
    print("manifest  " + stored[:32])
    print("          " + stored[32:])
    print("anchor    " + ledger)
    q = "s=%r;print(s%%s)"
    src = "s=" + repr(q) + ";print(s%s)"
    print("quine reproduces its own text: {}".format(q % q == src))
    qd = hashlib.sha256(src.encode("ascii")).hexdigest()
    print("quine fingerprint " + qd[:24])
    rng = random.Random(37863)
    n, caught_h, caught_r, caught_a = 1000, 0, 0, 0
    for _ in range(n):
        bad = flip(PARTS, rng)
        caught_h += 0 if honest_check(bad, stored) else 1
        caught_r += 0 if replaced_check(bad, stored) else 1
        caught_a += 0 if anchor(bad) == ledger else 1
    print("single-character changes tried     {:,}".format(n))
    print("caught by honest self-check        {:,}".format(caught_h))
    print("caught by a replaced self-check    {:,}".format(caught_r))
    print("caught by the outside anchor       {:,}".format(caught_a))

Single source and citation

Fan, Y. (2026). Beyond Distillation: Executable Business-Organ Synthesis, Generative Code Crystallisation and Living-System Bootstrapping (Version 1.0.0), Chapter 6: Crystallinity and Bootstrapping: Mutation Testing, a Composite Index and the Limits of Self-Fingerprinting. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-378 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026378,
  author    = {Fan, Yafu},
  title     = {Beyond Distillation: Executable Business-Organ Synthesis, Generative Code Crystallisation and Living-System Bootstrapping},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book