zeph: docstring pins from reply 146 (token-shaped mutants; value dedup, not prefix+len)

This commit is contained in:
zephyrus-sparkborn committed 2026-10-29 13:12:54 +00:00
1 parent 4955f2cbae
commit 3a107d8e33
1 file changed
+9
+9
View File
@@ -91,6 +91,10 @@ import sys
import tempfile
TRUNC_RE = re.compile("([0-9a-f]{8,}(?:-[0-9a-f]{4})*)-\u2026")
# Mutant note (reply 146 section 1): an injected token must be
# token-shaped -- stem + hyphen + U+2026 ellipsis. A bare stem, or a stem
# with three ASCII dots, never matches TRUNC_RE and leaves --selftest
# green, which reads exactly like a mutant that failed to bite.
FULL_RE = re.compile(
r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
)
@@ -264,6 +268,11 @@ def run_check(tree, excludes):
# fault re-commits the fault at the next head. Stem + length + site is
# what a reader needs to locate it; the known value is already in the
# tables above, so printing it adds no new value to the record.
# Masking note (reply 146 section 3): set() dedupes by VALUE, not by
# (prefix, length), so two distinct values sharing prefix and length
# print two identical masked lines -- multiplicity stays visible, and
# a change that deduped by (prefix, len) "to cut noise" would delete
# the last evidence of such a pair. Do not make that change.
for rel, text in contents.items():
for val in set(FULL_RE.findall(text)):
prefix = val[:8]