{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/keep-every-rerun-result-when-the-failure-is-intermittent",
  "id": "MHC-D-RESEARCH-0973",
  "version": "0.1.0",
  "title": "Keep every rerun result when the failure is intermittent",
  "summary": "Rerunning until green edits the story, not the software.",
  "kind": "protocol",
  "body": "Preserve the sequence of outcomes and the conditions of each attempt. First establish that the result varies without the intended code change. Then investigate candidate dependencies such as concurrency, test order or external services instead of treating the final pass as a repair.",
  "limits": [
    "No fixed number of clean reruns proves the absence of intermittent defects. A test-environment failure may still reveal a real production risk."
  ],
  "topics": [
    "work-01-reliable-changes"
  ],
  "intents": [],
  "source_ids": [
    "RS-B476D6C7D31BC624"
  ],
  "evidence": [
    {
      "claim": "A flaky test can pass and fail on the same code, so one successful rerun does not establish that the underlying problem was fixed.",
      "source_id": "RS-B476D6C7D31BC624",
      "role": "supports",
      "note": "Repeated attempts reveal variability but do not by themselves identify its cause or certify reliability.",
      "locator": "Opening account of nondeterministic tests"
    }
  ],
  "use_when": [
    "An unchanged test alternates between passing and failing."
  ],
  "avoid_when": [
    "No fixed number of clean reruns proves the absence of intermittent defects. A test-environment failure may still reveal a real production risk."
  ],
  "example": "A batch test passes alone but fails after another test leaves shared state behind. An isolated green run did not cover that sequence.",
  "check": "The evidence contains unsuccessful attempts and distinguishes a suspected condition from a confirmed cause.",
  "steps": [
    "Record version, input, environment, attempt and outcome together.",
    "Compare failing and passing attempts for a specific condition that changed.",
    "Test that condition deliberately in a safe environment and retain failures in the report."
  ],
  "sources": [
    {
      "id": "RS-B476D6C7D31BC624",
      "title": "Where do our flaky tests come from?",
      "url": "https://testing.googleblog.com/2017/04/where-do-our-flaky-tests-come-from.html"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0973",
      "to": "MHC-D-RESEARCH-0970",
      "type": "use_before",
      "url": "/knowledge/shrink-the-example-until-the-same-failure-is-hard-to-hide"
    }
  ],
  "collections": [
    {
      "id": "RC-8F91DD82E91EA56B",
      "title": "Find the failure without creating a second incident",
      "url": "/collections/find-the-failure-without-creating-a-second-incident"
    }
  ]
}
