Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Mutation Score Calculate

quality.mutation_score_calculate

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

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

Note
Calculates a mutation score from outcome counts or a bounded result list.

Non-goals

  • Does not run mutation tests
  • Does not parse vendor mutation reports
  • Does not classify equivalent mutants

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysis

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive processing
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
countsobjectNoClosed outcome counts; omit it when results is sent. Runtime accepts at most 1000000 mutants in aggregate.
resultsarrayNoClosed {outcome} rows, 0 through 1000001; omit it when counts is sent. Runtime accepts at most 1000000.
denominatorPolicystringNoEXECUTED or ALL_VIABLE; omit it for EXECUTED.

Output schema

FieldTypeRequiredDescription
scorenumberNoKilled over denominator rounded to six decimals. Omit it when the denominator is zero.
scoreReasonstringNoZERO_DENOMINATOR when score is omitted; omit it when a score was computed.
numeratorintegerYesKilled count used as the numerator.
denominatorintegerYesPublished denominator after the selected policy.
denominatorPolicystringYesDenominator policy that was actually applied.
countsobjectYesClosed six-way outcome counts after aggregation: killed, survived, noCoverage, timedOut, error and nonViable integers.
excludedOutcomesarrayYesOutcome names excluded from the denominator, in a stable order.

API contract

POST /v1/execute
curl
curl -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}}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
MUTATION_SCORE_INVALID400NoThe request payload failed this skill's input validation.
MUTATION_SCORE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "skillKey": "quality.mutation_score_calculate",
  "input": {
    "counts": {
      "survived": 2,
      "killed": 8
    }
  }
}

Examples

Eight killed and two survived is score 0.8 under EXECUTED

Inputjson
{
  "counts": {
    "survived": 2,
    "killed": 8
  }
}
Expected outputjson
{
  "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
  }
}
Tip
The denominator is ten executed mutants, so the score is 0.8.

Only non-viable mutants yield score JSON null

Inputjson
{
  "counts": {
    "nonViable": 3
  }
}
Expected outputjson
{
  "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
  }
}
Tip
NON_VIABLE is excluded, the denominator is zero, and score stays JSON null.
  • Turn PIT counts into a published score
  • Compare EXECUTED against ALL_VIABLE

Avoid for

  • Running mutants
  • Deciding whether a score is good enough

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.

Tags

analysisquality