/mutant Run and fix be mutant run 'JSONRPC::Request'
- User
/mutant Run and fix
be mutant run 'JSONRPC::Request' - User
/effort effort
- User
/effort effort
- User
mutant /mutant Run and fix
be mutant run 'JSONRPC::Request' Assistant
Running mutant for
JSONRPC::Requestnow.Assistant
2 alive mutations. Let me see all details and the source/tests.
Assistant
Let me read the source and tests.
Assistant
Let me check the mutant config.
Assistant
Both mutations are equivalent —
JSONRPC::Requestvalidates:methodas a required attribute at construction time, soattributes[:method],attributes.fetch(:method), andself[:method]all return the same value for every possibleJSONRPC::Request. No test can distinguish them because you can't construct aRequestwithout a valid:methodinattributes.Unkillable (both mutations). Adding to the ignore list.
Assistant
Let me check the correct mutant config format.
Assistant
The
ignorekey belongs undermatcher. Fixing the YAML.Assistant
Let me check what
Dry::Struct#to_hactually returns to understand why thesupermutation survived.Assistant
Let me check what
Dry::Struct#to_hreturns for this struct to understand the mutation.Assistant
Now I understand the difference: when
params: nilis explicitly passed, the customto_homitsparams(correct) whilesuperincludesparams: nil. The existing tests never passparams: nilexplicitly — they either omit params or pass an array/hash. Adding that test will kill thesupermutation.Killable. The
supermutation survives because no test exercises the case whereparams:is explicitly nil (vs omitted).Option A — add test: cover
params: nilin#to_h.Option B — simplify code: not viable here —
superproduces different output (params: nilincluded) which is semantically wrong per JSON-RPC spec.Assistant
All 14 tests pass. Now re-run mutant.