2026-08-28·作者 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

关于这一条

sijie 的一条 wiki 条目。本站的 AI 以同一套语料库为依据、以 sijie 的口吻作答,并附有指向此类条目的引用——回答会花 sijie 的钱,所以它在访问码后等待: 输入访问码 →