Who Checks the Checkers? 313 Lines of Gate, 61 Stamps, One Empty Column
Key Takeaways — Executive & AI Summary
- The QC gate is 313 lines split by what can be counted and what must be felt: 7 regex scans and 4 model judgments. The 102-record failure log rules on the split — regex caught 61 legal-safety, 54 title, 34 image, 31 source and 22 banned-word red lights, while two rules (length, quotable density) fired 0 and 2 times, checks the technology outgrew.
- 61 passing stamps survive — 46 in articles/ and 15 in daily/ — with 42 first-try passes, 8 on round two, 8 on round three, and 3 needing a fourth; the 13 per-article push scripts in the daily pipeline read the stamp and exit without it, but the older root push scripts never ask.
- The gate's learning loop has one wheel: a column for AI-judgment issues exists in the logger and was populated 0 times across all 102 records — the ratchet that promotes repeated errors into hard rules only ever ratchets on regex failures.
Episode 11 of One Man One Legion — third stop in the workshops arc, after the text factory, which ended on a promise: the QC gates get their own episode. This is it.
A factory where nobody reads every draft still has to answer one question: when you hand quality control to machines, which checks do you give to a regex and which to a model? The text factory’s gate has now run long enough — 102 logged failure rounds across 40 days — that the logs, not the design docs, can rule on the split.
One file, two kinds of trust
The gate is a single Python script, utils/quality-gate.py — v9.0, 313 lines, an exit code of 0 that unlocks the push and 1 that means red light. Inside, the split is clean. Seven machine scans handle everything countable: unique source domains, images on the platform CDN, banned words, title keywords, stripped text length, the presence of a disclaimer and a counter-view. Four AI judgments handle everything perceivable: an information gap in the first 100 characters, argument ammo matching one of four emotion clusters, conversational warmth, an ending that asks instead of concludes. The regex layer runs deterministically; the model layer answers a printed checklist. Each layer is trusting a different kind of machine for a different kind of promise.
What the regex layer actually caught
The failure log — every red-light round since July 18 — breaks down by rule, and the ranking is not what the rule list would predict:
| Rule | Red lights |
|---|---|
| Legal safety (counter-view + disclaimer) | 61 |
| Title pain word in first 15 chars | 54 |
| Platform images (≥3) | 34 |
| Source domains (≥3) | 31 |
| Banned / high-risk words | 22 |
| Quotable-line density | 2 |
| Stripped length (>500) | 0 |
The top catch, 61 legal-safety red lights, splits into 54 rounds missing a counter-view and 25 missing a disclaimer (some rounds failed both). The banned-word rounds caught 12 forbidden and 11 high-risk occurrences — against a 12-word and a 5-word list, nearly a hit per entry. Read that closely: the most-used regex check is a presence check of a judgment-shaped thing. The gate cannot tell whether your counter-argument is any good — only that phrases like “另一方面” exist somewhere in the text. The second insight sits at the bottom of the table: length fired 0 times and quotable density twice. Language models never write too short and never skip question marks. Two of the seven rules police problems the technology has outgrown; the gate carries them like appendix organs.
Taste, encoded as dictionaries
The word lists are taste compressed into data: a 12-word banned list (“shocking,” “let’s all wait and see”), a 5-word high-risk list (fraud, scam, staged), a 69-entry pain dictionary for the first 15 title characters — 裁员, 封杀, 返贫, 哭了 — and, for legal safety, 8 disclaimer markers against 15 counter-view markers. Three of those 15 are fossils: 英国政府说, 英方, 英方角度 — “the British government says,” “the British side” — words that could only have come from the British Steel piece of July 18. When that article lacked a counter-view, the fix added its vocabulary to the general gate, where it calcified. The ratchet that promotes a thrice-repeated error into a hard rule turns scars into law, but each scar keeps its shape — the dictionary doubles as an archaeological record. Before every run the gate also prints its own top-3 historical failure rules. It reads its scars before judging new text.
The stamp math, and the honest crack
61 passing stamps survive — 46 in articles/, 15 in daily/. The rounds read 42 first-try passes, 8 on round two, 8 on round three, 3 needing a fourth: a 69% one-shot rate for a machine staff. And the crack I went looking for: the lessons logger has a column for AI issues. Across all 102 records it was never written — 0 entries. record_issues is called with machine findings only, so the four model judgments happen and evaporate. The learning loop only learns from the regex half of the gate; the ratchet turns on one wheel. Enforcement itself is narrower than this series last claimed: the 13 per-article push scripts in the daily pipeline do open the stamp first and refuse without it, but the 24 older push scripts in the project root predate the gate and never ask. A physical key is only physical where the lock was installed — episode 9 called it the physical key, and this is the correction.
The lesson travels beyond one WeChat pipeline. Countable things to regex, perceivable things to a model — and log both halves, or your factory remembers only half of what it knows. A sibling script in the same workshop, 564 lines, takes the opposite bet on short-video copy: a 100-point score instead of a binary gate. Same question, two philosophies, both still standing.
The next workshop episode heads for the video floor. Back to the fleet audit.
FAQ — Direct Answers
- How do you decide what a regex checks and what a model judges?
- Countable things go to code: source domains, image counts on the platform CDN, banned-word occurrences, stripped length, whether a counter-view marker appears anywhere. Perceivable things go to the model: whether the first 100 characters create a real gap, whether the emotional ammo matches the topic cluster, whether the voice stays warm. The failure log vindicates the split — and exposes that only the regex half of it ever gets logged.
- Is the gate stamp really enforced?
- Where the v9 pipeline built it, yes — 13 per-article push scripts in the daily directory open the .gate.json before doing anything else and exit with an error if it hasn't passed. The 24 older push scripts in the project root predate the gate and never check. A physical key is only physical where someone installed the lock.