2026-08-28·by Sijie Wang#cybernetics#principles

tdd-net-popper-mechanized

The TDD net: Popper mechanized

The motivating instance of vibe-linter. AI "forgets" to write tests first, or writes tautological tests that pass on creation. Encode TDD as locks:

  • node T: run the new tests, and they must be red to issue the T key — "red-before-token-issuance = forced falsifiability; Popper mechanized." This kills green-on-write tests.
  • writing source (W) needs the T key.
  • node R: run tests after W; loop until green to issue the R key.
  • commit (C) needs the R key.

Two holes the dialogue surfaced: the red must be the right red (target-behavior-missing, not assert False/syntax error); and the model can edit tests to go green → R's "green" = a three-way conjunction: new tests pass ∧ test-file hash matches the T-token ∧ ratchet holds (no green test turns red).

Loops aren't free — termination needs a proof: each iteration burns a fuel token (linear type); exhaustion = escalation to the human queue. Two token types: persistent (completion proofs) + linear (loop fuel). The byproduct — a certificate chain (red-cert → hash-freeze → green-cert → commit-cert) — is worth more than the discipline: it turns human review from "re-derive trust" into "check certificates." Precedent: CI branch protection / required status checks, but moved from merge-time forward to creation-time.

Up: vibe-linter · math home: lcf-for-labor

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →