{
  "schema_version": 1,
  "title": "Model Serving: Health Checks and Timeouts",
  "review_type": "AI-assisted source-support audit; not independent expert verification",
  "sources": [
    {
      "id": "S1",
      "key": "probes-concepts",
      "title": "Liveness, Readiness, and Startup Probes | Kubernetes",
      "author": "Kubernetes contributors. (Documentation accessed 2026).",
      "url": "https://kubernetes.io/docs/concepts/workloads/pods/probes/",
      "requested_url": "https://kubernetes.io/docs/concepts/workloads/pods/probes/",
      "accessed_at": "2026-11-13T22:44:36.814Z",
      "source_type": "primary",
      "version": null,
      "published_at": null,
      "source_date_note": "Kubernetes contributors. (Documentation accessed 2026).",
      "retrieved_body_sha256": "7a5cf80dd9a09063bc90cded475f2a87be9804ff25b0327e9f0b467bf9b97416",
      "library": null,
      "evidence": [
        {
          "id": "S1-E1",
          "location": "Startup probe",
          "quote": "Kubernetes does not execute liveness or readiness probes until the startup probe succeeds",
          "normalized_text_offset": 751
        },
        {
          "id": "S1-E2",
          "location": "Readiness probe",
          "quote": "Readiness probes determine when a container is ready to accept traffic.",
          "normalized_text_offset": 2352
        }
      ],
      "limitations": "Role distinctions in current official documentation; concrete probe design is application-specific.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S2",
      "key": "probes",
      "title": "Configure Liveness, Readiness and Startup Probes | Kubernetes",
      "author": "Kubernetes contributors. (Documentation accessed 2026).",
      "url": "https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
      "requested_url": "https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/",
      "accessed_at": "2026-11-13T22:38:57.777Z",
      "source_type": "primary",
      "version": null,
      "published_at": null,
      "source_date_note": "Kubernetes contributors. (Documentation accessed 2026).",
      "retrieved_body_sha256": "652fbaf949cdb5214aceb741d970c779f2d271d74c2a1c8f3fcbd55991d613c3",
      "library": null,
      "evidence": [
        {
          "id": "S2-E1",
          "location": "Define readiness probes; probe configuration",
          "quote": "failureThreshold",
          "normalized_text_offset": 13370
        }
      ],
      "limitations": "Failure thresholds and lifecycle behavior; no deployment manifest is applied.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S3",
      "key": "timeouts",
      "title": "Coroutines and tasks — Python 3.13.18 documentation",
      "author": "Python Software Foundation. (Python 3.13.18 documentation).",
      "url": "https://docs.python.org/3.13/library/asyncio-task.html",
      "requested_url": "https://docs.python.org/3.13/library/asyncio-task.html",
      "accessed_at": "2026-11-13T22:44:36.693Z",
      "source_type": "primary",
      "version": "Python 3.13.18",
      "published_at": null,
      "source_date_note": "Python Software Foundation. (Python 3.13.18 documentation).",
      "retrieved_body_sha256": "bd7b9a435bc0f30afc28eb3237abcc489e131697f53d84a708bfd47480fc35be",
      "library": null,
      "evidence": [
        {
          "id": "S3-E1",
          "location": "asyncio.wait_for",
          "quote": "The function will wait until the future is actually cancelled",
          "normalized_text_offset": 22510
        }
      ],
      "limitations": "Cancellation completion can take longer than the timeout; this is not a hard process kill.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    }
  ],
  "claims": [
    {
      "id": "C01",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "Initialize service — Startup gate — Allow the application to initialize under its configured startup policy. — The toy holds the other checks while startup has not succeeded.; Evaluate signals — Readiness + liveness — After startup, evaluate readiness and liveness independently. — Readiness does not gate liveness in the actual probe design.; Apply controls — Traffic + restart — Readiness controls eligibility for normal Service traffic; liveness failures can trigger restart. — The toy uses a liveness failure threshold of three.; Observe requests — Deadline + outcome — Record timeout, cancellation completion and request outcome separately. — Request timeout handling is separate from the probe state shown below.",
      "source_ids": [
        "S1",
        "S2",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S2-E1",
        "S3-E1"
      ],
      "verdict": "editorial_diagram_with_source_supported_roles",
      "reason": "Diagram is a teaching workflow, not an exhaustive protocol or measured system. Each role and arrow is bounded in nearby text."
    },
    {
      "id": "C02",
      "notebook_locations": [
        "experiment"
      ],
      "claim": "Startup is configured. Before it succeeds, readiness and liveness are not evaluated. Afterward, vary readiness and a consecutive liveness-failure streak. The fictional restart threshold is three. This is an instantaneous decision model. It omits probe periods, startup failure budget, termination grace periods, restart policy and transient endpoint propagation. A restart decision does not mean traffic removal or restart has already completed. Startup has not succeeded: Other probes gated: This model does not simulate exhausting the startup failure budget. Started, readiness fails, liveness passes: Not ready; no liveness restart: A readiness failure alone is not the liveness restart condition. Started, 3 liveness failures: Restart decision: Three is this example’s chosen threshold, not a universal default.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_synthetic_experiment",
      "reason": "Original fixed inputs and outputs; Python assertions and independent browser arithmetic checked in verification artifacts."
    },
    {
      "id": "C03",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "A model process can exist before its weights and service dependencies are ready for requests. Kubernetes gives startup, readiness and liveness probes different roles. A configured startup probe gates the other two until it succeeds. Readiness affects service traffic; liveness can cause a container restart after the configured failures.",
      "source_ids": [
        "S1",
        "S2"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S2-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C04",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "A request deadline answers a different question: how long the caller waits for an operation. Python’s asyncio.wait_for cancels the awaited task on timeout and waits for cancellation to complete, so elapsed time can exceed the timeout. A cancellation request is not proof that all underlying computation or external side effects have stopped.",
      "source_ids": [
        "S3"
      ],
      "evidence_ids": [
        "S3-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C05",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "The readiness result and liveness failure counter are drawn on separate lanes. At readiness No with zero liveness failures, the model is not eligible for normal Service traffic but has no liveness-triggered restart. At threshold, the restart decision takes priority in the summary; the diagram still preserves the separate readiness signal.",
      "source_ids": [
        "S1",
        "S2"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S2-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C06",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "An HTTP success from a health endpoint says only what that endpoint checks. Editorial design questions include whether readiness should include successful model initialization and required dependencies, and whether a liveness check can mistake slow useful work for a deadlock. This notebook does not prescribe a single probe for every serving system.",
      "source_ids": [
        "S1"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C07",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "For Python 3.13, a wait_for timeout normally raises TimeoutError after requesting task cancellation. Cleanup can extend the wait. When an inference call delegates work to another process or remote service, confirm that system’s own cancellation behavior rather than assuming a client timeout stops it.",
      "source_ids": [
        "S3"
      ],
      "evidence_ids": [
        "S3-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C08",
      "notebook_locations": [
        "reproduce"
      ],
      "claim": "The original standard-library Python example passed its assertions and 20 input fixtures. Its browser implementation is separately compared against those results.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "tested_original_example",
      "reason": "No publisher code executed; no model, external network call or privileged action in the examples."
    },
    {
      "id": "C09",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "When a configured startup probe has not succeeded, what happens to the other probes? Correct answer: They are gated. Kubernetes holds readiness and liveness checks until startup succeeds.",
      "source_ids": [
        "S1"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C10",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Does failing readiness alone mean a liveness restart? Correct answer: No. Readiness and liveness have different purposes and actions.",
      "source_ids": [
        "S1",
        "S2"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S2-E1"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C11",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Can asyncio.wait_for take longer than its timeout? Correct answer: Yes, while cancellation completes. The documented function waits for the future to be cancelled.",
      "source_ids": [
        "S3"
      ],
      "evidence_ids": [
        "S3-E1"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C12",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Does this page test a live model server? Correct answer: No. All signals are local teaching inputs; no endpoint is contacted.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_example_or_reasoned_limitation",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    }
  ],
  "original_experiment": {
    "scope": "A toy control decision model based on Kubernetes probe roles. It does not operate a cluster or contact a model endpoint.",
    "assumptions": "This is an instantaneous decision model. It omits probe periods, startup failure budget, termination grace periods, restart policy and transient endpoint propagation. A restart decision does not mean traffic removal or restart has already completed.",
    "results_file": "verification/python-results.json"
  },
  "library_gap": "No directly useful saved health-probe original found. Current Kubernetes and pinned Python primary documentation supply the evidence.",
  "excluded_evidence": [],
  "limitations": [
    "No real model or GPU measured.",
    "Sources and version/date labels checked as recorded; this does not prove absence of errors."
  ],
  "separate_audit_file": "verification/source-audit.json",
  "publication": {
    "state": "published",
    "approved_on": "2026-11-14",
    "published_on": "2026-11-14",
    "source_checks_on": "2026-11-13"
  }
}
