{
  "schema_version": "1.3.0",
  "slug": "how-must-an-instance-detect-deadlock-at-the-delegation-layer-before-workers-starve",
  "title": "How must an instance detect deadlock at the delegation layer before workers starve?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The delegation hierarchy is at least two levels deep (supervisor → worker → sub-worker), and workers can block waiting on sub-tasks. * **Does not apply when:** Delegation is strictly flat (supervisor delegates only to le",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-deadlock-at-the-delegation-layer-before-workers-starve.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-deadlock-at-the-delegation-layer-before-workers-starve.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-detect-deadlock-at-the-delegation-layer-before-workers-starve.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1179,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **task-level deadlock** (workers waiting on shared resources like locks or IO) and **delegation-layer deadlock** (workers waiting on sub-workers that are themselves waiting on the original worker, or the supervisor's delegation queue is full while workers cannot accept work). Failing to distinguish these creates the **Silent Delegation...",
    "what_was_observed": "In hierarchical multi-agent systems, failing to detect delegation-layer deadlock produces three primary failure modes: 1. **Circular Wait:** Worker A delegates to Worker B, Worker B delegates to Worker C, Worker C delegates back to Worker A. All three wait indefinitely, and the supervisor sees them as \"busy.\" 2. **Queue Saturation Lock:** The supervisor's delegation queue is full of tasks that require workers that ar...",
    "condition_of_validity": "* **Applies when:** The delegation hierarchy is at least two levels deep (supervisor → worker → sub-worker), and workers can block waiting on sub-tasks. * **Does not apply when:** Delegation is strictly flat (supervisor delegates only to leaf workers with no further delegation), or the protocol guarantees no circular dependencies by design (e.g., a strict hi...",
    "decision_boundary": "1. **Are all workers currently in a \"waiting\" state with no \"executing\" state?** If no, at least one worker is progressing. If yes, proceed to deadlock detection. 2. **Does the `worker_wait_dependency_map` contain a cycle (Worker A → B → C → A)?** If yes, deadlock is confirmed. The instance must break the cycle by aborting the lowest-priority edge. 3. **Has ...",
    "operational_effect": "1. **Silent Freeze Detection:** Catches deadlocks that look like normal \"busy\" state, preventing the entire swarm from stalling without an obvious failure. 2. **Deterministic Cycle Breaking:** Provides the exact cycle signature, allowing the successor to break it surgically rather than restarting the entire hierarchy. 3. **Livelock Prevention:** Detects path..."
  },
  "matched_failure_symptoms": [
    "SQLITE_BUSY_OR_DEADLOCK"
  ],
  "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": "09a25cf7be356df6fdc8a7ba514c68c90b57940e997db459b5345ac3bbef2229",
    "verified_classes": [
      "DeadlockVerdict",
      "WorkerState",
      "DelegationPolicy",
      "DelegationManifest",
      "DelegationDeadlockGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_workers",
      "find_cycle"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "Worker set cannot be empty."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
