volt: check_lint catches a trailing prose aside after sentence punctuation
`bash CHECK-quill-draft-compliance (the artifact gate).` is prose, and bash refuses it before the command runs: syntax error near unexpected token `(`, rc 2. tools/check_lint.py graded that exact line SOUND because its "trailing parenthetical" marker required `)` to be end-of-line; the sentence's full stop after the aside defeated it. The marker now allows `[.!?,;:]?` between the closing paren and EOL, and five selftest cells pin it: the two measured prose shapes as PROSE_TAIL, and three controls that must stay SOUND (process substitution, an opening subshell, a quoted aside). The pin moves 37 -> 42 in tools/selftest_baseline.tsv, in this diff. Evidence: selftest 42/42 rc 0; the repro line PROSE_TAIL rc 1 and the bare command SOUND rc 0; a one-line mutant (old regex only) fails exactly cells 29 and 30, 40 passed / 2 failed rc 1; selftest_sweep 23 pinned / 23 agree / 0 drift rc 0; tools/verify.py --fast 12 legs, 11 pass, 0 fault, 1 skipped, rc 0. Artifact and leg-graded CHECK: wizard-work/volt/q-checkparen/.
This commit is contained in:
1 parent
fcd5d6b0f9
commit
aba1621812
4 files changed
+241
-3
No files matched your search
+17
-2
@@ -61,7 +61,7 @@ WHAT IT DOES NOT DO
|
||||
USAGE
|
||||
python3 check_lint.py --check "$CHECK"
|
||||
python3 check_lint.py --ralph-dir /root/.hermes/wizard-outputs/ralph
|
||||
python3 check_lint.py --selftest # 37 cells, one per class and edge
|
||||
python3 check_lint.py --selftest # 42 cells, one per class and edge
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -115,7 +115,12 @@ CATCH_ALL_RE = re.compile(
|
||||
PROSE_MARKERS = [
|
||||
(re.compile(r"\s+[\u2014\u2013]\s+"), "em dash"),
|
||||
(re.compile(r"\s--\s+"), "spaced --"),
|
||||
(re.compile(r"\s\([^()]*\)\s*$"), "trailing parenthetical"),
|
||||
# The parenthetical may carry sentence punctuation: `bash CHECK-x (the
|
||||
# artifact gate).` is prose with a full stop after the aside, and every
|
||||
# unquoted `(` there is a bash syntax error, not an argument. Measured on
|
||||
# the 2026-11-01 ralph run: the runner REDs with "syntax error near
|
||||
# unexpected token `('" while the old `\)\s*$` read the line SOUND.
|
||||
(re.compile(r"\s\([^()]*\)[.!?,;:]?\s*$"), "trailing parenthetical"),
|
||||
(re.compile(r"\.\s+[A-Z]"), "sentence break"),
|
||||
]
|
||||
|
||||
@@ -366,6 +371,16 @@ FIXTURES = [
|
||||
("CHECK: sha256sum a.tar.gz | grep -q 4844c5fc\n", "SOUND"),
|
||||
("CHECK: python3 tools/x.py --selftest | tail -1 | grep -q 'cells, 0 failed'\n", "SOUND"),
|
||||
("CHECK: python3 -c \"print(1)\"\n", "SOUND"), # paren not preceded by space
|
||||
# A trailing prose aside with sentence punctuation after the closing paren.
|
||||
# This is the exact line the 2026-11-01 ralph run RED'd on: bash reads the
|
||||
# unquoted `(` as a subshell opener and exits 2 before the command runs.
|
||||
("CHECK: bash CHECK-quill-draft-compliance (the artifact gate).\n", "PROSE_TAIL"),
|
||||
("CHECK: python3 v.py (re-derives the table),\n", "PROSE_TAIL"),
|
||||
# Controls that must stay SOUND: the paren is not preceded by whitespace
|
||||
# (process substitution), opens the command (a real subshell), or is quoted.
|
||||
("CHECK: diff -u <(a) <(b)\n", "SOUND"),
|
||||
("CHECK: (cd sub && python3 t.py)\n", "SOUND"),
|
||||
("CHECK: python3 x.py \"note (a).\"\n", "SOUND"),
|
||||
("CHECK: python3 x.py --json /tmp/o.json\n", "SOUND"), # -- flag, not " -- "
|
||||
("CHECK: python3 v.py && echo CHECK_OK", "SOUND"),
|
||||
# last-wins extraction, and a prose mention AFTER the real line. The second
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
append_only_audit.py 18 cells
|
||||
append_only_owners.py 15 cells
|
||||
census_row_delta.py 37 cells
|
||||
check_lint.py 37 cells
|
||||
check_lint.py 42 cells
|
||||
checkin_check.py 36 cells
|
||||
citation_hash_class.py 19 fixtures
|
||||
citation_resolve_check.py 14 fixtures
|
||||
|
||||
|
Reference in new issue
Block a user