{"slug": "rules-that-bind", "title": "Rules That Bind", "summary": "A backup watchdog script failed on 13 November because a DNS resolution failure made a listing command return empty output, which the script treated as \"none\" rather than an error, despite the repository's CLAUDE.md already stating that \"no information is not bad news.\" The fix, merged on 30 November with a five-case regression test (four red against the old script), exposed that nothing ran the test; a pull request that same day added eleven more suites and 320 checks to the required CI job, and on 1 December the author ruled that a parked 2 September design spec's verifier should be built. The work was done by Claude sessions under the author's direction, and the resulting system pairs a rule map — each rule tied to its CLAUDE.md phrase, dated incident and enforcer (code or hand) — with pin-based mutation checks whose verdicts include KILLED, SURVIVED, STALE, TWIN FAILED, WEAK, VACUOUS and UNPROVEN.", "body_md": "On 13 November a script of mine reported that the offsite backup held no archive of my removable drive: “no yo-stream archive … found at all”. The drive is called yo, and the archive was there. What had failed was DNS. The backup host’s name did not resolve, the listing command returned nothing, and the script read nothing as none.\n\nThe rule that script broke was already written down. The instructions file of the repository it lives in, the `CLAUDE.md` that every coding session there reads, says of the watchdog that “no information is not bad news”. It says of the site audit that “Unknown is never a pass”. It says of the backup freshness check that an unreadable repository exits with status 75 and pings nobody. My own notes, which every session also reads, say that “an enumeration that returns zero is evidence about your command before it is evidence about the keyring”. That is one rule four times, each time about some other program.\n\nThe repository had also said what would happen. A design spec from 2 September, parked at my review since, says this about a different rule: “Writing it into `CLAUDE.md` would make it *findable*; it would not make it *checked*.”\n\nThe fix went in on 30 November, with a regression test of five cases, four of them red against the old script. Then I asked what ran that test, and the answer was nothing. Until that day CI had run two of the repository’s twenty or so suites. A pull request merged the same day put eleven more, 320 checks, into the required job, and the garmin test was not among them. On 1 December I ruled that the parked spec’s verifier should be built, cut down to what one day could finish. This essay reports that day.\n\nI should say who did the work. Claude did: sessions I directed, one holding the plan, others implementing each task, others reviewing each implementation without having written it. Claude wrote the code, the tests, the reviews and this draft. I set the direction, approved the plan, and own the decisions listed near the end that are still open. The repository is private, so I quote it here and cannot link it.\n\nFor a sentence to bind, four things have to exist besides the sentence: a reading that does not depend on who is reading, a reader other than the party it governs, a test that terminates with an answer, and a refusal. Those are old requirements, Fuller’s for law and Rice’s for what can be decided, and parts [6](https://gfrm.in/posts/build-the-court-first/) and [7](https://gfrm.in/posts/the-third-knock/) have already set them beside a rulebook. I will not argue them again.\n\n“No information is not bad news” had none of the four where the garmin script was concerned. Nor was the missing ingredient a programming language. The script was a program, and it enforced nothing, because in bash a listing that failed and a listing that came back empty are the same value unless you ask for the exit status. The sentence had no truth condition in that file until the test gave it one: stub the listing to fail, and require status 75.\n\nWhat was built is small in outline. A file declares every test suite, and a suite passes only on evidence. A second file, the map, has a row for each rule: one sentence, the phrase in `CLAUDE.md` it comes from (which must still occur there, or the run fails), the dated incident that earned it, and its enforcer, which is code or `hand`. Each coded rule carries a pin, which readers of [part 5](https://gfrm.in/posts/assize-at-the-seal/) have met: a planted defect, the mutant, which the check must catch, beside an unedited twin it must pass.\n\nTwo parts of that come from [jack](https://github.com/renavondata/jack), the court this series has been describing since October: a map that names each principle’s enforcer as `code` or `hand`, and a pin runner whose verdicts are KILLED, SURVIVED, STALE and TWIN FAILED. New here are the verdicts that came out of the day’s own failures: WEAK for a pin, VACUOUS for a rule that examined nothing, UNPROVEN for a rule with no killed pin, and NOT JUDGED.\n\nDijkstra wrote in 1969 that “program testing can be used to show the presence of bugs, but never to show their absence”. Most practitioners can quote it and then treat a green suite as showing absence anyway, because nobody told them what a green shows instead. It shows this much:\n\nA green run multiplies my odds that the rule holds by that ratio, and does nothing else. Good (1950) called its logarithm the weight of evidence. Mayo (1996), who does not accept that a likelihood ratio is the whole of evidence, asks a neighbouring question: a claim has passed a severe test only if the test would very probably have gone worse were the claim false. Both send me to the same place, which is the world where the rule is broken, to ask what colour the run is there.\n\nThat world is not one world. The rule can be broken in many ways, and the denominator is an average over them, weighted by how likely each is to be the way it really breaks. A mutant builds one of those ways and looks. If the run is red, I know that P(green | this break) is zero. That is one point of the denominator, and how much it says about the rest depends on how typical my chosen break is of the breaks that will happen. [Part 7](https://gfrm.in/posts/the-third-knock/) conceded that my mutants are bugs I imagined. In these terms: I had been sampling the denominator from my imagination and reporting the sample as the population. [Part 4](https://gfrm.in/posts/fifteen-ways-past-my-own-gate/) said the same of a seeded kill, that it proves the guard has that tooth.\n\nThe twin does a different job. It shows that the unedited tree passes under the same conditions, so the red can be attributed to the edit and not to the scaffolding. Coverage does neither job. It records that a line ran, not that any assertion would have noticed a different line. And writing the test first and watching it fail is one more point of the denominator, taken on the one day the broken world existed for free. That is something test-first buys that its advocates rarely name.\n\nWhat the day added to parts [3](https://gfrm.in/posts/signed-before-the-code-existed/) and 4 was a count of greens whose ratio was near one, each for some break that was easy to name.\n\n`[1-9][0-9]* passed`. That matches “1 failed, 122 passed”. Exit status happened to catch it; the proof did not. An implementer tightened it unasked.`SKIP` for a missing tool and exited 0.\nThe 13 November bug is a two-valued check in a three-valued world. The script could say found or missing, and DNS failure is neither. Once I had the shape I saw it everywhere in the work.\n\nA suite that skipped has not passed. The verifier counts skips and fails a suite that reports more than it declared. A lint rule that examined nothing fails as VACUOUS. A unit whose base file lives in another repository is printed as NOT JUDGED on every run, never counted as clean. There are thirteen such lines today. And the triage agent that merges its own fixes was deciding from the exit status of `gh pr checks`, which cannot tell failed checks from no checks reported yet. Seconds after a push, no checks is the normal state. It now merges only when the list is non-empty and every entry passed, and the prompt says “No information is not a pass.”\n\nThe third verdict is also what ended the day’s longest loop. A review found that a unit run from a directory outside the repository was being counted as read when its script had not been. The fix handled the named case. An independent re-check found another spelling of the same thing, then another: `sh bin/x`, a `flock` wrapper, `python3 -m`, `env -S`. An allow-list of launchers can only be incomplete. The fourth round closed the hole by refusing to judge that shape at all, and the fifth, which was the cap, tidied one way of spelling a path. One real unit has the shape, and it does run a script the linter never read. From the second round to the fifth the linter’s counts on the real tree did not move by one, because every round was about inputs that do not exist yet.\n\nRefusing to judge was the cheap answer and the sound one, and three rounds went on trying to be clever first.\n\nA red has its own ratio, P(red | broken) over P(red | fine), and this is where an unreliable test does its damage. A test that sometimes fails on a sound tree barely changes what its green is worth. It changes what its red is worth. The first run on GitHub’s clean runner had the backup suite at 95 passed and 20 failed, on code that was fine: the suite redirected the drive’s paths to scratch and left another list pointing at my real home directory, so it passed only on a machine that had one. The runner’s log showed the last forty lines of that suite, all passes, so the first red run displayed no failure at all. Three other suites bind a mock server to a random port in a range that overlaps the one the kernel hands out; one of them, run five times, failed once. A red from any of these says little, and people learn to rerun.\n\nThe 13 November message did the same to its script. It raised my estimate of P(red | fine) for every later message. The fix lowered the true rate. My estimate will come down only as its reds turn out to be true.\n\nBefore: no rule was code, there were no pins, and the test that guarded the newest fix ran nowhere. After: 35 invocations in 11 suites on every pull request, in about five and a half minutes; 84 test-shaped files, none uncovered, and a new test file that no suite runs fails the build by name; 20 mapped rules, of which 10 are lint rules, 1 is decided by a test suite and 9 are by hand; 13 pins, all killed. The verifier’s own suite has 1,234 tests. The three pull requests that built it added about 9,400 lines, some 2,100 for the test runner and the rest for the linter and its pins.\n\nThe first complete run, on my laptop, found two suites red. One was fixed the same day by another session. In the other, a test in a business job had been failing since about 3 November: its fixtures were dated 27 October and it compared them with the real clock through a seven-day window. Nobody had run it for four weeks. The other nine suites passed on first contact, 1,610 checks between them.\n\nThe prose was rotten too. Surveying the tree to write the rules turned up two false sentences in the instructions and one broken file. “All services use `restart: unless-stopped`” was contradicted by 18 services. A workflow tool was “pinned to” a machine it had left on 17 November. A compose file edited on 19 November held duplicate keys, which a lenient parser resolves silently by taking the last; 69 lines came out. And one rule could not be coded as written: “No schedule and no check anywhere depends on a wall clock or a timezone” is contradicted, read literally, by thirteen timers. Its row says the sentence needs narrowing first. That is a finding about my English that only an attempt to compile it could make.\n\nHere is the result that cuts against the method. The seven rules about unit files, on their first run and before any exemption, produced seven findings. Five were timer jobs that guard themselves inside their scripts, and one was a new unit whose own comment explains its deviation; those six are exempt, each with a reason and a pattern naming the one finding it excuses. One was real: a unit that waited for the network, failed on timeout, and had no `Restart=`. So on the units, the prose had worked. About 7,300 lines of linter and pins found one missing directive in the tree as it stood. The value claimed for them is forward, on the next unit a session writes at speed, and nothing in this essay has measured that.\n\nIf my mutants are draws from my imagination, the remedy is to draw from somewhere else, and the repository has a record of the ways its rules really broke. Where an incident exists, the pin is its reverted fix. The garmin pin puts `|| true` back inside the listing, so a failed list reads as an empty one. The script then prints the 13 November message and the test fails on its “repo unreadable” case, status 1 where 75 is wanted. Another pin deletes `BindsTo=` from a unit, which approximates its state on 8 September, when it started seven seconds before the drive mounted and sat failed for three and a half hours. Each is still one point. It is a point the world chose.\n\nThat second pin earned its place before it merged. The obvious way to write the rule is to check every unit that has `BindsTo=` on the drive. That rule passes the whole tree, and its own incident’s mutant survives it, because the incident was a unit with no `BindsTo=` at all. A rule scoped to the units that already comply is green forever.\n\nThen the review found a survivor that no pin had tried. Deleting the guard from a drop-in whose base unit and timer live in another repository went unnoticed: the linter assumed such a unit was long-running. Worse, the long-running rule would then have advised adding `BindsTo=` to it, and binding a timer-fired job to the mount is the incident of 27 September, when two timers went dead at login. My rule would have recommended a past outage. The fix was a third shape, unknown, reported once and naming both acceptable forms.\n\nDeMillo, Lipton and Sayward (1978) reported what they called the coupling effect: test data that tells a program from its simple mutants tends to tell it from complex errors too. It is an observed regularity, and that review is a case where it did not carry. Thirteen killed pins are thirteen points.\n\nAnd one defect was found by no test of any kind. Two units allowed six starts in forty-five minutes before giving up and letting the dead-man check page. With the restart delay growing as configured, only five starts fit in forty-five minutes. The limit could never trip. A reviewer found it by doing the sum. It is a rule now, with a pin that puts the six back, and three units clear it with margins of 60, 224 and 309 seconds. It holds only if each failure is the network wait, and whether a later timer start resets systemd’s counter was not verified. The README says both.\n\nThe author of the code and the author of its test were the same model, and parts 6 and 7 have said what that does: for a misconception they share, the test is green in the broken world. The repository cannot afford jack’s second model family. What it could afford was four cheaper kinds of separation, and the day shows what each caught.\n\n*A reader who did not write the code.* The first parser of unit files let a comment ending in a backslash swallow the next line. Eighteen tests had been written from the brief and none covered it, because the brief had not listed the case, and the brief came from the session directing the work. A reviewer’s probe found it. Reviewers also found the surviving mutant, the unreachable limit, and regressions in the shell lexer that its own fixes had opened, the last of them by running 272 commands through the old lexer and the new and comparing.\n\n*A machine that is not mine.* The clean runner caught the backup suite’s dependence on my home directory. No reader had.\n\n*Repetition.* Five runs caught the port collision. One run would have been green four times in five.\n\n*The world’s own breaks.* The incident pin caught the rule that was scoped to the compliant.\n\nThe author was not blind either, which complicates the tidy version. Implementers tightened the pytest proof unasked, reported their own vacuous tests, and flagged four places where my rule definitions let an unknown pass. A reviewer then found a fifth.\n\nAlpern and Schneider (1985) proved that every property is the intersection of a safety property, which a finite record can refute, and a liveness property, which none can. A lint rule is safety at the pull request: here is the file, here is the line. That the backup happened is liveness, and no pull request refutes it. It is tested in production by a dead-man check, a test the world runs, and its reds are judged by the ratio above.\n\nNine of the twenty rows are by hand. Among them: two describe state outside the tree, on the monitoring service and on each machine. One needs its sentence narrowed. One is a judgement about what a script does. One is simply not coded yet. And one is the general form of the rule this essay opened with, “A check that cannot see what it measures reports unknown, never a pass”, by hand because it is “a property of each check’s own logic; only the tested instances are code”. The garmin script is one tested instance. The next script is not.\n\nThree more things are not done. The new CI job is not a required check: making it one is my decision, and the plan puts it to me after a week of green runs that include a pull request from the triage agent. A quarantined test has no expiry; the first quarantine of the day went stale within hours, when another session fixed the tests it had set aside, and a reviewer caught that, not the tool. And the triage agent is forbidden to get a check green by weakening it, by deleting a pin or demoting a row to `hand` or moving a test out of a suite. That prohibition is a paragraph in its prompt. It is findable.\n\nThree bets, scored on 1 June 2027. An incident, for all three, is something that broke in service in that repository between now and then and that I record there with a date. A defect found in review is not one.\n\n**Incidents will break hand rows, not coded ones.** I lose if any incident breaks one of the eleven rules that a lint rule or a suite decides today. A killed pin was then worth less than I have claimed, whatever else happened. I win if at least one incident breaks a mapped rule and every such incident falls under a hand row. If no incident breaks any mapped rule, the bet is void, and I report instead how many incidents fell under no row at all, which is the map’s own miss count.\n\n**A coded rule will be shown blind again.** The first review found one surviving mutant among nine rules. I bet that by June at least one of today’s eleven coded rules is shown, by a review or an incident, to pass a real violation of its own sentence, and is repaired with a new pin. If none is, I lose, and the rules are better than I think.\n\n**The linter will refuse something real.** I bet that by June the new CI job has gone red at least three times on a pull request that does not touch the verifier, because of a lint finding or an uncovered test in a file that pull request added or changed. CI history settles it. Fewer than three, and the day bought a tidy audit of a tree that was already clean. Fewer than three with a map grown past twenty rows is the failure part 4 named: a number that rises when you write things.\n\nThe durable things from the day are the rule in English and the cases that give it a meaning. The code between them was written by a model in hours and could be written again. A test is where a sentence acquires a truth condition, and its result is evidence only as far as it would have come out differently had the sentence been false.\n\n*Figures are from my operations repository at commit `65988e6`, which is private. Sources: Dijkstra, “Notes on Structured Programming” (EWD 249, 1969; issued as a report in 1970); Good,* Probability and the Weighing of Evidence *(1950); Mayo,* Error and the Growth of Experimental Knowledge *(1996); DeMillo, Lipton and Sayward, “Hints on Test Data Selection: Help for the Practicing Programmer”,* Computer *(1978); Alpern and Schneider, “Defining Liveness”,* Information Processing Letters *(1985). Fuller (1964) and Rice (1953) are as cited in parts 6 and 7.*", "url": "https://wpnews.pro/news/rules-that-bind", "canonical_source": "https://gfrm.in/posts/rules-that-bind/", "published_at": "2026-12-01 00:00:00+00:00", "updated_at": "2026-12-04 12:20:38.690585+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-safety"], "entities": ["Claude", "jack", "renavondata"], "also_reported_by": [], "takeaway": "A rule only binds when a test terminates with an answer: stub the failing listing and require exit status 75, since in bash a failed listing and an empty listing are the same value unless you check the exit status.", "recommendation": {"advice": "Write each rule into a map with its CLAUDE.md phrase, dated incident and enforcer, then pin it with a planted mutant the check must catch beside an unedited twin it must pass.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/rules-that-bind", "markdown": "https://wpnews.pro/news/rules-that-bind.md", "text": "https://wpnews.pro/news/rules-that-bind.txt", "jsonld": "https://wpnews.pro/news/rules-that-bind.jsonld"}}