{
  "ruleset_code": "wp_core_ca_v1",
  "fixtures": [
    {
      "id": "lmia_high_wage_candidate_incomplete",
      "description": "Positive LMIA branch with employer facts present; wage stream still manual_review so pathway stays incomplete.",
      "facts": {
        "auth.employer_required": { "value": true, "value_type": "boolean" },
        "auth.branch_hypothesis": { "value": "lmia", "value_type": "string" },
        "employer.active_business": { "value": true, "value_type": "boolean" },
        "job.noc_2021": { "value": "21232", "value_type": "string" },
        "job.wage_hourly": { "value": 45.0, "value_type": "number" }
      },
      "expect": {
        "LMIA_HIGH_WAGE": "incomplete",
        "IMP_EXEMPTION": "blocked",
        "OPEN_PERMIT": "blocked"
      }
    },
    {
      "id": "lmia_unknown_when_active_missing",
      "description": "Unknown critical employer.active_business must not silently become matched.",
      "facts": {
        "auth.employer_required": { "value": true, "value_type": "boolean" },
        "auth.branch_hypothesis": { "value": "lmia", "value_type": "string" },
        "job.noc_2021": { "value": "21232", "value_type": "string" },
        "job.wage_hourly": { "value": 45.0, "value_type": "number" }
      },
      "expect": {
        "LMIA_HIGH_WAGE": "incomplete"
      },
      "criterion_expect": {
        "pathway": "LMIA_HIGH_WAGE",
        "code": "EMPLOYER_ACTIVE",
        "outcome": "unknown"
      }
    },
    {
      "id": "imp_blocked_without_exemption",
      "description": "IMP hypothesized without exemption code is blocked.",
      "facts": {
        "auth.branch_hypothesis": { "value": "imp", "value_type": "string" },
        "auth.employer_required": { "value": true, "value_type": "boolean" }
      },
      "expect": {
        "IMP_EXEMPTION": "blocked"
      },
      "criterion_expect": {
        "pathway": "IMP_EXEMPTION",
        "code": "EXEMPTION_CODE",
        "outcome": "failed"
      }
    },
    {
      "id": "open_permit_employer_not_required",
      "description": "Open branch requires employer authorization marked not required.",
      "facts": {
        "auth.branch_hypothesis": { "value": "open", "value_type": "string" },
        "auth.employer_required": { "value": false, "value_type": "boolean" },
        "worker.status": { "value": "visitor", "value_type": "string" }
      },
      "expect": {
        "OPEN_PERMIT": "incomplete"
      }
    },
    {
      "id": "open_blocked_if_employer_still_required",
      "description": "Open pathway fails when employer still marked required.",
      "facts": {
        "auth.branch_hypothesis": { "value": "open", "value_type": "string" },
        "auth.employer_required": { "value": true, "value_type": "boolean" },
        "worker.status": { "value": "visitor", "value_type": "string" }
      },
      "expect": {
        "OPEN_PERMIT": "blocked"
      }
    },
    {
      "id": "r186_manual_boundary",
      "description": "IRPR 186 always requires paragraph-level manual review.",
      "facts": {
        "auth.branch_hypothesis": { "value": "r186", "value_type": "string" }
      },
      "expect": {
        "R186_NO_PERMIT": "incomplete"
      },
      "criterion_expect": {
        "pathway": "R186_NO_PERMIT",
        "code": "ACTIVITY_REVIEW",
        "outcome": "manual_review"
      }
    },
    {
      "id": "quebec_caq_gate",
      "description": "Quebec worksite with CAQ flag yields incomplete pending process review.",
      "facts": {
        "employer.worksite_province": { "value": "QC", "value_type": "string" },
        "quebec.caq_required": { "value": true, "value_type": "boolean" }
      },
      "expect": {
        "QC_CAQ_GATE": "incomplete"
      }
    },
    {
      "id": "status_inside_canada_boundary",
      "description": "Inside Canada without status expiry stays blocked on expiry criterion.",
      "facts": {
        "worker.location": { "value": "inside", "value_type": "string" }
      },
      "expect": {
        "STATUS_MAINTAINED": "blocked"
      },
      "criterion_expect": {
        "pathway": "STATUS_MAINTAINED",
        "code": "STATUS_EXPIRY_KNOWN",
        "outcome": "failed"
      }
    },
    {
      "id": "conflicted_fact_stays_unknown",
      "description": "Open conflict on critical NOC must yield unknown, never matched.",
      "facts": {
        "auth.employer_required": { "value": true, "value_type": "boolean" },
        "auth.branch_hypothesis": { "value": "lmia", "value_type": "string" },
        "employer.active_business": { "value": true, "value_type": "boolean" },
        "job.noc_2021": { "value": "21232", "value_type": "string", "conflict": true },
        "job.wage_hourly": { "value": 45.0, "value_type": "number" }
      },
      "criterion_expect": {
        "pathway": "LMIA_HIGH_WAGE",
        "code": "NOC_PRESENT",
        "outcome": "unknown"
      }
    }
  ]
}
