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 的錢,所以它在存取碼後等待: 輸入存取碼 →

tdd-net-popper-mechanized — Sijie Wang