| index d7da53589..31d061d88 100755 |
| --- a/internal/sim/regionha/mutate.sh |
| +++ b/internal/sim/regionha/mutate.sh |
| @@ -25,6 +25,7 @@ |
| # |
| # CAUGHT the sweep reported at least one violating seed (replay it with |
| # RHASIM_SEED), OR a witness of the rule violated its invariant; |
| +# MODEL-ONLY self-reporting model check; unit= names separate production coverage; |
| # MISSED every seed passed and every witness held (or there is none); |
| # ERROR anything else: an unknown rule, a stale binary, a panic, a |
| # timeout, output the harness cannot parse, or a witness run |
| @@ -81,6 +82,22 @@ if [ $brc -ne 0 ] || [ "$(grep -c "^ sim_test.go:[0-9]*: $SEEDS seeds, 0 fail |
| fi |
| echo "BASELINE unmutated: sweep 0 of $SEEDS" |
| |
| +# Self-reporting model checks are excluded from the production catch count. |
| +model_witness() { |
| + case "$1" in |
| + delete-before-import) echo "internal/host:TestDepartureNoEarlyDelete" ;; |
| + ack-before-import) echo "internal/host:TestDepartureCompletionRescan" ;; |
| + ack-with-dead-releaser) echo "internal/host:TestDepartureCompletionRescan" ;; |
| + proof-wrong-lifetime) echo "internal/termfence:TestTerminationProofBinding;internal/lease:TestTerminationProofAcquireOnly" ;; |
| + finalizer-counts-as-visitor) echo "internal/activator:TestDepartureFinalizeTelemetry" ;; |
| + delete-denied-is-complete) echo "internal/host:TestDepartureDeleteDenied" ;; |
| + reuse-staged-rows-without-manifest-digest) echo "internal/activator:TestHAAdoptManifestBoundary" ;; |
| + null-is-home) echo "internal/host:TestDepartureIdentityWithoutEdges;internal/host:TestDepartureCoverageIsolation" ;; |
| + started-waits-for-inventory) echo "internal/hadeparture:TestTerminationConsumerStartupBound" ;; |
| + esac |
| +} |
| +export -f model_witness |
| + |
| one() { |
| r=$1 |
| tag=$(echo "$r" | tr ',' '+') |
| @@ -145,7 +162,10 @@ one() { |
| caught=1 |
| fi |
| if [ $caught -eq 1 ]; then |
| - if [ "$expect" = "missed" ]; then |
| + model=$(model_witness "$r") |
| + if [ -n "$model" ]; then |
| + echo "MODEL-ONLY $r: $sweep; witness $wit; unit=$model" | tee "$verdict" |
| + elif [ "$expect" = "missed" ]; then |
| echo "STALE $r: $sweep; witness $wit; but expected-outcomes.txt says missed" | tee "$verdict" |
| else |
| echo "CAUGHT $r: $sweep; witness $wit" | tee "$verdict" |
| @@ -175,7 +195,7 @@ if [ "$have" -ne "$want" ]; then |
| fi |
| for r in $RULES; do |
| v="$SCRATCH/verdicts/$(echo "$r" | tr ',' '+')" |
| - if ! grep -qE '^(CAUGHT|MISSED|EXPECTED-MISS|STALE|ERROR) ' "$v" 2>/dev/null; then |
| + if ! grep -qE '^(CAUGHT|MODEL-ONLY|MISSED|EXPECTED-MISS|STALE|ERROR) ' "$v" 2>/dev/null; then |
| echo "sweep: no well-formed verdict for $r" >&2 |
| exit 2 |
| fi |
| @@ -185,4 +205,7 @@ if [ "$bad" -gt 0 ]; then |
| echo "sweep: $bad rule(s) ERROR, MISSED or STALE" >&2 |
| exit 1 |
| fi |
| -echo "sweep: all $want rule(s) CAUGHT or expected" |
| +caught=$(cat "$SCRATCH"/verdicts/* | grep -c "^CAUGHT ") |
| +model=$(cat "$SCRATCH"/verdicts/* | grep -c "^MODEL-ONLY ") |
| +expected=$(cat "$SCRATCH"/verdicts/* | grep -c "^EXPECTED-MISS ") |
| +echo "sweep: $caught CAUGHT, $model MODEL-ONLY, $expected expected" |