Flaky test judge

Decide whether a supplied flaky-test history justifies a temporary quarantine packet, an ignore decision, or a stop for more evidence.

You’re reading version sha-097872981bf1. Go to the current version

Overview

Use this skill when a release owner has run history for one test and needs a read-only quarantine decision. The skill reads supplied test-run history, metadata, and a release policy. It computes the pass-rate, identifies failure modes from the supplied logs, and returns a typed disposition.

The skill never edits a repository, disables a test, opens an issue, creates a pull request, or fires another run. When quarantine is justified it emits a bounded runx.flaky.test_triage.v1 packet that names the downstream issue-to-pr inputs. A separate governed issue-to-pr run drafts the change, and the human merge gate on that draft is the only path to a live disable.

In the manual

Runner

  • triage

Declared by its execution profile. Read the profile

SKILL.md

Flaky Test Judge

Use this skill when a release owner has run history for one test and needs a read-only quarantine decision. The skill reads supplied test-run history, metadata, and a release policy. It computes the pass-rate, identifies failure modes from the supplied logs, and returns a typed disposition.

The skill never edits a repository, disables a test, opens an issue, creates a pull request, or fires another run. When quarantine is justified it emits a bounded runx.flaky.test_triage.v1 packet that names the downstream issue-to-pr inputs. A separate governed issue-to-pr run drafts the change, and the human merge gate on that draft is the only path to a live disable.

Inputs

  • test_run_history.sample_size: number of runs considered.
  • test_run_history.runs[]: each run has status, duration, and logs.
  • test_metadata.test_path: exact test path or test id.
  • test_metadata.suite: owning test suite.
  • test_metadata.tags[]: supplied tags such as e2e, payment, or quarantine-candidate.
  • release_policy.flake_threshold_pct: minimum pass-rate required to avoid a quarantine decision.
  • release_policy.min_sample_size: minimum run count before a quarantine decision is allowed.
  • release_policy.max_quarantine_days: upper bound for any temporary quarantine.

Output

The default runner returns a runx.flaky.test_triage.v1 packet with:

  • disposition.decision: quarantine, ignore, fix_now, or refuse.
  • disposition.confidence: confidence derived from sample size and failure-mode concentration.
  • disposition.reason: cites the pass-rate, run count, policy threshold, and observed failure modes.
  • quarantine_packet: contains the bounded quarantine details when quarantine is justified; otherwise it is an explicit { present: false, reason: ... } object. When present, it includes test_path, duration_days, fix_template, and exclusion_marker.
  • dispatch_target: names the offline downstream issue-to-pr lane when quarantine is justified; otherwise it is an explicit { present: false, reason: ... } object. For quarantine decisions it names the offline downstream issue-to-pr lane.
  • escalation: the human or evidence lane that should handle the decision.

Decision Rules

  • Refuse when no run history is provided.
  • Refuse when sample_size is below release_policy.min_sample_size.
  • Do not quarantine a test passing at or above release_policy.flake_threshold_pct.
  • Never exceed release_policy.max_quarantine_days.
  • Never invent a failure mode absent from the supplied logs.
  • Treat near-threshold or mixed failure evidence as a human review lane, not an automatic quarantine packet.
  • Route quarantine packets by naming issue-to-pr typed inputs only; do not consume the packet as an effect inside this skill.

Harness Cases

  • quarantine_justified: a 20-run history with a 65% pass-rate, 7 failures, and timeouts in 6 of those failures against a 70% policy threshold. Expected disposition is quarantine; the packet is bounded to 7 days and routes to issue-to-pr behind a human merge gate.
  • missing_run_history: no run history and sample size 0. Expected disposition is refuse with a missing-evidence stop reason and explicit non-present quarantine and dispatch objects.

Quality Profile

  • Purpose: produce one bounded, read-only flaky-test quarantine judgment.
  • Audience: release owners deciding whether to quarantine or investigate a test.
  • Evidence bar: every decision cites supplied run count, pass-rate, policy, and failure-mode evidence.
  • Safety bar: no repository mutation, no live disable, no PR creation, no authority mint, and no operational proposal.
  • Stop conditions: missing history, undersized sample, contradictory evidence, or policy fields that are absent.

Published execution profile

The execution profile published with sha-097872981bf1, shown as its exact bytes.

Runner
  • triage
Profile digestsha256:fedad6394acb1a01820975f202070fd178b7b0f762b05b75201ef66cd3c03cea
skill: flaky-test-judge
version: 0.1.0
catalog:
  kind: skill
  audience: public
  visibility: public
  role: context
  category: code
runners:
  triage:
    default: true
    inputs:
      test_run_history:
        type: json
        required: true
        description: Runs with status, duration, logs, and sample_size for one test.
      test_metadata:
        type: json
        required: true
        description: Test path, suite, and tags for the candidate flaky test.
      release_policy:
        type: json
        required: true
        description: "Policy thresholds: flake_threshold_pct, min_sample_size, and max_quarantine_days."
    steps:
      - id: triage
        agent:
          role: operator
          task: flaky-test-judge-triage
        inputs:
          test_run_history: $input.test_run_history
          test_metadata: $input.test_metadata
          release_policy: $input.release_policy
        artifacts:
          wrap_as: flaky_test_triage_packet
        outputs:
          disposition:
            required: false
          quarantine_packet:
            required: false
          dispatch_target:
            required: false
          escalation:
            required: false
harness:
  cases:
    - name: quarantine_justified
      runner: triage
      inputs:
        test_run_history:
          sample_size: 20
          runs:
            - status: passed
              duration: 18
              logs: passed
            - status: passed
              duration: 19
              logs: passed
            - status: passed
              duration: 17
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: passed
              duration: 21
              logs: passed
            - status: passed
              duration: 18
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: failed
              duration: 44
              logs: assertion mismatch after async retry
            - status: passed
              duration: 20
              logs: passed
            - status: passed
              duration: 18
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: passed
              duration: 19
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: passed
              duration: 22
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: passed
              duration: 18
              logs: passed
            - status: passed
              duration: 19
              logs: passed
            - status: timeout
              duration: 120
              logs: timeout waiting for payment sandbox
            - status: passed
              duration: 20
              logs: passed
            - status: passed
              duration: 20
              logs: passed
        test_metadata:
          test_path: tests/e2e/payment_retry.spec.ts::retries-settle-payment
          suite: payments-e2e
          tags:
            - e2e
            - payment
            - quarantine-candidate
        release_policy:
          flake_threshold_pct: 70
          min_sample_size: 20
          max_quarantine_days: 14
      caller:
        answers:
          triage:
            disposition:
              decision: quarantine
              confidence: 0.91
              reason: The supplied 20-run window has a 65% pass-rate, below the 70% policy threshold; 6 of 7 failures are timeouts, so a temporary quarantine plus tracked fix is justified.
            quarantine_packet:
              test_path: tests/e2e/payment_retry.spec.ts::retries-settle-payment
              duration_days: 7
              fix_template:
                title: Investigate flaky payment retry timeout
                body: "Review tests/e2e/payment_retry.spec.ts::retries-settle-payment. Evidence: 13/20 pass-rate, 6 timeout failures, one assertion mismatch. Remove the quarantine when the retry timing is deterministic."
              exclusion_marker: "@quarantine(until=7d, reason=payment_retry_timeout_flake)"
            dispatch_target:
              skill: issue-to-pr
              typed_inputs:
                thread_title: Quarantine flaky payment retry test and track fix
                thread_body: Temporarily disable tests/e2e/payment_retry.spec.ts::retries-settle-payment for 7 days and create the fix issue body from the flaky-test-judge packet. Human merge gate required.
                target_repo: example/payments
                base: main
            escalation:
              lane: human_merge_gate
              reason: The judge only emits a quarantine packet; issue-to-pr drafts the change and a human merge gate controls any live disable.
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
      operator_journeys:
        - mode: standalone
          confusors:
            - issue-triage
            - release
          request: Decide whether this failing test is flaky.
          expected_outcome: Return a bounded flaky-test disposition from the run history without touching the repository.
        - mode: composed
          request: Continue this flaky-test-judge work from evidence already gathered upstream.
          expected_outcome: Return a bounded flaky-test disposition from the run history without touching the repository.
          prior_evidence:
            - The test run history and metadata already supplied.
          must_not_repeat:
            - Do not rerun or quarantine the test.
    - name: missing_run_history
      runner: triage
      inputs:
        test_run_history:
          sample_size: 0
          runs: []
        test_metadata:
          test_path: tests/e2e/cart_checkout.spec.ts::checkout-happy-path
          suite: checkout-e2e
          tags:
            - e2e
            - checkout
        release_policy:
          flake_threshold_pct: 70
          min_sample_size: 20
          max_quarantine_days: 14
      expect:
        status: needs_agent

Published package and test evidence.

This exact version passed its recorded harness run: 2 checks passed · 0 failed.

Test result

Harness resultPassed
Tested versionsha-097872981bf1
Recorded result2 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases2
Test recordOpen the recorded run
Inspect receipt referencessha256:bb0d5758a8e685ea0a84baeab381c45a92b1c2b7253f17b667ae1e156d0f0580sha256:fecf86faa3c8ca12cd3d4ae202aa4d924dcfd71b6cee4b853784639ee3be3019

Package identity

Published revisionsha-097872981bf1
Content digestsha256:097872981bf1dbfd685e47f850357b2ce691fe466ba25026957009e84a7861ce
SKILL.md digestsha256:700830ee78848cb52b8f35fed6bd52d6bbbe03e1794c9414cf2fc46a3b9ab0f2
Execution profile digestsha256:fedad6394acb1a01820975f202070fd178b7b0f762b05b75201ef66cd3c03cea
Publisher identityUnverified publisher · liomilet4-png
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · Declaredliomilet4-png · 17 Oct 2026
Source provenanceNot published with this version

Version history

  1. sha-e51d4165a66eContent digest sha256:e51d4165a66e9203e77564c1f7e72c990c33121c10a9d61bfc5164086e3dcb32
  2. sha-097872981bf1ViewingContent digest sha256:097872981bf1dbfd685e47f850357b2ce691fe466ba25026957009e84a7861ce
  3. sha-d4d36cccc840Content digest sha256:d4d36cccc84067ebc873efd6cfd73b3d6596bd44f8e3075e5575d57bf1b3c174
  4. sha-de66dddb7d06Content digest sha256:de66dddb7d069c9b98ea8148009df157862b9b23625524e922e07b2f11823170