Skip to content

test(specpin): hold the 16 refusals mutsweep v0.12.0 found held by nothing (23/23 caught) - #966

Merged
tannevaled merged 3 commits into
mainfrom
specpin-survivors
Nov 21, 2026
Merged

tannevaled merged 3 commits into
mainfrom
specpin-survivors

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

specpin: 16 of 23 refusals were held by nothing, and the earlier sweep could not see them

When #963 landed, a mutation sweep of cmd/specpin read 11 refusals, 3 caught, 0 survived (mutsweep v0.11.0). Then go-fleettools/mutate#29 (v0.12.0) taught the sweep two new things:

  • to see an if with an init clause;
  • to retry, as false && (C), a deletion that does not compile.

The same file now reads 23 refusals, 16 survived. The "0 survived" came from a sweep that could not see most of the file.

Why the existing tests passed: every survivor was doubled further down

refusal what answered instead, with it gone
:140 !empty, the line that replaced rm -rf "$CACHE" git, which refuses to clone into a non-empty directory on its own. The safety guard was held by git, not by a test
:87 no user cache dir nothing: the default becomes the relative path rbgo/rubyspec-corpus, and specpin clones into the current directory
:181 checkout failed the read-back check: "a post-checkout hook moved it", which is the wrong diagnosis
:274 git's stderr a bare exit status 128; the reason is lost
:123 :146 clone failed the origin check: origin is ""
:137 + isEmpty :245 unreadable dir "not empty", or a clone into it
:177 both fetches failed the checkout failure
:132 :218 git not runnable "clone failed"
:260 read-back error read back: <nil>
:77 :94 run's own a second, misleading message, or a directory printed on stdout
:120 mkdir the clone failure

refusal_test.go asserts, for each refusal, what that refusal says and no later step says.

Result

23 mutations: 23 caught, 0 caught by PANIC, 0 not mutants, 0 survived, 0 hung

(22 in the full sweep, plus -only main.go:120 after the fix below.)

My first test for :120 was itself wrong. A regular file in the path makes os.Stat answer ENOTDIR, not ErrNotExist, so the switch returned before MkdirAll was ever reached, and the sweep kept :120 as a survivor. That row is kept as the stat case. :120 is now reached through an absent parent under a 0500 directory.

No change to main.go. The two permission rows skip when run as root, and on Windows.

Refs #963, go-fleettools/mutate#29

🤖 Generated with Claude Code

tannevaled and others added 2 commits November 21, 2026 07:32
…thing

mutsweep v0.11.0 reported specpin as 11 refusals, 3 caught, 0 survived.
v0.12.0 -- the first to sweep an `if` with an init clause and to retry a
deletion that does not compile as `false && (C)` (go-fleettools/mutate#29)
-- reports 23 refusals and 16 survivors. The earlier "0 survived" was a
sweep that could not see most of the file.

Nearly all 16 were DOUBLED one layer down, which is why the existing
tests, asking only "did it fail?", passed with them gone:

  :140 !empty     git clone refuses a non-empty destination by itself --
                  so the guard that replaced `rm -rf "$CACHE"` was held
                  by GIT, not by a test
  :87  cache dir  ignored, the default becomes the RELATIVE path
                  rbgo/rubyspec-corpus and specpin clones into the cwd
  :181 checkout   gone, the read-back answers "a hook moved it": a
                  wrong diagnosis
  :274 msg        gone, git's stderr is dropped: a bare exit status 128
  ...

refusal_test.go asserts, for each, what ITS refusal says and no later
step says. Result: 23 refusals, 23 caught.

One test was wrong first: a regular file in the path makes os.Stat answer
ENOTDIR, so the switch returned before MkdirAll (:120) was reached and
the sweep kept :120 as a survivor. Kept as its own row (the stat case);
:120 is reached by an absent parent under a 0500 directory.

No change to main.go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sweep's mutant of main.go:87 did exactly what that row predicts: with
the error ignored the default became the relative rbgo/rubyspec-corpus,
and it cloned there -- under the package directory, left behind as an
untracked tree. t.Chdir(t.TempDir()) keeps a broken build from writing
into the source tree. Re-swept: :87 caught, git status clean after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tannevaled added a commit that referenced this pull request Nov 21, 2026
…); sum unchanged (#967)

core/kernel/require_spec.rb read 68 in 2 of 4 ratchet attempts since
BASELINE recorded 69, at code that cannot affect it:

  #965  868e42e  attempt 1  68  red
  #965  868e42e  attempt 2  69  green     <- same SHA, both values
  #966  d66943c  attempt 1  69  green
  #966  6f88f65  attempt 1  68  red       <- a test-only change

Pinned to its floor, as #885 pinned core/random/bytes_spec.rb -- the
remedy #887 describes for a file with no honest single row. Which example
flips is not measured: the ratchet keeps a count per file (#887).

core/file/stat/birthtime_spec.rb 0 -> 1: what #965 made it on the gate's
runner, read 1 in all 3 attempts whose logs were read. The 0 was
absorbed for #961; leaving it unbanked meant a regression to 0 would pass.

The two moves cancel: the sum stays 24106, so the figure gates of the
README, docs and landing are untouched. The header records both edits.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit c5b3574 into main Nov 21, 2026
26 checks passed
@tannevaled
tannevaled deleted the specpin-survivors branch November 21, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant