Beemer
Deploy: the 2026-09-21 code audit and its three verification rounds -- the quantity and relief allowlists, the five Canadian outcome readings, the IRPR s. 17 clock, the retrieval fixes and the performance work (approved_code 82525e1; curated baseline c32bd27 unchanged)
901bf8c Download tests/data/record_cases.json from Beemer0/CanLex: direct link, hf CLI and curl.
- Browser
- Download file 56 kB
-
https://huggingface.co/spaces/Beemer0/CanLex/resolve/main/tests/data/record_cases.json
- Command line
-
hf download hf://spaces/Beemer0/CanLex/tests/data/record_cases.json
-
curl -L -o record_cases.json https://huggingface.co/spaces/Beemer0/CanLex/resolve/main/tests/data/record_cases.json
56 kB
| { | |
| "_header": "EXPECTED VALUES PENDING THE MAINTAINER'S SIGN-OFF. Hand-worked records for IRPR s. 18(2)(a)-(c), s. 18.1 and s. 17 limb by limb (roadmap T2.3), drafted 2026-09-12 by track A step A8 from the corpus text of SOR-2002-227-s17, -s18-p1, -s18-p2, -s18-p3 and -s18.1; nothing in this file is approved legal content. Each case's 'working' line shows the arithmetic; there is no in-test oracle (roadmap: an oracle by the same author cannot catch the same misreading). Two readings are NOT settled (roadmap DECISIONS (a), (b)): whether a hybrid equivalent is also a 'summary conviction offence' in (iv)/(vi) (hybrid_reading 'indictable' | 'summary'), and whether 'within / before the last N years' reads the conviction date or the offence date (anchor). A conviction leaves 'the last N years' on the day N years have elapsed since the day after it (W(d, N) below), the day-after convention of the s. 18(2) clocks. Engine cases call rehab.assess_record; tool cases call canlex_screen_history (and are skipped when the curated pairings they need are absent).", | |
| "_format": { | |
| "engine": "record: assess_record entries (n, jurisdiction, kind, class/classes, max_years, offence_date, conviction_date, completed, ...); args: today, status, hybrid_reading, anchor", | |
| "tool": "entries: canlex_screen_history entries; args: its other parameters; requires: as tests/data/screening_cases.json", | |
| "expect": "[{field: dotted path, eq|ne|in|contains}] | [{limb: '(a) vi' | '18.1 (1) solely', status, entries?, from?, until?, never?, exact?, reading?: 1-based}] | [{readings: [statuses in order]}] | [{needs: [[fact, entry], ...]}] | [{dates_differ: [earliest_deemed, ...]}] | [{text: all, contains|absent}] (tool)", | |
| "working": "the hand arithmetic behind the expected values" | |
| }, | |
| "cases": [ | |
| { | |
| "id": "h1-reading-hybrid-indictable-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "completed": "2006-03-01"}, | |
| {"n": 2, "class": "summary-only", "completed": "2004-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2016-03-02"}, | |
| {"field": "earliest_apply", "eq": "2011-03-01"}, | |
| {"limb": "(a) chapeau", "status": "pass", "entries": [1]}, | |
| {"limb": "(a) ii", "status": "pass", "from": "2016-03-02"}, | |
| {"limb": "(a) v", "status": "pass"}, | |
| {"limb": "(a) vi", "status": "pass"}], | |
| "working": "H1 (roadmap T2.3; law-6). (a) chapeau: one indictable-equivalent conviction (#1). (ii) W(2006-03-01, 10) = 2016-03-02. (v): both convictions are before 2006-03-01 at the latest, so out of the last 10 years by 2016-03-02. (vi) reading 'indictable': only #2 is a summary conviction offence -- one is allowed. Deemed from 2016-03-02. s. 17: 2006-03-01 + 5 = 2011-03-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a) chapeau and (i)-(vii)"}, {"id": "SOR-2002-227-s17", "why": "five years after completion"}] | |
| }, | |
| { | |
| "id": "h1-reading-hybrid-also-summary-not-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "completed": "2006-03-01"}, | |
| {"n": 2, "class": "summary-only", "completed": "2004-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "summary", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "earliest_apply", "eq": "2011-03-01"}, | |
| {"limb": "(a) vi", "status": "fail", "entries": [1, 2]}], | |
| "working": "H1 on the other reading: the hybrid assault (#1) also counts as a summary conviction offence in (vi), so two such convictions are before the last 10 years -- (vi) fails and deemed rehabilitation is not available. s. 17 still gives 2011-03-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vi) 'more than one offence that ... would constitute a summary conviction offence'"}, {"id": "I-2.5-s36-p2", "why": "s. 36(3)(a) deems hybrids indictable for 'subsections (1) to (2.1)' of the Act only"}] | |
| }, | |
| { | |
| "id": "h1-both-readings-not-settled", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "completed": "2006-03-01"}, | |
| {"n": 2, "class": "summary-only", "completed": "2004-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["deemed-rehabilitated", "eligible-to-apply"]}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "earliest_apply", "eq": "2011-03-01"}, | |
| {"limb": "(a) vi", "status": "pass", "reading": 1}, | |
| {"limb": "(a) vi", "status": "fail", "reading": 2}], | |
| "working": "The hybrid question decides H1 (roadmap DECISION (a)): both readings are reported, none is picked. The anchor question does not decide it (no offence dates; every date is before 2006-03-01).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vi)"}] | |
| }, | |
| { | |
| "id": "h1-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "simple assault", "disposition": "convicted", "state": "NY", "sentence_completed": "2006-03-01"}, | |
| {"offense": "disorderly conduct", "disposition": "convicted", "state": "NY", "sentence_completed": "2004-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:assault-simple", "pairing:disorderly-conduct"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "not-settled"}, | |
| {"field": "earliest_apply", "eq": "2011-03-01"}, | |
| {"field": "s18", "eq": null}, | |
| {"field": "s18_readings.0.status", "eq": "deemed-rehabilitated"}, | |
| {"field": "s18_readings.0.earliest_deemed", "eq": "2016-03-02"}, | |
| {"field": "s18_readings.1.status", "eq": "eligible-to-apply"}, | |
| {"text": "all", "contains": "### Reading 1 --"}, | |
| {"text": "all", "contains": "### Reading 2 --"}, | |
| {"text": "all", "absent": "APPLY CONDITIONAL"}], | |
| "working": "H1 as the officer enters it: simple assault (assault-simple: hybrid, 5 years) and disorderly conduct (summary-only). Was APPLY CONDITIONAL with the 'if every other matter predates this one' hedge; now both readings with their limb tables.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(i)-(vii)"}] | |
| }, | |
| { | |
| "id": "probe4-reading-hybrid-indictable-deemed-by-the-latest-date", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2022-06-02"}, | |
| {"field": "earliest_deemed_exact", "eq": false}, | |
| {"field": "earliest_apply", "eq": "2017-06-01"}, | |
| {"limb": "(a) ii", "status": "pass", "from": "2021-01-02", "entries": [1]}, | |
| {"limb": "(a) v", "status": "pass", "from": "2022-06-02", "exact": false, "entries": [2]}], | |
| "working": "Probe 4 (model-3). (ii) W(2011-01-01, 10) = 2021-01-02 from the DUI (#1), not from the disorderly-conduct completion. (v): #2's conviction is between 2012-05-01 and 2012-06-01, so it leaves the last 10 years between 2022-05-02 and 2022-06-02 -- the date shown is the latest (no conviction_date). Deemed from 2022-06-02 at the latest. s. 17: 2012-06-01 + 5 = 2017-06-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(ii), (v)"}] | |
| }, | |
| { | |
| "id": "probe4-reading-hybrid-also-summary-not-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "summary", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"limb": "(a) vi", "status": "fail", "entries": [1, 2]}], | |
| "working": "(vi) with the hybrid DUI counted as a summary conviction offence: #1 and #2 are both before the last 10 years, so (vi) stops holding when the second leaves the window (by 2022-06-02), the day (v) starts holding -- the two never hold together.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v), (vi)"}] | |
| }, | |
| { | |
| "id": "probe4-both-readings-not-settled", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["deemed-rehabilitated", "eligible-to-apply"]}, | |
| {"field": "earliest_apply", "eq": "2017-06-01"}], | |
| "working": "The hybrid reading decides probe 4 as it decides H1.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vi)"}] | |
| }, | |
| { | |
| "id": "probe4-conviction-dates-given-exact", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "conviction_date": "2010-06-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "conviction_date": "2012-05-15", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2022-05-16"}, | |
| {"field": "earliest_deemed_exact", "eq": true}, | |
| {"limb": "(a) v", "from": "2022-05-16", "exact": true}], | |
| "working": "With the conviction dates: (v) W(2012-05-15, 10) = 2022-05-16, later than (ii) 2021-01-02.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v) 'has not within the last 10 years been convicted'"}] | |
| }, | |
| { | |
| "id": "probe4-anchor-offence-date", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "conviction_date": "2010-06-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "conviction_date": "2012-05-15", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "offence"}, | |
| "expect": [ | |
| {"field": "earliest_deemed", "eq": "2022-05-02"}, | |
| {"limb": "(a) v", "from": "2022-05-02"}], | |
| "working": "The other anchor (roadmap DECISION (b)): (v) read on the offence date, W(2012-05-01, 10) = 2022-05-02.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}] | |
| }, | |
| { | |
| "id": "probe4-anchor-open-dates-differ-status-same", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01", "conviction_date": "2010-06-01", "completed": "2011-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2012-05-01", "conviction_date": "2012-05-15", "completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2022-05-16"}, | |
| {"dates_differ": ["2022-05-02"]}], | |
| "working": "Both anchors give deemed rehabilitation today, so the status is settled; the dates differ (2022-05-16 on the conviction date, 2022-05-02 on the offence date) and both are reported.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}] | |
| }, | |
| { | |
| "id": "probe4-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "DUI", "disposition": "convicted", "state": "TX", "offence_date": "2010-01-01", "sentence_completed": "2011-01-01"}, | |
| {"offense": "disorderly conduct", "disposition": "pled guilty", "state": "TX", "offence_date": "2012-05-01", "sentence_completed": "2012-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:dui", "pairing:disorderly-conduct"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "not-settled"}, | |
| {"field": "earliest_apply", "eq": "2017-06-01"}, | |
| {"field": "s18_readings.0.earliest_deemed", "eq": "2022-06-02"}, | |
| {"text": "all", "contains": "at least 10 years have elapsed since the day after the completion of the imposed sentence | yes | #1 | from 2021-01-02 |"}], | |
| "working": "Probe 4 as entered: DUI 2010 (5 years at commission, hybrid) and disorderly conduct 2012. Was APPLY CONDITIONAL with the deeming clock run from the disorderly-conduct completion; now (ii) runs from the DUI and (v) from the disorderly-conduct conviction.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(ii), (v), (vi)"}] | |
| }, | |
| { | |
| "id": "run-g-pr-no-paragraph-s17-from-latest", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "indictable-only", "max_years": 99, "offence_date": "2012-01-01", "completed": "2014-01-01"}, | |
| {"n": 2, "class": "hybrid", "max_years": 5, "offence_date": "2016-01-01", "completed": "2017-01-01"}], | |
| "args": {"today": "2026-09-10", "status": "permanent-resident"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_apply", "eq": "2022-01-01"}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "s17.entry", "eq": 2}, | |
| {"field": "paragraphs", "eq": []}], | |
| "working": "Run G (T1.9). Two indictable-equivalent convictions: no s. 18(2) paragraph can apply ((a) allows no more than one; (b) summary only). s. 17 runs from the later conviction: 2017-01-01 + 5 = 2022-01-01.", | |
| "sources": [{"id": "SOR-2002-227-s17", "why": "'if the person has not been convicted of a subsequent offence'"}] | |
| }, | |
| { | |
| "id": "run-g-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "robbery", "disposition": "convicted", "state": "TX", "offence_date": "2012-01-01", "sentence_completed": "2014-01-01"}, | |
| {"offense": "simple assault", "disposition": "convicted", "state": "TX", "offence_date": "2016-01-01", "sentence_completed": "2017-01-01"}], | |
| "args": {"status": "permanent-resident", "today": "2026-09-10"}, | |
| "requires": ["pairing:robbery", "pairing:assault-simple"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_apply", "eq": "2022-01-01"}, | |
| {"field": "s17_clock_entry", "eq": 2}, | |
| {"field": "s18", "eq": []}, | |
| {"text": "all", "contains": "No IRPR s. 18(2) paragraph can apply to this record"}], | |
| "working": "Run G through the tool.", | |
| "sources": [{"id": "SOR-2002-227-s17", "why": "the later conviction restarts the five years"}] | |
| }, | |
| { | |
| "id": "vi-failure-two-old-summary-convictions", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2008-01-01", "completed": "2008-06-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2001-01-01", "completed": "2001-02-01"}, | |
| {"n": 3, "class": "summary-only", "conviction_date": "2003-03-01", "completed": "2003-04-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "earliest_apply", "eq": "2013-06-01"}, | |
| {"limb": "(a) vi", "status": "fail", "entries": [2, 3], "until": "2013-03-02"}, | |
| {"limb": "(a) ii", "status": "pass", "from": "2018-06-02"}, | |
| {"limb": "(b) chapeau", "status": "pass"}, | |
| {"limb": "(b) vi", "status": "fail", "entries": [1], "never": true}], | |
| "working": "(vi): two pure summary convictions (#2, #3) are before the last 10 years from W(2003-03-01, 10) = 2013-03-02 on, so (vi) held only until then; (ii) starts 2018-06-02, after (vi) stopped -- never deemed under (a). (b) cannot apply either: (b)(vi) excludes any indictable-equivalent conviction (#1). s. 17: 2008-06-01 + 5 = 2013-06-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vi)"}, {"id": "SOR-2002-227-s18-p2", "why": "(b)(vi)"}] | |
| }, | |
| { | |
| "id": "vi-failure-holds-on-both-readings", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2008-01-01", "completed": "2008-06-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2001-01-01", "completed": "2001-02-01"}, | |
| {"n": 3, "class": "summary-only", "conviction_date": "2003-03-01", "completed": "2003-04-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "readings", "eq": null}], | |
| "working": "The hybrid question does not decide this record: (vi) fails with or without #1, so no reading is reported.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vi)"}] | |
| }, | |
| { | |
| "id": "undated-later-conviction-date-decides-v", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2005-01-01", "completed": "2006-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2015-01-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"limb": "(a) v", "status": "unknown"}, | |
| {"needs": [["conviction_date", 2]]}, | |
| {"field": "s17.undated", "eq": [2]}], | |
| "working": "#2 has no conviction or completion date: its conviction is between 2015-01-01 (the offence) and today. Convicted by 2016-09-11 it left the last 10 years (W < today) and (v) holds; convicted later it has not. The date decides -- UNKNOWN: give conviction_date. The s. 17 date is open too (s17.undated; the tool settles it).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}, {"id": "SOR-2002-227-s17", "why": "a subsequent conviction with no completion date"}] | |
| }, | |
| { | |
| "id": "undated-later-conviction-inside-the-window", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2005-01-01", "completed": "2006-01-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2019-03-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"limb": "(a) v", "status": "fail", "entries": [2]}, | |
| {"field": "earliest_deemed_exact", "eq": false}, | |
| {"field": "s17.undated", "eq": [2]}], | |
| "working": "#2 was convicted on or after 2019-03-01, so it is within the last 10 years today whatever the date: (v) fails (settled). The date it leaves the window is open (from W(2019-03-01, 10) = 2029-03-02 at the earliest).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}] | |
| }, | |
| { | |
| "id": "undated-later-conviction-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "simple assault", "disposition": "convicted", "state": "NY", "offence_date": "2005-01-01", "sentence_completed": "2006-01-01"}, | |
| {"offense": "disorderly conduct", "disposition": "convicted", "state": "NY", "offence_date": "2019-03-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:assault-simple", "pairing:disorderly-conduct"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "undetermined"}, | |
| {"field": "earliest_apply", "eq": null}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "earliest_apply_not_before", "eq": "2024-03-01"}, | |
| {"text": "all", "contains": "Give sentence_completed for #2"}], | |
| "working": "The undated later conviction leaves the s. 17 date open (not before 2019-03-01 + 5 = 2024-03-01) and (v) fails on it, so deemed rehabilitation is not affirmed either.", | |
| "sources": [{"id": "SOR-2002-227-s17", "why": "'if the person has not been convicted of a subsequent offence'"}, {"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-conviction-fails-iii", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2008-01-01", "completed": "2009-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "offence_date": "2015-01-01", "completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_apply", "eq": "2021-01-01"}, | |
| {"limb": "(a) iii", "status": "fail", "entries": [2], "never": true}], | |
| "working": "(iii): 'not been convicted in Canada of an indictable offence' -- on the reading that IRPA s. 36(3)(a) reaches s. 18(2), a hybrid is indictable for (iii) however it was prosecuted. s. 17 runs from the Canadian completion: 2016-01-01 + 5 = 2021-01-01. (Audit 2026-09-12: this case was first worked as 'on both readings'; the other reading is the next case.)", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii)"}, {"id": "I-2.5-s36-p2", "why": "s. 36(3)(a) 'even if it has been prosecuted summarily'"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-election-open-both-readings", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2008-01-01", "completed": "2009-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "offence_date": "2015-01-01", "completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["eligible-to-apply", "undetermined"]}, | |
| {"field": "earliest_apply", "eq": "2021-01-01"}, | |
| {"needs": [["canada_prosecuted", 2]]}, | |
| {"limb": "(a) iii", "status": "fail", "reading": 1}, | |
| {"limb": "(a) iii", "status": "unknown", "reading": 2}], | |
| "working": "Roadmap DECISION (a), Canadian side (audit 2026-09-12). Reading 'indictable' (s. 36(3)(a) read into s. 18(2)): (iii) fails on #2. Reading 'summary' (s. 36(3)(a) governs only IRPA s. 36): the Interpretation Act applies to the Regulations 'unless a contrary intention appears', and s. 34(1)(c) says a person convicted of a hybrid offence on summary conviction is not 'convicted of an indictable offence' -- so the Crown's election decides. Entered summarily: (iii) holds; #2 is one Canadian summary conviction, out of the last 10 years by W(2016-01-01, 10) = 2026-01-02 at the latest, so (iv) holds; (ii) from W(2009-01-01, 10) = 2019-01-02; (v) and (vi) hold -- deemed. By indictment: (iii) fails. That reading is UNKNOWN: give canada_prosecuted.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii), (iv)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}, {"id": "I-21-s3", "why": "'unless a contrary intention appears'"}, {"id": "I-2.5-s36-p2", "why": "s. 36(3)(a) governs 'subsections (1) to (2.1)'"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-entered-summarily-reading-summary-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2008-01-01", "completed": "2009-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "prosecuted": "summarily", "offence_date": "2015-01-01", "completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "summary", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2026-01-02"}, | |
| {"field": "earliest_deemed_exact", "eq": false}, | |
| {"limb": "(a) iii", "status": "pass"}, | |
| {"limb": "(a) iv", "status": "pass", "entries": [2], "from": "2026-01-02", "exact": false}], | |
| "working": "Reading 'summary', #2 entered on summary conviction (I-21 s. 34(1)(c)): (iii) holds; (iv) one Canadian summary conviction, convicted between 2015-01-01 and 2016-01-01, leaves the last 10 years by W(2016-01-01, 10) = 2026-01-02 at the latest. Deemed from 2026-01-02 at the latest (give conviction_date to fix it).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii), (iv)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-entered-summarily-still-not-settled", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2008-01-01", "completed": "2009-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "prosecuted": "summarily", "offence_date": "2015-01-01", "completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["eligible-to-apply", "deemed-rehabilitated"]}], | |
| "working": "With the election given the fact is settled, but the reading is not: on 'indictable' (iii) still fails, on 'summary' every limb holds. Both readings are reported (roadmap DECISION (a)).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-by-indictment-fails-iii-on-both-readings", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "offence_date": "2008-01-01", "completed": "2009-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "prosecuted": "indictment", "offence_date": "2015-01-01", "completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "readings", "eq": null}, | |
| {"field": "earliest_apply", "eq": "2021-01-01"}, | |
| {"limb": "(a) iii", "status": "fail", "entries": [2], "never": true}], | |
| "working": "Prosecuted by indictment, #2 is a conviction of an indictable offence on every reading (s. 34(1)(c) does not reach it): (iii) fails, and the answer is settled. s. 17: 2016-01-01 + 5 = 2021-01-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii)"}, {"id": "I-21-s34", "why": "s. 34(1)(c) reaches only a conviction 'on summary conviction'"}] | |
| }, | |
| { | |
| "id": "paragraph-b-canadian-hybrid-entered-summarily", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "summary-only", "offence_date": "2012-01-01", "conviction_date": "2012-06-01", "completed": "2012-06-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2013-01-01", "conviction_date": "2013-06-01", "completed": "2013-06-01"}, | |
| {"n": 3, "jurisdiction": "canada", "class": "hybrid", "prosecuted": "summarily", "offence_date": "2014-01-01", "conviction_date": "2014-03-01", "completed": "2014-03-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["eligible-to-apply", "deemed-rehabilitated"]}, | |
| {"field": "earliest_apply", "eq": "2019-03-01"}, | |
| {"limb": "(b) ii", "status": "fail", "entries": [3], "reading": 1}, | |
| {"limb": "(b) ii", "status": "pass", "reading": 2}, | |
| {"limb": "(b) v", "status": "pass", "reading": 2}], | |
| "working": "(b)(ii) 'has not been convicted in Canada of an indictable offence': on 'indictable' #3 fails it; on 'summary' #3 was entered on summary conviction (I-21 s. 34(1)(c)), so (ii) holds and #3 is one Canadian summary conviction for (v). (i) W(2013-06-01, 5) = 2018-06-02; (iii) W(2014-03-01, 5) = 2019-03-02 -- deemed on that reading. s. 17 from #3: 2014-03-01 + 5 = 2019-03-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p2", "why": "(b)(i)-(v)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}] | |
| }, | |
| { | |
| "id": "permanent-resident-maximum-unknown-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": null, "completed": "2010-01-01"}], | |
| "args": {"today": "2026-09-12", "status": "permanent-resident"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"needs": [["maximum", 1]]}], | |
| "working": "A permanent resident is inadmissible only under s. 36(1) (a Canadian maximum of 10 years or more). With the maximum unknown that is open (audit 2026-09-12: was 'not-inadmissible-pr').", | |
| "sources": [{"id": "I-2.5-s36-p1", "why": "s. 36(1)(b); s. 36(2) 'A foreign national'"}] | |
| }, | |
| { | |
| "id": "permanent-resident-unresolved-entry-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "completed": "2010-01-01"}], | |
| "args": {"today": "2026-09-12", "status": "permanent-resident"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"needs": [["equivalent", 1]]}], | |
| "working": "The equivalent of #1 is not resolved, so whether it carries a 10-year maximum is open (audit 2026-09-12: was 'not-inadmissible-pr').", | |
| "sources": [{"id": "I-2.5-s36-p1", "why": "s. 36(1)(b)"}] | |
| }, | |
| { | |
| "id": "two-summary-convictions-one-occurrence-nothing-to-rehabilitate", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01", "occurrence": "a"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01", "occurrence": "a"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": null}], | |
| "working": "IRPA s. 36(2)(b) counts two offences only if 'not arising out of a single occurrence'; the same occurrence group means one occurrence, so there is no ground and nothing to rehabilitate (audit 2026-09-12: the engine said deemed under (b); canlex_screen_history already said so).", | |
| "sources": [{"id": "I-2.5-s36-p1", "why": "'not arising out of a single occurrence'"}] | |
| }, | |
| { | |
| "id": "two-summary-convictions-occurrence-open-asked", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "summary-only", "offence_date": "2023-01-01", "completed": "2023-06-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2023-01-01", "completed": "2023-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-yet"}, | |
| {"field": "earliest_deemed", "eq": "2028-06-02"}, | |
| {"field": "earliest_apply", "eq": "2028-06-01"}, | |
| {"needs": [["occurrence_group", 1], ["occurrence_group", 2]]}], | |
| "working": "Same offence date, no occurrence group: on separate occurrences (b)(i) holds from W(2023-06-01, 5) = 2028-06-02 and s. 17 gives 2023-06-01 + 5 = 2028-06-01; on one occurrence there is no ground. The occurrence is asked.", | |
| "sources": [{"id": "SOR-2002-227-s18-p2", "why": "(b)(i)"}, {"id": "I-2.5-s36-p1", "why": "'not arising out of a single occurrence'"}] | |
| }, | |
| { | |
| "id": "foreign-youth-disposition-excepted-in-v-and-flagged", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "class": "youth", "youth_class": "summary-only", "conviction_date": "2020-01-01", "completed": "2020-01-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2015-01-02"}, | |
| {"limb": "(a) v", "status": "pass"}, | |
| {"field": "warnings.0", "contains": "foreign youth disposition"}], | |
| "working": "(a)(v) excepts 'an offence under the Youth Criminal Justice Act'; a foreign youth disposition within the last 10 years is read as excepted by analogy -- not literal, so the answer now says so (audit 2026-09-12). (vi) has no exception, but #2 is the only summary-type conviction. Deemed from W(2005-01-01, 10) = 2015-01-02.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v) exception"}] | |
| }, | |
| { | |
| "id": "canadian-single-old-summary-conviction-iv-holds", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "conviction_date": "2010-05-01", "completed": "2010-05-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2020-05-02"}, | |
| {"limb": "(a) iv", "status": "pass", "from": "2020-05-02", "entries": [2]}], | |
| "working": "(iv) allows one Canadian summary conviction before the last 10 years: W(2010-05-01, 10) = 2020-05-02, later than (ii) W(2005-01-01, 10) = 2015-01-02.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iv)"}] | |
| }, | |
| { | |
| "id": "canadian-summary-conviction-within-ten-years-iv-waits", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "conviction_date": "2018-05-01", "completed": "2018-05-01"}], | |
| "args": {"today": "2026-09-12", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": "2028-05-02"}, | |
| {"field": "earliest_apply", "eq": "2023-05-01"}, | |
| {"limb": "(a) iv", "status": "fail", "from": "2028-05-02"}], | |
| "working": "(iv): the Canadian summary conviction is within the last 10 years until W(2018-05-01, 10) = 2028-05-02; deemed from then if nothing is added. s. 17 from the Canadian completion: 2023-05-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iv)"}] | |
| }, | |
| { | |
| "id": "two-canadian-summary-convictions-iv-never-and-not-solely", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "1999-06-01", "completed": "2000-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01"}, | |
| {"n": 3, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2016-01-01", "completed": "2016-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_apply", "eq": "2021-06-01"}, | |
| {"limb": "(a) iv", "status": "fail", "entries": [2, 3], "never": true}, | |
| {"limb": "18.1 (1) two offences", "status": "pass"}, | |
| {"limb": "18.1 (1) solely", "status": "fail", "entries": [1]}, | |
| {"field": "s18_1.outcome", "eq": "not-deemed"}], | |
| "working": "(iv) with two Canadian summary convictions: one is within the last 10 years, or two are before them -- it never holds. s. 18.1: 'inadmissible solely on the basis of' the Canadian convictions fails, because the foreign assault (#1) is itself a ground and cannot be deemed rehabilitated on this record.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iv)"}, {"id": "SOR-2002-227-s18.1", "why": "'inadmissible solely on the basis of'"}] | |
| }, | |
| { | |
| "id": "two-canadian-summary-convictions-s18-1-exempt", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2016-01-01", "completed": "2016-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": null}, | |
| {"field": "s18_1.outcome", "eq": "deemed"}, | |
| {"field": "s18_1.deemed_on", "eq": "2021-06-02"}, | |
| {"limb": "18.1 (1) solely", "status": "pass"}, | |
| {"limb": "18.1 (2) five years", "status": "pass", "from": "2021-06-02"}], | |
| "working": "s. 18.1: a foreign national, two summary-only Canadian convictions on different dates, nothing else on the record; W(2016-06-01, 5) = 2021-06-02. No foreign matter, so no s. 18(2) answer.", | |
| "sources": [{"id": "SOR-2002-227-s18.1", "why": "(1), (2)"}] | |
| }, | |
| { | |
| "id": "s18-1-same-date-occurrence-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"limb": "18.1 (1) two offences", "status": "unknown"}, | |
| {"field": "s18_1.outcome", "eq": "open"}], | |
| "working": "The same offence date leaves 'not arising out of a single occurrence' (s. 36(2)(a)) open, so whether there are two offences for s. 18.1 is open (occurrence_group settles it).", | |
| "sources": [{"id": "I-2.5-s36-p1", "why": "'not arising out of a single occurrence'"}, {"id": "SOR-2002-227-s18.1", "why": "two or more offences"}] | |
| }, | |
| { | |
| "id": "s18-1-permanent-resident-not-in-the-class", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2015-01-01", "completed": "2015-06-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "offence_date": "2016-01-01", "completed": "2016-06-01"}], | |
| "args": {"today": "2026-09-12", "status": "permanent-resident"}, | |
| "expect": [ | |
| {"limb": "18.1 (1) class", "status": "fail"}, | |
| {"field": "s18_1.outcome", "eq": "not-deemed"}], | |
| "working": "s. 18.1(1) is 'The class of foreign nationals'.", | |
| "sources": [{"id": "SOR-2002-227-s18.1", "why": "'The class of foreign nationals'"}] | |
| }, | |
| { | |
| "id": "record-suspended-canadian-conviction-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "hybrid", "record_suspended": true, "offence_date": "2010-01-01", "completed": "2010-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"limb": "(a) iii", "status": "unknown"}, | |
| {"needs": [["record-suspension", 2]]}], | |
| "working": "Counted, the record-suspended hybrid conviction fails (iii); not counted, every limb holds from 2015-01-02. Whether it counts is not settled in CanLex, so (iii) is UNKNOWN.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii)"}, {"id": "I-2.5-s36-p2", "why": "s. 36(3)(b) record suspension"}] | |
| }, | |
| { | |
| "id": "canadian-offence-mode-not-given-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "conviction_date": "2008-01-01", "completed": "2008-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"needs": [["canada_offence_mode", 2]]}], | |
| "working": "Summary-only, the Canadian conviction is one before the last 10 years (W(2008-01-01, 10) = 2018-01-02) and (iv) holds; hybrid or indictable, (iii) fails. The mode decides.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii), (iv)"}] | |
| }, | |
| { | |
| "id": "unresolved-foreign-entry-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "conviction_date": "2006-01-01", "completed": "2006-02-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"limb": "(a) chapeau", "status": "unknown"}, | |
| {"needs": [["equivalent", 2]]}], | |
| "working": "#2's equivalent is not resolved. No federal equivalent or summary-only: deemed (by 2016-01-02 at the latest). Indictable: two indictable convictions, and (a) cannot apply. The equivalent decides.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a) chapeau, (v), (vi)"}] | |
| }, | |
| { | |
| "id": "later-conviction-with-no-federal-equivalent-ignored-by-v", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "class": "none", "conviction_date": "2024-01-01", "completed": "2024-02-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2015-01-02"}, | |
| {"field": "earliest_apply", "eq": "2029-02-01"}, | |
| {"limb": "(a) v", "status": "pass"}], | |
| "working": "(v) reaches only offences that 'would constitute an offence under an Act of Parliament': #2 has no federal equivalent. It still restarts s. 17 on the literal reading (2024-02-01 + 5), which is moot while deemed rehabilitation holds.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}, {"id": "SOR-2002-227-s17", "why": "subsequent offence"}] | |
| }, | |
| { | |
| "id": "foreign-summary-conviction-within-ten-years-v-waits", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2018-06-01", "completed": "2018-06-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": "2028-06-02"}, | |
| {"field": "earliest_apply", "eq": "2023-06-01"}, | |
| {"limb": "(a) v", "status": "fail", "from": "2028-06-02", "entries": [2]}], | |
| "working": "(v): #2 is within the last 10 years until W(2018-06-01, 10) = 2028-06-02; then deemed if nothing is added. s. 17: 2018-06-01 + 5 = 2023-06-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v)"}] | |
| }, | |
| { | |
| "id": "foreign-summary-within-ten-years-readings-change-only-the-projection", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2018-06-01", "completed": "2018-06-01"}], | |
| "args": {"today": "2026-09-12", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": "2028-06-02"}, | |
| {"dates_differ": [null]}], | |
| "working": "Not deemed today on either hybrid reading, so the status is settled; the projection differs (2028-06-02 on 'indictable'; never on 'summary', where #1 and #2 make two summary-type convictions by the time #2 leaves the window) and is reported. The anchor is pinned to the conviction date here (no offence dates are given; see the next case).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v), (vi)"}] | |
| }, | |
| { | |
| "id": "anchor-reading-decides-when-the-offence-date-is-missing", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "summary-only", "conviction_date": "2018-05-01", "completed": "2018-05-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-settled"}, | |
| {"readings": ["eligible-to-apply", "undetermined"]}, | |
| {"field": "readings.0.earliest_deemed", "eq": "2028-05-02"}, | |
| {"field": "earliest_apply", "eq": "2023-05-01"}, | |
| {"needs": [["offence_date", 2]]}], | |
| "working": "Roadmap DECISION (b). On the conviction date, (iv) holds from W(2018-05-01, 10) = 2028-05-02. On the offence date -- not given, and it can be any date before the conviction -- the Canadian offence may already be out of the last 10 years (an offence in 2016 would leave it on 2026-01-02), so that reading turns on the offence date. Both readings are reported.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iv) 'within the last 10 years'"}] | |
| }, | |
| { | |
| "id": "committed-act-paragraph-c-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "kind": "act", "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2020-01-02"}, | |
| {"field": "earliest_apply", "eq": "2015-01-01"}, | |
| {"limb": "(c) ii", "status": "pass", "from": "2020-01-02"}], | |
| "working": "(c)(ii): W(2010-01-01, 10) = 2020-01-02 from the commission. s. 17(b): five years after committing the offence, 2015-01-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p2", "why": "(c) chapeau"}, {"id": "SOR-2002-227-s18-p3", "why": "(c)(i)-(vii)"}] | |
| }, | |
| { | |
| "id": "committed-act-with-later-summary-conviction-c-v-waits", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "kind": "act", "class": "hybrid", "max_years": 5, "offence_date": "2010-01-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2019-01-01", "completed": "2019-01-01"}], | |
| "args": {"today": "2026-09-12", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": "2029-01-02"}, | |
| {"field": "earliest_apply", "eq": "2024-01-01"}, | |
| {"field": "paragraph", "eq": "IRPR s. 18(2)(c)"}, | |
| {"limb": "(c) v", "status": "fail", "from": "2029-01-02"}], | |
| "working": "The single summary conviction grounds nothing, so the matter is the act: (c). (c)(v): #2 within the last 10 years until W(2019-01-01, 10) = 2029-01-02. s. 17(b): five years after committing the offence 'if the person has not been convicted of a subsequent offence' -- #2 is one, so the five years run from its completion, 2019-01-01 + 5 = 2024-01-01 (the verification fixes of 2026-09-22, LEGAL-7; this line had said a later conviction does not move the act clock, a roadmap decision now withdrawn).", | |
| "sources": [{"id": "SOR-2002-227-s18-p3", "why": "(c)(v)"}] | |
| }, | |
| { | |
| "id": "conviction-plus-committed-act-vii-fails", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "kind": "act", "class": "hybrid", "max_years": 5, "offence_date": "2006-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_apply", "eq": "2011-01-01"}, | |
| {"limb": "(a) vii", "status": "fail", "entries": [2], "never": true}, | |
| {"limb": "(c) vii", "status": "fail", "entries": [1], "never": true}], | |
| "working": "(a)(vii): an act described in s. 36(2)(c) other than the one convicted of (#2). (c)(vii): a foreign indictable-equivalent conviction (#1). s. 17: (a) five years after the completion of #1's sentence (2005-01-01 + 5 = 2010-01-01) and (b) five years 'after committing an offence' for the act #2 (2006-01-01 + 5 = 2011-01-01); both matters must have run, so 2011-01-01 (the G3 fixes of 2026-09-22, S17-1; this line had said 's. 17 from the conviction: 2010-01-01', leaving out the act's own period).", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(vii)"}, {"id": "SOR-2002-227-s18-p3", "why": "(c)(vii)"}, {"id": "SOR-2002-227-s17", "why": "(b) five years after committing an offence, for the act"}] | |
| }, | |
| { | |
| "id": "ten-year-maximum-i-fails", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 10, "conviction_date": "2020-01-01", "completed": "2021-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "eligible-to-apply"}, | |
| {"field": "earliest_deemed", "eq": null}, | |
| {"field": "earliest_apply", "eq": "2026-06-01"}, | |
| {"limb": "(a) i", "status": "fail", "never": true}], | |
| "working": "(i): a maximum of 10 years is not 'less than 10 years' -- never deemed; s. 17 from 2021-06-01.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(i)"}] | |
| }, | |
| { | |
| "id": "permanent-resident-criminality-only", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2020-01-01", "completed": "2021-06-01"}], | |
| "args": {"today": "2026-09-12", "status": "permanent-resident"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-inadmissible-pr"}], | |
| "working": "s. 36(2) reaches foreign nationals only; nothing on the record is serious criminality.", | |
| "sources": [{"id": "I-2.5-s36-p1", "why": "'A foreign national is inadmissible on grounds of criminality'"}] | |
| }, | |
| { | |
| "id": "youth-disposition-in-vi-open", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2001-01-01", "completed": "2001-01-01"}, | |
| {"n": 3, "class": "youth", "youth_class": "summary-only", "conviction_date": "2000-01-01", "completed": "2000-01-01"}], | |
| "args": {"today": "2026-09-12", "hybrid_reading": "indictable", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "undetermined"}, | |
| {"limb": "(a) vi", "status": "unknown"}, | |
| {"needs": [["youth-disposition", 3]]}], | |
| "working": "(vi) carries no YCJA exception: counted, the youth disposition makes two summary-type convictions before the last 10 years; not counted, one. Not settled in CanLex. (v) excepts it either way.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(v) exception; (a)(vi) none"}] | |
| }, | |
| { | |
| "id": "canadian-contravention-outside-every-limb", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2004-01-01", "completed": "2005-01-01"}, | |
| {"n": 2, "jurisdiction": "canada", "class": "contravention", "conviction_date": "2020-01-01", "completed": "2020-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2015-01-02"}, | |
| {"field": "earliest_apply", "eq": "2010-01-01"}], | |
| "working": "A contravention is excepted from (iv) and from s. 17's 'subsequent offence'; it is outside s. 36 (s. 36(3)(e)(i)). Deemed from W(2005-01-01, 10) = 2015-01-02.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iv) exception"}, {"id": "SOR-2002-227-s17", "why": "contravention excepted"}] | |
| }, | |
| { | |
| "id": "leap-day-completion", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "hybrid", "max_years": 5, "conviction_date": "2015-12-01", "completed": "2016-02-28"}], | |
| "args": {"today": "2026-09-12"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2026-02-28"}, | |
| {"limb": "(a) ii", "from": "2026-02-28"}], | |
| "working": "The day after 2016-02-28 is 2016-02-29; ten years later has no 29 February, so the period ends on 2026-02-28 (Interpretation Act s. 28(c)).", | |
| "sources": [{"id": "I-21-s28", "why": "the last day of that month"}, {"id": "SOR-2002-227-s18-p1", "why": "(a)(ii)"}] | |
| }, | |
| { | |
| "id": "two-summary-convictions-paragraph-b-deemed", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "summary-only", "offence_date": "2019-05-05", "completed": "2019-06-01"}, | |
| {"n": 2, "class": "summary-only", "offence_date": "2021-05-05", "completed": "2021-06-01"}], | |
| "args": {"today": "2026-09-10"}, | |
| "expect": [ | |
| {"field": "status", "eq": "deemed-rehabilitated"}, | |
| {"field": "earliest_deemed", "eq": "2026-06-02"}, | |
| {"field": "earliest_apply", "eq": "2026-06-01"}, | |
| {"limb": "(b) i", "status": "pass", "from": "2026-06-02", "entries": [2]}], | |
| "working": "(b)(i): five years since the day after the last sentence, W(2021-06-01, 5) = 2026-06-02; (b)(iv) is out of the window by then on any conviction date between the offence and the completion.", | |
| "sources": [{"id": "SOR-2002-227-s18-p2", "why": "(b)(i), (iv)"}] | |
| }, | |
| { | |
| "id": "paragraph-b-canadian-conviction-within-five-years", | |
| "kind": "engine", | |
| "record": [ | |
| {"n": 1, "class": "summary-only", "conviction_date": "2012-06-01", "completed": "2012-06-01"}, | |
| {"n": 2, "class": "summary-only", "conviction_date": "2013-06-01", "completed": "2013-06-01"}, | |
| {"n": 3, "jurisdiction": "canada", "class": "summary-only", "conviction_date": "2023-03-01", "completed": "2023-03-01"}], | |
| "args": {"today": "2026-09-12", "anchor": "conviction"}, | |
| "expect": [ | |
| {"field": "status", "eq": "not-yet"}, | |
| {"field": "earliest_deemed", "eq": "2028-03-02"}, | |
| {"field": "earliest_apply", "eq": "2028-03-01"}, | |
| {"limb": "(b) iii", "status": "fail", "from": "2028-03-02", "entries": [3]}, | |
| {"limb": "(b) v", "status": "pass"}], | |
| "working": "(b)(iii): a Canadian conviction within the last five years until W(2023-03-01, 5) = 2028-03-02. (b)(v) allows one Canadian summary conviction before the last five years. s. 17 from the Canadian completion: 2028-03-01, not yet.", | |
| "sources": [{"id": "SOR-2002-227-s18-p2", "why": "(b)(iii), (v)"}] | |
| }, | |
| { | |
| "id": "s18-1-not-solely-canadian-answer-follows", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "simple assault", "disposition": "convicted", "state": "TX", "offence_date": "1999-01-01", "sentence_completed": "2000-01-01"}, | |
| {"offense": "causing a disturbance", "disposition": "convicted", "jurisdiction": "canada", "canada_max_years": 2, "canada_offence_mode": "summary-only", "canada_sentence": "fine", "offence_date": "2015-01-01", "sentence_completed": "2015-06-01"}, | |
| {"offense": "causing a disturbance", "disposition": "convicted", "jurisdiction": "canada", "canada_max_years": 2, "canada_offence_mode": "summary-only", "canada_sentence": "fine", "offence_date": "2016-01-01", "sentence_completed": "2016-06-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:assault-simple"], | |
| "expect": [ | |
| {"field": "canada_entries.0.canada_branch", "eq": "36(2)(a)-two-offences"}, | |
| {"field": "canada_entries.1.canada_branch", "eq": "36(2)(a)-two-offences"}, | |
| {"field": "s18_1.outcome", "eq": "not-deemed"}, | |
| {"text": "all", "contains": "## IRPR s. 18.1 limb by limb"}, | |
| {"text": "all", "absent": "EXEMPT -- IRPR s. 18.1"}], | |
| "working": "The foreign assault is a ground of its own and (a)(iv) fails on the two Canadian summary convictions, so the person is not inadmissible 'solely' on them: s. 18.1 does not apply and they engage s. 36(2)(a) (was EXEMPT with a 'check the record' condition).", | |
| "sources": [{"id": "SOR-2002-227-s18.1", "why": "'inadmissible solely on the basis of'"}, {"id": "SOR-2002-227-s18-p1", "why": "(a)(iv)"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-election-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "simple assault", "disposition": "convicted", "state": "NY", "offence_date": "2008-01-01", "sentence_completed": "2009-01-01"}, | |
| {"offense": "assault", "disposition": "convicted", "jurisdiction": "canada", "canada_max_years": 5, "canada_offence_mode": "hybrid", "canada_sentence": "fine", "offence_date": "2015-01-01", "sentence_completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:assault-simple"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "not-settled"}, | |
| {"field": "earliest_apply", "eq": "2021-01-01"}, | |
| {"field": "s18_readings.0.status", "eq": "eligible-to-apply"}, | |
| {"field": "s18_readings.1.status", "eq": "undetermined"}, | |
| {"needs": [["canada_prosecuted", 2]]}, | |
| {"field": "canada_entries.0.canada_branch", "eq": "36(2)(a)"}, | |
| {"text": "all", "contains": "give canada_prosecuted (#2)"}], | |
| "working": "A foreign assault 2008/2009 and a Canadian hybrid assault 2015/2016 (fine; election not given). The Canadian entry is s. 36(2)(a) whatever the election (s. 36(3)(a)). For s. 18(2)(a)(iii) the reading decides, and on the 'summary' reading the election does (I-21 s. 34(1)(c)): was ELIGIBLE TO APPLY on (iii) alone.", | |
| "sources": [{"id": "SOR-2002-227-s18-p1", "why": "(a)(iii)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}] | |
| }, | |
| { | |
| "id": "canadian-hybrid-entered-summarily-through-screen-history", | |
| "kind": "tool", | |
| "entries": [ | |
| {"offense": "simple assault", "disposition": "convicted", "state": "NY", "offence_date": "2008-01-01", "sentence_completed": "2009-01-01"}, | |
| {"offense": "assault", "disposition": "convicted", "jurisdiction": "canada", "canada_max_years": 5, "canada_offence_mode": "hybrid", "canada_sentence": "fine", "canada_prosecuted": "summarily", "offence_date": "2015-01-01", "sentence_completed": "2016-01-01"}], | |
| "args": {"today": "2026-09-12"}, | |
| "requires": ["pairing:assault-simple"], | |
| "expect": [ | |
| {"field": "rehab_status", "eq": "not-settled"}, | |
| {"field": "s18_readings.0.status", "eq": "eligible-to-apply"}, | |
| {"field": "s18_readings.1.status", "eq": "deemed-rehabilitated"}, | |
| {"field": "canada_entries.0.canada_branch", "eq": "36(2)(a)"}], | |
| "working": "canada_prosecuted 'summarily' reaches the limbs: on the 'summary' reading every limb of (a) holds; on 'indictable' (iii) fails. It does not change the Canadian entry's own ground (s. 36(2)(a): s. 36(3)(a) deems the hybrid indictable 'even if it has been prosecuted summarily').", | |
| "sources": [{"id": "I-2.5-s36-p2", "why": "s. 36(3)(a)"}, {"id": "I-21-s34", "why": "s. 34(1)(c)"}] | |
| } | |
| ] | |
| } | |