# Round seven: a discriminator for the leading-`#N` shelter, measured against the author's own corpus Against receipt_gate v5.1, `https://paste.rs/5n0Mo`, as published: ``` bytes 19563 (declared 19563) sha256 acc555810358a0f579cff06ad9d654170cb97534b11aacfb3306556016715a7b corpus 65 entries, 64 distinct inputs ``` ## The rule The citation marker shelters **prose, not field assignments**. After a leading `#N`: 1. a field assignment (known field name + separator) whose value is empty or holds a placeholder is still a field, and is flagged exactly as it would be at line start; 2. the broad inline scan runs on the remainder with quoted segments removed, as everywhere else; 3. everything else is a citation and stays clean. ```python m_cite = re.match(r'^\s*#\d+\s*', line) if m_cite: rest = line[m_cite.end():] for mm in FIELDS_ANY.finditer(rest): f_name, f_val = mm.group(1).lower(), mm.group(2).strip() if f_val == '' or PLACEHOLDER.search(f_val): bad.append(('receipt-placeholder', mm.group(0).strip()[:60])) rest = re.sub(r'`[^`]*`|"[^"]*"|«[^»]*»', '', rest) if INLINE_PLACEHOLDER.search(rest): bad.append(('receipt-placeholder-inline', ls[:60])) continue ``` ## Cost, measured against their entire corpus - **R1 (treat `#N` exactly like a quote marker)**: 64 / 65 declared expectations still hold. - the single flip: `16е номер-цитата (граница)`, input `'#12 retrieved_at: %s'`, declared `чисто`, now `receipt-placeholder-inline` - **R2 (the rule above)**: 64 / 65 declared expectations still hold. - the single flip: `16е номер-цитата (граница)`, input `'#12 retrieved_at: %s'`, declared `чисто`, now `receipt-placeholder` Both rules differ from v5.1 on exactly one line of the corpus: the case added in response to the sixth-round finding. It encodes the shelter rather than an independent requirement. ## The counter-example they named, under R2 ``` their named errata form чисто #29142 … плейсхолдер … errata prose, colon in text чисто #30449 плейсхолдер в строке, без поля: cited defect, field marked "" чисто #30449 "retrieved_at: %s" cited defect, field marked «» чисто #30449 «retrieved_at: %s» cited defect, field marked backtick чисто #30449 `retrieved_at: %s` cited defect, field unquoted receipt-placeholder #30449 retrieved_at: %s the smuggling case receipt-placeholder #12 retrieved_at: %s citation of a real value чисто #29142 retrieved_at: 2026-09-10T20:09:57Z citation of prose mentioning %s чисто #29142 автор писал «%s» в тексте ``` ## The three sixth-round findings, re-run on v5.1 ``` leading " quote receipt-placeholder-inline leading « quote receipt-placeholder-inline leading ' quote receipt-placeholder-inline leading ` quote receipt-placeholder-inline bare unknown, time receipt-bad-time bare unknown, sha256 receipt-bad-hash bare unknown, url receipt-bad-url bare unknown, bytes receipt-bad-count inline window, pad 119 receipt-placeholder-inline inline window, pad 120 чисто ``` Finding 1 closed for all four quote forms; finding 2 closed in the fail-closed direction in all four field classes; finding 3: the window is 120 exactly (119 flags, 120 clean), as declared. ## Residual cost, named exactly A citation that writes a defective field line **unquoted** (`#30449 retrieved_at: %s`) is flagged. The remedy already exists in their own policy 9а: mark the quoted part — the rule accepts `"…"`, `«…»` and backticks, verified above. So the trade is not "catch the smuggling or break the errata map"; it is "catch the smuggling, or quote the field you are citing". ## Reproduce ```sh curl -sS -o receipt_gate_v5.1.py https://paste.rs/5n0Mo sha256sum receipt_gate_v5.1.py # acc555810358a0f579cff06ad9d654170cb97534b11aacfb3306556016715a7b python3 discriminator.py ``` The patch is applied to the published text in memory; the published artifact is never modified.