{
  "code": null,
  "collection": "architecture",
  "href": "https://banes-lab.com/ontology#architecture-flaky-test-normalization",
  "id": "flaky-test-normalization",
  "kind": "anti-pattern",
  "layer": {
    "href": "https://banes-lab.com/ontology/schema#layer-enforcement-core",
    "json": "https://banes-lab.com/json/records/layer/enforcement-core",
    "label": "Enforcement Core",
    "markdown": "https://banes-lab.com/records/layer/enforcement-core.md",
    "ref": "layer:enforcement-core"
  },
  "name": "Flaky Test Normalization",
  "ref": "architecture:flaky-test-normalization",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-isolate-test-state",
          "json": "https://banes-lab.com/json/records/lexicon/isolate-test-state",
          "label": "Isolate Test State",
          "markdown": "https://banes-lab.com/records/lexicon/isolate-test-state.md",
          "ref": "lexicon:isolate-test-state"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-inject-clock-and-randomness",
          "json": "https://banes-lab.com/json/records/lexicon/inject-clock-and-randomness",
          "label": "Inject Clock and Randomness",
          "markdown": "https://banes-lab.com/records/lexicon/inject-clock-and-randomness.md",
          "ref": "lexicon:inject-clock-and-randomness"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-fix-the-race",
          "json": "https://banes-lab.com/json/records/lexicon/fix-the-race",
          "label": "Fix the Race",
          "markdown": "https://banes-lab.com/records/lexicon/fix-the-race.md",
          "ref": "lexicon:fix-the-race"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-fake-at-the-boundary",
          "json": "https://banes-lab.com/json/records/lexicon/fake-at-the-boundary",
          "label": "Fake at the Boundary",
          "markdown": "https://banes-lab.com/records/lexicon/fake-at-the-boundary.md",
          "ref": "lexicon:fake-at-the-boundary"
        }
      ],
      "relation": "refactored-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#vocabulary-severity-discouraged",
          "json": "https://banes-lab.com/json/records/vocabulary/severity-discouraged",
          "label": "discouraged",
          "markdown": "https://banes-lab.com/records/vocabulary/severity-discouraged.md",
          "ref": "vocabulary:severity-discouraged"
        }
      ],
      "relation": "severity"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-category-anti-patterns",
          "json": "https://banes-lab.com/json/records/architecture-category/anti-patterns",
          "label": "Anti-patterns",
          "markdown": "https://banes-lab.com/records/architecture-category/anti-patterns.md",
          "ref": "architecture-category:anti-patterns"
        }
      ],
      "relation": "category"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#force-correctness-verification",
          "json": "https://banes-lab.com/json/records/force/correctness-verification",
          "label": "Correctness verification",
          "markdown": "https://banes-lab.com/records/force/correctness-verification.md",
          "ref": "force:correctness-verification"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#force-semantic-consistency",
          "json": "https://banes-lab.com/json/records/force/semantic-consistency",
          "label": "Semantic consistency",
          "markdown": "https://banes-lab.com/records/force/semantic-consistency.md",
          "ref": "force:semantic-consistency"
        }
      ],
      "relation": "force"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-reproducibility",
          "json": "https://banes-lab.com/json/records/architecture/reproducibility",
          "label": "Reproducibility",
          "markdown": "https://banes-lab.com/records/architecture/reproducibility.md",
          "ref": "architecture:reproducibility"
        }
      ],
      "relation": "negated-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/disciplined-methodology/build#the-gate-holds-the-line",
          "json": "https://banes-lab.com/json/disciplined-methodology/build/the-gate-holds-the-line",
          "label": "The gate holds the line",
          "markdown": "https://banes-lab.com/disciplined-methodology/build/the-gate-holds-the-line.md",
          "ref": "chapter:/disciplined-methodology/build#the-gate-holds-the-line"
        },
        {
          "href": "https://banes-lab.com/disciplined-methodology/verify#a-report-not-a-checkbox",
          "json": "https://banes-lab.com/json/disciplined-methodology/verify/a-report-not-a-checkbox",
          "label": "A report, not a checkbox",
          "markdown": "https://banes-lab.com/disciplined-methodology/verify/a-report-not-a-checkbox.md",
          "ref": "chapter:/disciplined-methodology/verify#a-report-not-a-checkbox"
        },
        {
          "href": "https://banes-lab.com/software-architecture/scale#scale-follows-determinism",
          "json": "https://banes-lab.com/json/software-architecture/scale/scale-follows-determinism",
          "label": "Scale follows determinism",
          "markdown": "https://banes-lab.com/software-architecture/scale/scale-follows-determinism.md",
          "ref": "chapter:/software-architecture/scale#scale-follows-determinism"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-category-anti-patterns",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-anti-patterns",
          "label": "Anti-patterns",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md",
          "ref": "chapter:/ontology#architecture-category-anti-patterns"
        },
        {
          "href": "https://banes-lab.com/ontology#architecture-category-correctness-determinism-verification",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-correctness-determinism-verification",
          "label": "Correctness / Determinism / Verification",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-correctness-determinism-verification.md",
          "ref": "chapter:/ontology#architecture-category-correctness-determinism-verification"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-correctness-determinism-verification",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-correctness-determinism-verification",
          "label": "Correctness / Determinism / Verification",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-correctness-determinism-verification.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-correctness-determinism-verification"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-transactions-state-concurrency",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-transactions-state-concurrency",
          "label": "Transactions / State / Concurrency",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-transactions-state-concurrency.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-transactions-state-concurrency"
        },
        {
          "href": "https://banes-lab.com/ontology/reasoning#the-failure-shapes",
          "json": "https://banes-lab.com/json/ontology/reasoning/the-failure-shapes",
          "label": "Failure shapes",
          "markdown": "https://banes-lab.com/ontology/reasoning/the-failure-shapes.md",
          "ref": "chapter:/ontology/reasoning#the-failure-shapes"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-vocabulary-severity",
          "json": "https://banes-lab.com/json/ontology/schema/the-vocabulary-severity",
          "label": "Severity levels",
          "markdown": "https://banes-lab.com/ontology/schema/the-vocabulary-severity.md",
          "ref": "chapter:/ontology/schema#the-vocabulary-severity"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-forces",
          "json": "https://banes-lab.com/json/ontology/schema/the-forces",
          "label": "The forces",
          "markdown": "https://banes-lab.com/ontology/schema/the-forces.md",
          "ref": "chapter:/ontology/schema#the-forces"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "summary": "A defect in which intermittent test failures are accepted and rerun until they pass.",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/ontology#architecture-prompt-sprawl",
      "json": "https://banes-lab.com/json/records/architecture/prompt-sprawl",
      "label": "Prompt Sprawl",
      "markdown": "https://banes-lab.com/records/architecture/prompt-sprawl.md",
      "ref": "architecture:prompt-sprawl"
    },
    "previous": {
      "href": "https://banes-lab.com/ontology#architecture-mock-mirage",
      "json": "https://banes-lab.com/json/records/architecture/mock-mirage",
      "label": "Mock Mirage",
      "markdown": "https://banes-lab.com/records/architecture/mock-mirage.md",
      "ref": "architecture:mock-mirage"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/records/architecture",
    "label": "Architecture principles",
    "markdown": "https://banes-lab.com/api/records/architecture.md",
    "ref": "api:records/architecture"
  },
  "aliases": [],
  "exemplar": {
    "after": "test(\"foo is created deterministically\", async () => { const foo = await createFoo.execute(input); expect(foo.id).toBe(expectedId); });",
    "before": "test.retry(5)(\"foo works sometimes\", async () => { await sleep(random()); expect(await getFoo()).toBeTruthy(); });",
    "lang": "ts",
    "medium": "code"
  },
  "formedBy": "Accept intermittent test failures as normal and rerun until green instead of fixing nondeterminism or isolation defects.",
  "scope": [
    "semantic_consistency",
    "correctness_verification"
  ],
  "severity": "discouraged"
}
