forked from heavy-duty/ceremony
test(issueflow): AC-1's other input is an edit, not a re-sweep
AC-1 names two inputs and says "both by fixture". The suite had the first and,
for the second, only a re-sweep of a BYTE-IDENTICAL body — which is the test
plan's other must-not-echo bullet, and cannot stand in for this one: an
identical body is quiet under both spellings of the decision, the one that
keys on the parse and the one that keys on the prose, so it cannot tell them
apart. Only an edit that changes the prose and preserves the parse can.
The new probe reorders the refs and adds sentences on either side, leaving the
set at {#90, #91}, and asserts the marker count, the thread's total echo count
and the issue-edit count all hold still. What it pins is that the marker is a
function of the PARSE and not of the prose around it — the property the whole
idempotency rests on.
Mutation-proven isolating: an echo that also re-fires when the declaration
prose moved since the last echo — quiet on identical re-sweeps, correct on
every set change — passes the pre-existing suite 304/0 and reds only here.
This commit is contained in:
parent
2bab52dc71
commit
2498dfdce0
1 changed files with 18 additions and 0 deletions
|
|
@ -825,6 +825,24 @@ check "...and the sweep log carries the same set" 0 \
|
||||||
issue_probe 35 blocked 1 false "" "Part of #1. Blocked by #90, #91." >/dev/null
|
issue_probe 35 blocked 1 false "" "Part of #1. Blocked by #90, #91." >/dev/null
|
||||||
check "an unchanged parse draws nothing on the next sweep" 0 "1" \
|
check "an unchanged parse draws nothing on the next sweep" 0 "1" \
|
||||||
grep -cF "<!-- issueflow:$(blocked_parse_marker '{#90, #91}') -->" "$TMP/posted-35"
|
grep -cF "<!-- issueflow:$(blocked_parse_marker '{#90, #91}') -->" "$TMP/posted-35"
|
||||||
|
# AC-1's other input, and it is not the sweep above. A re-sweep of a
|
||||||
|
# BYTE-IDENTICAL body is quiet under both spellings of the decision — the one
|
||||||
|
# that keys on the parse and the one that keys on the body — so it cannot tell
|
||||||
|
# them apart. Only an edit that changes the prose and preserves the parse can:
|
||||||
|
# the refs are reordered and sentences are added on either side, and the set is
|
||||||
|
# still {#90, #91}. What this pins is that the marker is a function of the
|
||||||
|
# PARSE and not of the prose around it, which is the property the echo's whole
|
||||||
|
# idempotency rests on and which nothing else in the suite states.
|
||||||
|
preserved_edits_before="$(wc -l <"$TMP/issue-edits")"
|
||||||
|
issue_probe 35 blocked 1 false "" \
|
||||||
|
"Some new prose here. Blocked by #91, #90. And more text." >/dev/null
|
||||||
|
check "a body edit that preserves the parse draws nothing" 0 "1" \
|
||||||
|
grep -cF "<!-- issueflow:$(blocked_parse_marker '{#90, #91}') -->" "$TMP/posted-35"
|
||||||
|
check "...and adds no echo under any other marker either" 0 "1" \
|
||||||
|
grep -cF '<!-- issueflow:blockers-parsed-' "$TMP/posted-35"
|
||||||
|
# shellcheck disable=SC2016 # positional parameters belong to bash -c
|
||||||
|
check "...and writes no label from the parse-preserving path" 0 "" \
|
||||||
|
bash -c 'test "$1" -eq "$(wc -l <"$2")"' _ "$preserved_edits_before" "$TMP/issue-edits"
|
||||||
changed_echo="$(issue_probe 35 blocked 1 false "" "Part of #1. Blocked by #90, #91, #92.")"
|
changed_echo="$(issue_probe 35 blocked 1 false "" "Part of #1. Blocked by #90, #91, #92.")"
|
||||||
check "a body edit that changes the set draws exactly one new echo" 0 "1" \
|
check "a body edit that changes the set draws exactly one new echo" 0 "1" \
|
||||||
grep -cF "<!-- issueflow:$(blocked_parse_marker '{#90, #91, #92}') -->" "$TMP/posted-35"
|
grep -cF "<!-- issueflow:$(blocked_parse_marker '{#90, #91, #92}') -->" "$TMP/posted-35"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue