Mutation Score Calculate
quality.mutation_score_calculate
Overview
You send either closed outcome counts or a list of closed {outcome} results, never both. Outcomes are KILLED, SURVIVED, NO_COVERAGE, TIMED_OUT, ERROR and NON_VIABLE. denominatorPolicy defaults to EXECUTED (killed plus survived plus timedOut plus error). ALL_VIABLE also includes NO_COVERAGE. NON_VIABLE is always excluded. A zero denominator returns score JSON null with scoreReason ZERO_DENOMINATOR. This does not run mutants or parse a vendor report.
Mutation engines disagree on denominators; a published policy turns counts into one score.
Reliability
Scores round to six decimals. A zero denominator returns score JSON null. MUTATION_SCORE_INVALID — trigger: both counts and results, neither, or an unknown outcome; retryable: no; next: send exactly one of counts or results. MUTATION_SCORE_LIMIT_EXCEEDED — trigger: more than 1000000 mutants; retryable: no; next: aggregate to counts.
Context footprint
Counts and a score only; mutant source is never returned. A successful call costs 1 execution credit.
When to use it
When mutant outcomes are already normalized and a score must be computed.
When mutants still need running, or when a quality bar must be decided.
Powered by Squillify's own mutation-score arithmetic. No mutation engine is involved.
Scope
Non-goals
- Does not run mutation tests
- Does not parse vendor mutation reports
- Does not classify equivalent mutants
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- Targets sensitive data
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| counts | object | No | Closed outcome counts; omit it when results is sent. Runtime accepts at most 1000000 mutants in aggregate. |
| results | array | No | Closed {outcome} rows, 0 through 1000001; omit it when counts is sent. Runtime accepts at most 1000000. |
| denominatorPolicy | string | No | EXECUTED or ALL_VIABLE; omit it for EXECUTED. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| score | number | No | Killed over denominator rounded to six decimals. Omit it when the denominator is zero. |
| scoreReason | string | No | ZERO_DENOMINATOR when score is omitted; omit it when a score was computed. |
| numerator | integer | Yes | Killed count used as the numerator. |
| denominator | integer | Yes | Published denominator after the selected policy. |
| denominatorPolicy | string | Yes | Denominator policy that was actually applied. |
| counts | object | Yes | Closed six-way outcome counts after aggregation: killed, survived, noCoverage, timedOut, error and nonViable integers. |
| excludedOutcomes | array | Yes | Outcome names excluded from the denominator, in a stable order. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"quality.mutation_score_calculate","input":{"counts":{"killed":8,"survived":2}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("quality.mutation_score_calculate", {"counts":{"survived":2,"killed":8}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| MUTATION_SCORE_INVALID | 400 | No | The request payload failed this skill's input validation. |
| MUTATION_SCORE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not run mutation tests
- Does not parse vendor mutation reports
- Does not classify equivalent mutants
- Running mutants
- Deciding whether a score is good enough
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "quality.mutation_score_calculate",
"input": {
"counts": {
"survived": 2,
"killed": 8
}
}
}Examples
Eight killed and two survived is score 0.8 under EXECUTED
{
"counts": {
"survived": 2,
"killed": 8
}
}{
"score": 0.8,
"excludedOutcomes": [
"NO_COVERAGE",
"NON_VIABLE"
],
"numerator": 8,
"denominator": 10,
"denominatorPolicy": "EXECUTED",
"counts": {
"killed": 8,
"survived": 2,
"noCoverage": 0,
"timedOut": 0,
"error": 0,
"nonViable": 0
}
}Only non-viable mutants yield score JSON null
{
"counts": {
"nonViable": 3
}
}{
"excludedOutcomes": [
"NO_COVERAGE",
"NON_VIABLE"
],
"numerator": 0,
"scoreReason": "ZERO_DENOMINATOR",
"denominator": 0,
"denominatorPolicy": "EXECUTED",
"counts": {
"killed": 0,
"survived": 0,
"noCoverage": 0,
"timedOut": 0,
"error": 0,
"nonViable": 3
}
}Recommended use cases
- Turn PIT counts into a published score
- Compare EXECUTED against ALL_VIABLE
Avoid for
- Running mutants
- Deciding whether a score is good enough
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.