C.W.K.
Stream
Lesson 04 of 04 · published

Revalidation by String Equality

~12 min · revalidation, string-equality, drift, determinism

Level 0Unlit Wick
0 XP0/33 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Is this citation still honest? That question has to be answerable by a machine, mechanically, forever — which means it can't be a question about meaning."

Does the Citation Still Hold?

You pinned a passage two years ago and built a claim on it. Since then the source essay has been edited a dozen times. So: does your citation still point at what you said it did? This is the question revalidation answers, and it has to answer it for thousands of citations, on demand, without a human reading anything. Which means the answer must be computable — and that constraint decides the whole design.

Three States, Decided by String Equality

Revalidation compares the passage's pinned text against the current source, and returns one of exactly three states:

  • Live — the pinned text is still sitting at the recorded offsets. Nothing moved. The citation is exactly as true as the day you made it.
  • Reanchored — the document changed (so the offsets are wrong), but the pinned text is found uniquely elsewhere in it. The words survived; they just moved. The engine can safely update the offsets, because a unique exact match is unambiguous.
  • Drifted — the exact pinned text is not found in the source at all. The words are gone or changed. The engine reports this and does nothing else.

That's the entire state machine. Every decision is == on strings.

No Model Judges Meaning

Look at what's conspicuously absent: no fuzzy matching, no similarity threshold, no embedding comparison, and above all no model being asked "is this roughly the same as before?" That would be catastrophic here. The instant a citation's validity depends on a model's opinion, your evidence is only as stable as that model's mood — and the same citation could validate today and fail tomorrow with no change to any text. Deterministic-first isn't abandoned when the layer gets philosophical. Verification is exact-match or nothing.

Verification must be mechanical, or it isn't verification. The moment a check requires judgment, it stops being a check and becomes another opinion needing review. Design your integrity checks so a dumb machine can run them a million times and always agree with itself. Exact equality is unglamorous and slightly brittle — a single changed comma flips live to drifted — but brittle-and-honest beats flexible-and-unaccountable every time in a system whose whole product is trustworthiness.

Drift Heals

Here's the quietly elegant consequence of pure string equality: drifted is not a death sentence. Because revalidation performs no destructive action — it only reports — a drifted citation isn't deleted or marked permanently broken. It's simply a status. If someone later reverts that edit, or restores the paragraph, the very next revalidation finds the exact text again and the citation goes right back to live. Nothing had to be repaired, because nothing was ever damaged. The state is always recomputed from the current reality, never patched. Even in the evidence layer, the answer is derivation, not repair.

Code

Three states, pure string equality, no destructive action·python
def revalidate(passage) -> str:
    """Is this citation still honest? Decided by string equality — nothing else."""
    text = read_current_source(passage.corpus_id, passage.doc_relpath)

    # 1. LIVE — the pinned text is still exactly where we recorded it.
    if text[passage.char_start:passage.char_end] == passage.text:
        return "live"

    # 2. REANCHORED — the doc moved, but the exact words are uniquely findable.
    if text.count(passage.text) == 1:          # unique == unambiguous == safe
        new_start = text.index(passage.text)
        update_offsets(passage, new_start, new_start + len(passage.text))
        return "reanchored"

    # 3. DRIFTED — the exact text isn't there. Report it; destroy nothing.
    return "drifted"

# Note the absence: no fuzzy match, no similarity score, no model asked
# "is this close enough?". And because nothing is destroyed, if the text ever
# returns, the next revalidation reports "live" again. Drift heals.

External links

Exercise

Imagine a quote you saved from a document, and imagine the document gets edited. Write down the three checks in order: is the quote still at the same spot? If not, does it appear exactly once elsewhere? If not, report drift. Now consider the tempting fourth option — 'it's not exact, but it looks close enough, let me accept it.' Explain in one sentence why adding that option would destroy the value of all three others.
Hint
The moment 'close enough' is allowed, every validation result becomes a judgment call, and the report stops being evidence about the source and starts being an opinion about it. The brittleness of exact matching is precisely what makes a 'live' result mean something.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.