Repository navigation
mutate: daily runs, iPhone suite, boundary mutants, survivors issue and auto-fix PR - #449
Open
alexkroman wants to merge 10 commits into
Open
alexkroman wants to merge 10 commits into
alexkroman wants to merge 10 commits into
Conversation
The mutate workflow now runs on a daily schedule as well as by hand. On the daily run, a new fix job hands the survivors to claude-code-action, which adds the assertion that kills each one (or a mutate-ok exemption for a provably equivalent mutant), and opens a PR labelled mutation-testing with the Claude GitHub App token so check runs on it. At most one such PR is open at a time; without the ANTHROPIC_API_KEY secret the job skips with a notice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
alexkroman
enabled auto-merge
November 27, 2026 14:31
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 27, 2026
The daily run now keeps one open issue labelled mutation-testing with the latest survivors, rewritten each run and closed by the first complete run with none. A partial run updates it with a warning but never closes it. The fix job's PR references the issue and is linked from it, so the list is visible even when no fix PR can be opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
…idates - New mutants: boundaries (>= -> >, <= -> <, < -> <=, > -> >=), a dropped prefix !, and spaced arithmetic (- -> +, * <-> /, -= -> +=, += 1 -> -= 1). Angle brackets and arithmetic match only with a space on each side, which Swift guarantees is a binary operator. Engine mutants: 182 -> 317. - --suite ios mutates 22 BlurtiOSCore files (241 mutants) and runs BlurtiOSTests on a simulator via xcodebuild; --files picks the suite from the paths; --print-targets prints a suite's list. check.sh validates both. - scripts/mutate-candidates.sh lists well-covered files with mutants that are in neither target list; // mutate-not-target: <reason> retires one. - The workflow runs 8 engine + 6 iPhone shards, scores each suite, runs a candidates job, lists candidates in the issue, and lets the fix job handle iPhone survivors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
The first mutation run with the new mutations left 24 engine survivors. Tests for the 16 that a test can catch: a named key logged as the instruction spells it, never an alias; an app name with a digit; a key-term list, a prompt and a typed step exactly at their caps; a plan of exactly maxSteps; a label exactly at labelCap; a menu search cut at exactly its limit; the largest web area by area with the first winning a tie; a busy window leaving the page its share; the overlay's display by overlap area; the next-display move from an offset display and from a window as wide or tall as its display; a tap timed from its press; the first of two equal-length prefix matches; a slider value spelled past 1e15. mutate-ok for the rest, each provably unable to change behaviour: a caret at the very end, the mid-character index search, clip at exactly maxChars, and the enhanced-interface generation counter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Tests: an answer or a tick exactly at the press deadline is late (timed from the reference date, where the deadline's instant is exact); a press at the instant a lease ends says suspended; a record that names no utterance has none; only a blurt://start link is a start link; a typing result of exactly the minimum sets the speed. mutate-ok: stopping an interrupted window closes it with keepWords false, but an interrupted window never has an utterance, so it has no effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Tests: a phase goes stale only past its instant (notice and in-flight, from the reference date so the instant is exact); a start link that gives a field twice is read from the first; a fresh listening-window machine has read no live mic. mutate-ok: closing an interrupted window on foregrounding with the session turned off (no utterance, so keepWords has no effect), and Bounce's x-room guard (with no room on x, x.hits is 0 and the next guard returns the same). The guard's three conditions now sit on their own lines so the exemption covers only the one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Tests for 13: a press's and a stop's retry and a stop's deadline at their exact instants (from the reference date); a lift held exactly the hold threshold is a hold; a terminal phase naming no dictation ends a stop; matching the best typing speed isn't a new best; a record names no live mic by default; a command is stale at its freshness window's instant; a spent reopen doesn't reopen again; 10,000 is the first compact count; a near-miss corner at y's first wall, landing when the later wall is touched. mutate-ok for 3, each unable to change behaviour: URLComponents' base resolution for an absolute URL, and Bounce's no-room guards for y and for building an axis. The stop's timing tests move to a +Timing extension to keep the suite under type_body_length. The iPhone shards ran 56-100 min against a 100-min limit (86-113 s per mutant), and one timed out; ten shards of ~25 mutants leave room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
Ten shards ran 41-86 min on the confirming run; the spread is the runner (a 66-177 s suite baseline, and a hung mutant costs five), so 100 left a slow runner too little room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 27, 2026
Collaborator
Author
|
Dequeued on The failure is
It should go back in the queue as is. Generated by Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Mutation testing (
scripts/mutate.sh) was the one test suite CI could run but only ran when someone started it by hand. It also only tried mutations that flip a condition, and it didn't cover the iPhone code at all. This PR changes all three, and kills every mutant the new setup found.Result
Final confirming run, on this branch:
swift test)BlurtiOSTests)Bounce.swiftafter its fixThe first runs found 24 engine and 34 iPhone survivors. Each one now has either:
return, neverenter; window placement from an offset display.// mutate-ok: <reason>on the line (4 engine, 8 iPhone), for a change no input can affect. For example: a counter only ever compared for equality, a guard whose case the next guard already returns, or keep-the-words on a window that has none. Where a line held several conditions, I split them so the exemption covers only the one.What changed
Runs daily and reports
main. It still runs from the Actions tab, with asuitechoice (all / engine / ios).mutation-testinglists the latest survivors and target candidates. Each daily run rewrites it, and the first complete run with neither closes it. A partial run adds a warning and never closes it. It only needsGITHUB_TOKEN.fixjob gives the survivors to Claude (anthropics/claude-code-action, pinned to v1.0.270). Claude adds the test that catches each one, or a reasonedmutate-ok, and can't change app code. The job opens a PR labelledmutation-testingthat refers to the issue, and links the PR from the issue.mutation-testingPR is still open, and never pushes tomain.checkruns on the PR.ANTHROPIC_API_KEYsecret it skips and leaves a notice.Tries more mutations (
scripts/mutate.sh)>=→>,<=→<,<→<=,>→>=.!, never!=,x!,try!oras!.-→+,*↔/,-=→+=,+= 1→-= 1.<,>and arithmetic match only with a space on each side. Swift requires a binary operator's spacing to match on both sides, and generics,->, unary minus and..<never have it.Adds an iPhone suite
--suite iosmutates 22BlurtiOSCorefiles and runsBlurtiOSTestson a simulator, with parallel testing off so a hung mutant can't leave simulator clones running.--filespicks the suite from the paths, and--print-targetsprints a suite's list.check.shvalidates both lists.Suggests new targets (
scripts/mutate-candidates.sh)// mutate-not-target: <reason>retires one.Workflow layout
candidatesjob per suite.Setup needed for
fix: anANTHROPIC_API_KEYrepo secret and the Claude GitHub App installed on the repo.Cost: about 8 engine runner-hours plus up to 10 iPhone runner-hours a day, two candidates jobs, and up to 2 hours for
fixon days something survives.How it was tested
CI:
checkis green on the head,2c9b430. Along the way, two UI jobs failed once each and passed on one rerun without any change to what they cover:ios-audits (a), the consent sheet and Dynamic Type checks;live-tests,LivePerformerTests' button press.Mutation runs: the results above come from dispatched
mutateruns on this branch: 46057617256 for both suites, then 46067618841 forBounce.swift.Local checks:
scripts/check.sh --portablepasses, andactionlintandzizmorreport nothing.Not exercised yet: the
issueandfixjobs only run on the daily schedule onmain, so the first daily run after merge is their first real test.scripts/check.shpasses (or CI will, if I'm not on a Mac)I read AGENTS.md and this doesn't reintroduce anything deliberately removed
Docs updated if behavior changed
🤖 Generated with Claude Code
https://claude.ai/code/session_01DS5B1V7g5uezBz3pgTSgD8