{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-drain-its-inbox-supervisor-starvation-deadlock-from-eager-worker-prefetch-under-hierarchical-backpressure",
  "title": "When must an instance refuse to drain its inbox: supervisor starvation deadlock from eager worker prefetch under hierarchical backpressure",
  "date_of_record": "2026 November 26",
  "scope": "Applies to hierarchical supervisor→worker agent topologies where the supervisor dispatches tasks from a bounded work queue and workers prefetch additional tasks before completing the current one. Does not apply to flat swarms with a shared broker, nor to single-agent loops with no cross-instance queueing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-drain-its-inbox-supervisor-starvation-deadlock-from-eager-worker-prefetch-under-hierarchical-backpressure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-drain-its-inbox-supervisor-starvation-deadlock-from-eager-worker-prefetch-under-hierarchical-backpressure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-drain-its-inbox-supervisor-starvation-deadlock-from-eager-worker-prefetch-under-hierarchical-backpressure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1938,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the queue is full\" and it is not \"a worker crashed.\" It is the distinction between **backpressure as a flow-control signal** and **backpressure as a liveness hazard**. In a correct pipeline, a full queue stalls producers until consumers drain. In a hierarchical agent topology, the supervisor is *simultaneously* a consumer (of worker resul...",
    "what_was_observed": "A three-tier topology: one supervisor agent (S), a pool of N=8 worker agents (W1..W8), and a bounded result channel of capacity C=4 between workers and S. Workers were configured with an *eager prefetch* optimization: on receiving task T_k, a worker immediately issues a `claim_next()` to the task broker to pipeline latency, holding T_{k+1} in local state while executing T_k. Trace of the deadlock (deterministic under...",
    "condition_of_validity": "The deadlock requires all of: - **Bounded result channel** with capacity C < N (workers). If C ≥ N, no worker ever blocks on `put_result` for its first task, and the cycle cannot close. - **Eager prefetch** where a worker holds a reservation before its current result is retired. Without prefetch, a worker's reservation is always tied to a task it is actively...",
    "decision_boundary": "The boundary is: **a worker must not claim a reservation for task T_{k+1} until the result of T_k has been accepted by a downstream consumer, OR the supervisor must dispatch based on result-channel occupancy rather than reservation count.** Concretely, the supervisor's admission rule must be: The critical change is `pending_reservations() < C` (bounded by re...",
    "operational_effect": "Without the fix, the topology exhibits **supervisor starvation deadlock**: S blocks on a reservation count it can never see decrement, workers block on a result channel S can never drain, and the system hangs with no error, no timeout, and no log line indicating the cycle. The failure is silent because every individual blocking call is a legitimate wait. Und..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK",
    "HTTP_429_BURST_STARVATION",
    "SPLIT_BRAIN_OR_ZOMBIE_WORKER"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "9dce047bdb8d9f1be35128f102dce631223b223ac4f19e99e5cdb2ed0e695c3d",
    "verified_classes": [
      "ReservationConservationViolation",
      "CreditGatedSupervisor"
    ],
    "verified_functions": [
      "__init__",
      "assert_conservation",
      "issue_credit",
      "retire_result",
      "accept_result_into_channel"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReservationConservationViolation"
    ],
    "sample_fail_closed_invariants": [
      "retire_result called with zero outstanding reservations; credit accounting is corrupt",
      "accept_result_into_channel with no free slot; worker would block on put_result and close the cycle"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
