{
  "ok": true,
  "engine_version": "impact-v1.1.0",
  "note": "Published cases with expected results derived by hand from the cited bylaws. Run one with /api/v1/verification/run?case=ID (free, no credits, published cases only).",
  "cases": [
    {
      "id": "MV-A1",
      "title": "In-stream BP application, permit pending, no written agreement: keeps the old 2026 rates",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "10",
        "application_submitted_on": "2026-05-15",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-11-30",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_protected_no_agreement",
        "determination": "VERIFIED",
        "amount_cad": 178730,
        "comparison_total_cad": 133920,
        "difference_cad": 44810,
        "in_stream_status": "VERIFIED",
        "reduction_auto_applied": false,
        "flags_include": [
          "U5"
        ]
      },
      "derivation": "Old 2026 (Bylaw 260 / 371 / 1369): 10 x (10,495 + 6,772 + 606) = 10 x 17,873 = 178,730. Amended 2026 (270 / 396 / 1452): 10 x (6,791 + 6,298 + 303) = 133,920. Difference 44,810.",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E3",
        "E6",
        "E8",
        "E12"
      ]
    },
    {
      "id": "MV-A2",
      "title": "Same in-stream application with written agreement: amended reduced rates",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "10",
        "application_submitted_on": "2026-05-15",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-11-30",
        "written_agreement": "yes"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_opted_in",
        "determination": "VERIFIED",
        "amount_cad": 133920,
        "comparison_total_cad": 178730,
        "difference_cad": -44810,
        "reduction_auto_applied": false
      },
      "derivation": "10 x (6,791 + 6,298 + 303) = 133,920 (LGA s.568(3) written agreement).",
      "sources": [
        "E3",
        "E6",
        "E8",
        "E12"
      ]
    },
    {
      "id": "MV-A3",
      "title": "Same in-stream application, agreement undecided: both amounts, no automatic choice",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "10",
        "application_submitted_on": "2026-05-15",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-11-30"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_agreement_undecided",
        "determination": "CONDITIONAL",
        "amount_cad": null,
        "candidate_totals": [
          178730,
          133920
        ],
        "candidate_difference_cad": 44810,
        "reduction_auto_applied": false
      },
      "derivation": "Candidates 178,730 (no agreement) and 133,920 (agreement), as in MV-A1/MV-A2.",
      "sources": [
        "E2",
        "E3",
        "E4",
        "E6",
        "E7",
        "E8"
      ]
    },
    {
      "id": "MV-B1",
      "title": "Permit issued before 2026-07-24: old rates, no rebate",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "FSA",
        "approval_type": "building_permit",
        "development_type": "residential_lot",
        "units": "1",
        "application_submitted_on": "2026-03-01",
        "permit_status": "issued",
        "permit_issued_on": "2026-06-30"
      },
      "expected": {
        "ok": true,
        "scenario": "issued_before_amendment",
        "determination": "VERIFIED",
        "amount_cad": 30218,
        "comparison_total_cad": 22886,
        "difference_cad": 7332,
        "comparison_available": false
      },
      "derivation": "2026 rates (260 / 371 / 1369), FSA RLDU: 16,926 + 12,311 + 981 = 30,218. Amended: 10,952 + 11,443 + 491 = 22,886 (not available: no rebates).",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E9"
      ]
    },
    {
      "id": "MV-C1",
      "title": "Application submitted after 2026-07-24 (mixed use): amended rates; water below $50k instalment threshold",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "NSSA",
        "approval_type": "building_permit",
        "development": [
          {
            "type": "townhouse",
            "units": 4
          },
          {
            "type": "non_residential",
            "floor_area_sq_ft": 2000
          }
        ],
        "application_submitted_on": "2026-08-10",
        "permit_status": "issued",
        "permit_issued_on": "2026-10-01"
      },
      "expected": {
        "ok": true,
        "scenario": "regular_application",
        "determination": "VERIFIED",
        "amount_cad": 98188,
        "comparison_total_cad": 131072,
        "difference_cad": -32884,
        "charges": {
          "water": 49956,
          "liquid_waste": 45984,
          "parkland": 2248
        },
        "instalment_eligible": {
          "water": false,
          "liquid_waste": false,
          "parkland": false
        }
      },
      "derivation": "Water 4 x 9,839 + 2,000 x 5.30 = 39,356 + 10,600 = 49,956. Liquid waste NSSA 4 x 8,996 + 2,000 x 5.00 = 35,984 + 10,000 = 45,984. Parks 4 x 442 + 2,000 x 0.24 = 1,768 + 480 = 2,248. Total 98,188. Old 2026: 4 x (15,206 + 9,658 + 884) + 2,000 x (8.19 + 5.37 + 0.48) = 102,992 + 28,080 = 131,072.",
      "sources": [
        "E3",
        "E6",
        "E8",
        "E2",
        "E4",
        "E7",
        "E11",
        "E13"
      ]
    },
    {
      "id": "MV-D1",
      "title": "Missing sewerage area: no inference, explicit missing input",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "municipality": "Burnaby",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "5",
        "permit_status": "pending",
        "permit_expected_on": "2026-12-01"
      },
      "expected": {
        "ok": false,
        "status": "missing_required_input",
        "missing_fields_include": [
          "sewerage_area"
        ]
      },
      "derivation": "Sewerage area is a required input (U5).",
      "sources": [
        "E5"
      ]
    },
    {
      "id": "MV-D2",
      "title": "Contradiction: pending permit with an issue date",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "5",
        "permit_status": "pending",
        "permit_issued_on": "2026-09-01",
        "permit_expected_on": "2026-12-01"
      },
      "expected": {
        "ok": false,
        "status": "invalid_input",
        "error_fields_include": [
          "permit_issued_on"
        ]
      },
      "derivation": "permit_status=pending contradicts permit_issued_on.",
      "sources": []
    },
    {
      "id": "MV-D3",
      "title": "Contradiction: application submitted after the permit was issued; floor area on a residential line",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development": [
          {
            "type": "apartment",
            "units": 3,
            "floor_area_sq_ft": 900
          }
        ],
        "application_submitted_on": "2026-10-01",
        "permit_status": "issued",
        "permit_issued_on": "2026-09-01"
      },
      "expected": {
        "ok": false,
        "status": "invalid_input",
        "error_fields_include": [
          "application_submitted_on",
          "development[0].floor_area"
        ]
      },
      "derivation": "Submission after issue date is impossible; apartments are charged per unit.",
      "sources": [
        "E1"
      ]
    },
    {
      "id": "MV-E1",
      "title": "Boundary: submitted 2026-07-23 (in-stream), no agreement: old 2026 rates; LIWSA component sum 14,907 (web page shows 14,906)",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "LIWSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "1",
        "application_submitted_on": "2026-07-23",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-12-15",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_protected_no_agreement",
        "determination": "VERIFIED",
        "amount_cad": 14907,
        "comparison_total_cad": 10610,
        "difference_cad": 4297
      },
      "derivation": "10,495 + 3,806 + 606 = 14,907 (Metro page total 14,906 is $1 low). Amended: 6,791 + 3,516 + 303 = 10,610.",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E3",
        "E6",
        "E8",
        "E9"
      ]
    },
    {
      "id": "MV-E2",
      "title": "Boundary: submitted on 2026-07-24 itself: UNRESOLVED U6, both amounts",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "LIWSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "1",
        "application_submitted_on": "2026-07-24",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-12-15",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "determination": "UNRESOLVED",
        "amount_cad": null,
        "flags_include": [
          "U6"
        ],
        "candidate_totals_include": [
          14907,
          10610
        ]
      },
      "derivation": "Old 14,907 vs amended 10,610 as in MV-E1; the page says \"before July 24\", the guide says \"by July 24\".",
      "sources": [
        "E9",
        "E10",
        "E12"
      ]
    },
    {
      "id": "MV-E3",
      "title": "Boundary: protected permit expected 2027-07-24 (12 months later): UNRESOLVED U1 and U2",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "LIWSA",
        "approval_type": "building_permit",
        "development_type": "apartment",
        "units": "1",
        "application_submitted_on": "2026-05-01",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2027-07-24",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "determination": "UNRESOLVED",
        "amount_cad": null,
        "flags_include": [
          "U1",
          "U2"
        ],
        "candidate_totals_include": [
          17663,
          14907,
          14296
        ]
      },
      "derivation": "Strict reading, superseded 2027 (260/371/1369): 12,223 + 4,241 + 1,199 = 17,663. Metro reading, rate at submission (2026): 14,907. If not protected, amended 2027: 9,630 + 3,903 + 763 = 14,296.",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E3",
        "E6",
        "E8",
        "E9",
        "E10"
      ]
    },
    {
      "id": "MV-E4",
      "title": "Boundary: permit issued on 2026-07-24: UNRESOLVED U4",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "residential_lot",
        "units": "1",
        "application_submitted_on": "2026-06-01",
        "permit_status": "issued",
        "permit_issued_on": "2026-07-24"
      },
      "expected": {
        "ok": true,
        "scenario": "issued_on_amendment_day",
        "determination": "UNRESOLVED",
        "amount_cad": null,
        "flags_include": [
          "U4"
        ],
        "candidate_totals_include": [
          21941,
          29197
        ]
      },
      "derivation": "Amended VSA RLDU 10,952 + 10,498 + 491 = 21,941; old 2026: 16,926 + 11,290 + 981 = 29,197 (Metro page shows 29,196).",
      "sources": [
        "E2",
        "E3",
        "E4",
        "E6",
        "E7",
        "E8"
      ]
    },
    {
      "id": "MV-F1",
      "title": "In-stream non-residential, no agreement: does not get the reduction; instalment test per charge",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "FSA",
        "approval_type": "building_permit",
        "development_type": "non_residential",
        "floor_area_sq_ft": "10000",
        "application_submitted_on": "2026-04-20",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "development_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "bp_within_precursor_area": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-12-01",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_protected_no_agreement",
        "determination": "VERIFIED",
        "amount_cad": 144900,
        "comparison_total_cad": 109500,
        "difference_cad": 35400,
        "charges": {
          "water": 81900,
          "liquid_waste": 58200,
          "parkland": 4800
        },
        "instalment_eligible": {
          "water": true,
          "liquid_waste": true,
          "parkland": false
        }
      },
      "derivation": "10,000 x 8.19 = 81,900; 10,000 x 5.82 = 58,200; 10,000 x 0.48 = 4,800; total 144,900. Amended: 10,000 x (5.30 + 5.41 + 0.24) = 109,500.",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E3",
        "E6",
        "E8",
        "E13",
        "E11"
      ]
    },
    {
      "id": "MV-F2",
      "title": "In-stream subdivision (s.511), no agreement: old 2026 rates",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "subdivision",
        "development_type": "residential_lot",
        "units": "3",
        "application_submitted_on": "2026-04-01",
        "application_complete_and_fees_paid": "yes",
        "precursor_type": "subdivision",
        "permit_status": "pending",
        "permit_expected_on": "2026-10-30",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "scenario": "in_stream_protected_no_agreement",
        "determination": "VERIFIED",
        "amount_cad": 87591,
        "comparison_total_cad": 65823,
        "difference_cad": 21768
      },
      "derivation": "3 x (16,926 + 11,290 + 981) = 3 x 29,197 = 87,591. Amended 3 x 21,941 = 65,823.",
      "sources": [
        "E2",
        "E4",
        "E7",
        "E3",
        "E6",
        "E8",
        "E12"
      ]
    },
    {
      "id": "MV-F3",
      "title": "Submitted before 2026-07-24 but fees not paid: not in-stream, amended rates",
      "kind": "impact",
      "endpoint": "/api/v1/impact/check",
      "input": {
        "sewerage_area": "VSA",
        "approval_type": "building_permit",
        "development_type": "residential_lot",
        "units": "1",
        "application_submitted_on": "2026-06-01",
        "application_complete_and_fees_paid": "no",
        "precursor_type": "building_permit",
        "precursor_in_stream_on_2026_07_24": "yes",
        "permit_status": "pending",
        "permit_expected_on": "2026-11-15",
        "written_agreement": "no"
      },
      "expected": {
        "ok": true,
        "scenario": "not_in_stream",
        "determination": "VERIFIED",
        "amount_cad": 21941,
        "in_stream_status": "NOT_ELIGIBLE"
      },
      "derivation": "s.568(1) precursor needs fees paid. Amended VSA RLDU 21,941.",
      "sources": [
        "E12",
        "E3",
        "E6",
        "E8"
      ]
    },
    {
      "id": "VIC-1",
      "title": "Victoria DCC, commercial 500 m2, current bylaw 26-054",
      "kind": "calculate",
      "endpoint": "/api/v1/calculate",
      "input": {
        "fee": "victoria-dcc-commercial",
        "area_sq_m": "500"
      },
      "expected": {
        "ok": true,
        "amount_cad": 46565
      },
      "derivation": "500 x $93.13 per m2 (City of Victoria DCC Bylaw 26-054) = 46,565.",
      "sources": [
        "City of Victoria DCC Bylaw 26-054 (catalog source_url)"
      ]
    },
    {
      "id": "VIC-2",
      "title": "Victoria DCC, commercial 500 m2, as_of 2025-06-01 (bylaw 24-053)",
      "kind": "calculate",
      "endpoint": "/api/v1/calculate",
      "input": {
        "fee": "victoria-dcc-commercial",
        "area_sq_m": "500",
        "as_of": "2025-06-01"
      },
      "expected": {
        "ok": true,
        "amount_cad": 45515
      },
      "derivation": "500 x $91.03 per m2 (Bylaw 24-053) = 45,515.",
      "sources": [
        "City of Victoria DCC Bylaw 24-053 (catalog source_url)"
      ]
    },
    {
      "id": "VIC-3",
      "title": "Victoria DCC, house with secondary suite (s.4(c) exemption)",
      "kind": "calculate",
      "endpoint": "/api/v1/calculate",
      "input": {
        "fee": "victoria-dcc-low-density",
        "dwelling_units": "2",
        "charge_trigger": "building_permit",
        "total_self_contained_units": "2"
      },
      "expected": {
        "ok": true,
        "amount_cad": 0,
        "amount_before_exemption_cad": 50299.82
      },
      "derivation": "Bylaw 26-054 s.4(c): no DCC at building permit for fewer than 4 self-contained dwelling units. Before the exemption: 2 x 25,149.91 = 50,299.82.",
      "sources": [
        "City of Victoria DCC Bylaw 26-054 s.4(c)"
      ]
    }
  ]
}