{"slug":"envelope-goes-red","title":"An envelope that goes red","description":"A known-bad bead that omits how it is checked, paired with the failure the bead check must produce: exit 1 and a line that names the missing observation.","body":"# An envelope that goes red\n\nThis file is a fixture: a known-bad bead paired with the red result the check must give.\n\n## When to use\n\nUse this fixture when you need a known-bad input for the bead check. It is a bead envelope with the check field omitted. The other three fields are present and non-empty, so a weak check that only looks for a deliverable will wrongly pass.\n\nThe fixture is the bad text plus the failure you must observe. One without the other is not a fixture.\n\n## When not to\n\nDo not dispatch this bead to a worker. It is unfinished on purpose.\n\nDo not \"fix\" it in the fixture file. The repair belongs in a different file, the good envelope. If you add `how_checked` here, you no longer have the known-bad input, and a check that has gone soft will have nothing that forces it to fail.\n\n## The specimen\n\nThe artifact is this pair.\n\nBad input:\n\n```text\ndeliverable: One specimen file a stranger can reuse without the author present.\nmay_change: The single specimen file this bead names.\nmust_not_touch: The roster, the seed files, and every other specimen.\n```\n\nThe field that is absent is `how_checked`. There is no empty placeholder. The line is not in the file at all.\n\nEval that must reject it: `check-bead.sh` from the specimen \"A check that can fail.\"\n\nExpected failure:\n\n```text\nexit: 1\nline: fail: bead has no how_checked observation\n```\n\nAny other exit code is a wrong result. An exit of 0 is a check that cannot see this break. An exit of 2 means the script did not receive a file, which is a different problem and does not exercise the fixture. A printed line that complains about `deliverable` instead is also wrong: the deliverable is present, and the script is required to judge `how_checked` first.\n\nThis bad text is the good bead from \"The four-field envelope\" with the check line removed, and with the other three lines left as they are. The two specimens stay a pair. If you change a shared line, change it in both, or the fixture no longer isolates the missing check.\n\n## How a stranger checks it\n\nA stranger runs the pair.\n\n1. Save the bad input as `bad-bead.txt`. Do not add a `how_checked` line.\n2. Run `bash check-bead.sh bad-bead.txt`.\n3. Compare the process exit code to 1 and the printed line to `fail: bead has no how_checked observation`.\n\nBoth must match. Then run the same script on the good bead. That run exits 0 and prints `pass`. If the bad run and the good run produce the same exit code, the check is not distinguishing them, and this fixture has caught a broken eval.\n\nYou can also confirm the fixture is still bad by searching `bad-bead.txt` for the label `how_checked`. The search finds nothing. If it finds the label, someone repaired the fixture and it no longer serves.\n","kind":"fixture","stratum":"proof","license":"CC-BY-4.0","shot":"na","tags":["fixture","known-bad","bead","check"],"author_name":"Campaign Hub","author_url":"https://campaignhub.fyi/about","source_url":null,"provenance":"Original teaching specimen written for the Campaign Hub library. Not a transcript of a private run.","maturity":"practiced","audience_role":"reviewer","safety_class":"public_teaching","harness":["generic"],"use_when":"Use this fixture to prove a bead check actually fails. Pair the bad text below with the bead check. The expected result is red.","avoid_when":"Do not treat this file as a bead you can dispatch. Do not fill in the missing check and still call it the known-bad fixture.","eval_checks":[{"id":"RED-1","text":"Running check-bead.sh on the bad bead exits 1 and prints the missing-observation line.","how_checked":"Save the fenced bad bead and run check-bead.sh. Require exit code 1 and the exact line fail: bead has no how_checked observation."}],"published_at":"2026-09-24T21:59:21.000Z","updated_at":"2026-09-24T21:59:21.000Z","sensor":null,"edges":[{"from":"envelope-goes-red","to":"four-field-envelope","kind":"exemplifies","title":"The four-field envelope"}]}