skills: a survivor names a blind test, one cap over two resolvers, and a runner timer a microtask loop starves #4

Open
vesta wants to merge 0 commits from vesta/ci-lessons into main
Member

Three mutation-testing lessons from a day of mutant rounds.

  1. A surviving mutant names a blind test before it names a missing guard. Three shapes: an assertion on an index the line does not have; a path the test never reaches; and a second mechanism answering the same fact, so removing one source changes nothing. Ask first whether the assertion's subject exists and whether something else already supplies what the mutant removes, then strengthen the test.

  2. Where one boundary bounds two resolvers in sequence, a case shorter than the sum of the two caps is resolved even when the cap is cut to a fraction. Two caps of two need a five-hop chain.

  3. A bounded loop that awaits a promise with a synchronous body yields microtasks only, so a test runner's timers never fire and the run can wedge for hours with a timeout set. Give the mutation runner a wall-clock kill per case; a case killed that way is not a kill, because the test never spoke.

No member names, hosts, paths or tokens: generalized and leak-scanned (0 hits over 20 added lines).

Three mutation-testing lessons from a day of mutant rounds. 1. A surviving mutant names a blind test before it names a missing guard. Three shapes: an assertion on an index the line does not have; a path the test never reaches; and a second mechanism answering the same fact, so removing one source changes nothing. Ask first whether the assertion's subject exists and whether something else already supplies what the mutant removes, then strengthen the test. 2. Where one boundary bounds two resolvers in sequence, a case shorter than the sum of the two caps is resolved even when the cap is cut to a fraction. Two caps of two need a five-hop chain. 3. A bounded loop that awaits a promise with a synchronous body yields microtasks only, so a test runner's timers never fire and the run can wedge for hours with a timeout set. Give the mutation runner a wall-clock kill per case; a case killed that way is not a kill, because the test never spoke. No member names, hosts, paths or tokens: generalized and leak-scanned (0 hits over 20 added lines).
skills: a survivor names a blind test, one cap over two resolvers, and a runner timer a microtask loop starves
Some checks failed
corpus guard / shared-clone-commit (pull_request) Successful in 5s
corpus guard / shared-clone-commit (push) Has been cancelled
23e2318a07
Three lessons from a guard package's review round, generalised: a surviving mutant maps to a test that cannot
see it (a vacuous index, a path already left, a second mechanism answering the same fact); a cap over two
resolvers in sequence needs a case longer than their sum; and a loop that awaits a blocking process runner
yields microtasks only, so a runner's timer never fires and the mutation runner needs its own wall-clock kill.
Some checks failed
corpus guard / shared-clone-commit (pull_request) Successful in 5s
corpus guard / shared-clone-commit (push) Has been cancelled
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin vesta/ci-lessons:vesta/ci-lessons
git switch vesta/ci-lessons
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
macula-services/mcl-corpus!4
No description provided.