Code, design and documents 3 files
docs/DATA-MAINTENANCE.md +10 −0
@@ -1797,2 +1797,12 @@ and the 2011/2012 first-offender licence dispute, including the Supreme Court's
reversal. Current scores and existing historical vectors are preserved; earlier
territorial legislation and original commencement records remain research targets.
+
+A [bug-source review for #160–179](research/bug-fixes-160-179-2026-10-26.md)
+on 26 October 2026 corrects product-specific penalties, patient exceptions,
+import and aggravated-use rules across nineteen profiles. It adds Paraguay’s
+December 2025 pilot and Malta’s 2025 resin permission as unscored history,
+and corrects Vietnam, Croatia and France history descriptions. Samoa’s
+reported Class C listing is disproved by the Attorney General’s Class B
+schedule; the fourteen-year maximum remains. Existing scores and historical
+vectors are preserved. Ten regression tests cover the corrected distinctions;
+Latvian and New Zealand full-text retrieval limits are documented.
docs/research/bug-fixes-160-179-2026-10-26.md +64 −0
@@ -0,0 +1,64 @@
+# Bug reports #160–179 — 26 October 2026
+
+Reviewed README, DATA-MAINTENANCE, WRITING and BOOKS guidance. This pass addresses 19 substantiated reports and documents the contrary primary evidence for #166. It changes legal descriptions, source locators and quick answers without changing current scores or existing historical before-vectors.
+
+## Findings and evidence
+
+- **#160, Paraguay:** Resolution 488/2025, signed 19 December 2025, establishes the two-year THC/CBD pilot. Specialist/patient registration, prescription and dispensing conditions are explicit; current stock is not established. Added an unscored medical history entry. [source](https://dinavisa.gov.py/wp-content/uploads/2026/01/RESOLUCION-DINAVISA-N%C2%B0488.pdf)
+
+- **#161, Hawaii:** HRS 712-1240, 1244–1246.5 distinguish marijuana from harmful-drug concentrates. The 3 g violation does not cover concentrates; felony preparation thresholds are ⅛ oz and 1 oz, with separate dosage-unit rules. [statute](https://data.capitol.hawaii.gov/hrscurrent/Vol14_Ch0701-0853/HRS0712/HRS_0712-1240.htm), [statute](https://data.capitol.hawaii.gov/hrscurrent/Vol14_Ch0701-0853/HRS0712/HRS_0712-1245.htm), [statute](https://data.capitol.hawaii.gov/hrscurrent/Vol14_Ch0701-0853/HRS0712/HRS_0712-1244.htm), [statute](https://data.capitol.hawaii.gov/hrscurrent/Vol14_Ch0701-0853/HRS0712/HRS_0712-1246_0005.htm)
+
+- **#162, Wyoming:** Section 35-7-1031(c): the first-offence ceilings depend on form: 3 oz plant, 0.3 g liquid, 3 g powder/crystalline/pill/capsule. Weights include carriers but exclude packaging. [statute](https://www.wyoleg.gov/statutes/compress/title35.pdf)
+
+- **#163, North Carolina:** G.S. 90-95(d)(4) and 90-94: hashish has separate 1/20 and 3/20 oz boundaries; prohibited isolated or synthetic THC can be a felony at any weight. Exempt hemp/medicines remain separate. [statute](https://www.ncleg.gov/EnactedLegislation/Statutes/HTML/BySection/Chapter_90/GS_90-95.html), [statute](https://www.ncleg.gov/enactedlegislation/statutes/html/bysection/chapter_90/gs_90-94.html)
+
+- **#164, Philippines:** RA 9165 section 13 requires maximum section 11 penalties at a party/gathering or near at least two other people, irrespective of weight. The implementing rules say the others need not possess drugs. [source](https://elibrary.judiciary.gov.ph/thebookshelf/showdocs/2/1435)
+
+- **#165, Philippines:** Section 4 importation is a distinct offence irrespective of weight; RA 9346 substitutes life imprisonment for the abolished death penalty here. Physician/institution compassionate imports require the applicable permit. [source](https://elibrary.judiciary.gov.ph/thebookshelf/showdocs/2/1435)
+
+- **#166, Samoa:** Report not substantiated. In the Attorney General consolidation the Second Schedule starts on printed p.24; cannabis plant material is item 40 on p.25, processed preparations item 1, resin item 41. The Third Schedule starts p.30; its item 40 is lorazepam. Section 18 therefore retains the 14-year Class B maximum, subject to its proviso. Added direct citations to profile/article; no false seven-year correction. [source](https://www.ag.gov.ws/wp-content/uploads/2024/02/Narcotics-Act-1967.pdf)
+
+- **#167, Russia:** Decree 1002 lists plant 6/100 g, hashish 2/25 g, oil 0.4/5 g for significant/large grading. The table heading says grams above, so the text preserves strict boundaries. Article 228 and administrative article 6.8 provide the different sanctions. Classification of a preparation must first be established. [source](https://www.consultant.ru/document/cons_doc_LAW_136206/6598ecb6e30274e2fbab0c605a6ebf21250a8eb6/)
+
+- **#168, Vietnam:** Read the State Audit Office explanation quoting Article 256a. Ordinary one-year monitoring alone does not establish the use crime. The post-management category requires both a two-year window and current illicit-user management. Corrected profile, history and article. [source](https://sav.gov.vn/vi/bai-viet/tin-db8b5ce4-c580-4d97-59b3-08de30a94834)
+
+- **#169, France:** Service-Public confirms the separate five-year/€75,000 work-duty aggravation. It already appears in L3421-1 in the official code reproduced in a November 2015 PDF, p.597 (PDF index 596); it was not newly created by the 2026 fine change. Corrected profile and history scope. [source](https://www.service-public.gouv.fr/particuliers/vosdroits/F33341)
+
+- **#170, Dominican Republic:** Read the OAS-hosted Law 17-95 amendment, adding Article 6(c): distribution/sale intent overrides the personal-possession classification at any quantity. Existing penalty reference supplies the distributor/seller term. [source](https://www.oas.org/ext/Portals/33/Files/MLA/Dom_multla_leg_eng_2.pdf)
+
+- **#171, Mexico:** Read the Interior Ministry federal code reproduction, Articles 193–194: unauthorised import/export, including temporary entry/transit, has a distinct 10–25-year range. Domestic personal-use authorisations do not authorise importation. [source](https://www.ordenjuridico.gob.mx/Documentos/Federal/html/wo83048.html)
+
+- **#172, New Zealand:** Schedule 5 differentiates 28 g Class C plant, 5 g Class B preparations and 250 mg separately scheduled THC; the presumption is rebuttable. Police corroborates 14/8-year Class B/C supply maxima and the lower personal-possession penalty. Full statute retrieval failed; see limitation below. [source](https://www.legislation.govt.nz/act/public/1975/116/en/latest/)
+
+- **#173, Croatia:** Read official NN 107/2015, Article 7/new 30.b(3): 7.5 g THC per 30 days, not 0.75 g or a flower-weight limit. Corrected profile and 2015 history entry. [source](https://narodne-novine.nn.hr/clanci/sluzbeni/full/2015_10_107_2092.html)
+
+- **#174, Switzerland:** Read VRV Article 2: prescribed use proved by the driver removes the automatic detection-based unfitness finding. Actual unfitness still prohibits driving. [source](https://justement.ch/de/doc/act/ch/741_11/part_1/chap_1/art_2)
+
+- **#175, Peru:** Read Decree 1592, amended Penal Code Article 299: registered patient/qualifying care or guardianship possession is measured against treatment needs separately from ordinary 8 g plant/2 g derivative limits. [source](https://busquedas.elperuano.pe/dispositivo/NL/2244234-2)
+
+- **#176, Norway:** Read the ministerial prescription exception and the driving-licence guide. Numeric-limit exceptions do not grant general licence fitness: Sativex/Epidyolex group 1 treatment has conditions; other cannabinoid products need a formal exemption, and groups 2/3 do not qualify. [source](https://www.stortinget.no/no/Saker-og-publikasjoner/Sporsmal/Skriftlige-sporsmal-og-svar/Skriftlig-sporsmal/?qnid=95447)
+
+- **#177, Morocco:** Read the UN republication of the 1974 law: Article 8 use has 500–5,000 dirhams and two months–one year, or either penalty. Article 2 holding has five–ten years and 5,000–50,000. Article 3 facilitation has a separate range. Avoid presenting the use maximum as a possession ceiling. [source](https://digitallibrary.un.org/record/458193/files/S_2001_1288-FR.pdf)
+
+- **#178, Malta:** Read ARUC’s May 2025 permission and January 2026 Directive 1 v4, Standard IX. Specifically authorised solid solventless resin is possible; oils/tinctures/distillates are excluded. THC bands weight resin against daily/monthly flower limits. Added an unscored easing history entry. [source](https://aruc.mt/wp-content/uploads/2026/01/Directive-1-v4.0-16.01.2026.pdf)
+
+- **#179, Latvia:** The official indexed Annex 2 table distinguishes dried 1 g, fresh 5 g, hashish 0.1 g, other resin/oil/extract/tincture 0.05 g, and dried plant mixtures 0.5 g. Corrected ordinary and visitor/quick-answer scope; full retrieval failed, see below. [source](https://likumi.lv/ta/en/en/id/50539-on-the-procedures-for-the-coming-into-force-and-application-of-the-criminal-law)
+
+## Retrieval limits and interpretation
+
+Latvia’s Likumi pages timed out through web, direct HTTP and browser retrieval. The official search-indexed Annex 2 extract displayed all relevant quantity rows; this is not a claim to have read the full current act. New Zealand’s legislation site returned empty/blocked responses through those routes; the official indexed Schedule 5 text was read, alongside the fully retrieved Police penalty page. Neither extraction is represented as a new checked historical event. The profile source locators make the relevant provisions explicit.
+
+The Paraguay PDF was scanned: all 19 pages were OCRed, and the signature/date and operative provisions were visually checked. Its recurring draft footer coexists with signatures/stamps; the regulator publishes it as Resolution 488 and state reporting confirms the pilot. The pilot has an exceptional product-registration regime, so lack of ordinary registration is not evidence against it. Neither publication establishes stocked products. France’s Légifrance page blocked retrieval; Service-Public supplied current guidance, and the 2015 code reproduction establishes the older aggravation. Morocco’s ministry endpoint failed; the UN republishes the relevant government law text. Russia’s table is a statutory reproduction, with the header and relevant rows read separately.
+
+## Score and history review
+
+The corrections distinguish product forms, aggravated conduct and patient exceptions within existing rubric bands. No current scores or status classifications change. Samoa remains Class B. The Paraguay pilot does not verify operating patient supply sufficient to raise access; Malta adds a permitted product within its existing association channel. Both new events have explicit unscored reasons. The Vietnam, Croatia and France history edits preserve existing score vectors; all unrelated history records are preserved.
+
+## Validation
+
+- Answer/profile regression suite: 37 passing tests, including ten new tests covering these reports.
+- History suite: 40 passing tests.
+- Production build and generated profile/history/answer inspection recorded after the final edits.
+- Scores/statuses and existing before-vectors compared with the pre-change data; source keys and inline citations checked.
+
+Source downloads/OCR and build logs are local ignored working files, not permanent source-archive claims.
scripts/profile-claims.test.mjs +87 −0
@@ -214,2 +214,89 @@ test('Florida small-flower exceptions never silently include resin (#158)', () =
assert.match(fl.answers.caught.text, /concentrate possession can be a felony at any weight/);
});
+
+test('plant thresholds cannot conceal concentrate felonies (#161–163)', () => {
+ const hi = country('us/hi'), wy = country('us/wy'), nc = country('us/nc');
+ assert.match(hi.segments.possession, /3 g.*plant|plant.*3 g/);
+ assert.match(hi.segments.possession, /⅛ oz.*class B.*1 oz.*class A/);
+ assert.match(hi.answers.caught.text, /concentrates.*felonies/);
+ assert.match(wy.segments.possession, /3 oz.*plant.*0\.3 g.*liquid.*3 g.*powder/);
+ assert.match(wy.answers.caught.text, /0\.3 g.*liquid.*felony/);
+ assert.match(nc.segments.possession, /3\/20 oz.*hashish.*any quantity.*isolated.*Class I felony/);
+ assert.match(nc.answers.caught.text, /isolated THC.*felony/);
+});
+
+test('Philippine import and gathering rules survive the ordinary weight bands (#164–165)', () => {
+ const ph = country('ph');
+ assert.match(ph.segments.possession.text, /Section 13.*maximum Section 11.*at least two.*regardless of amount/);
+ assert.match(ph.context.visitors.text, /importation.*life imprisonment.*regardless of quantity/);
+ assert.match(ph.answers.caught.text, /importation.*life.*group possession/);
+});
+
+test('Samoa keeps the actual Class B plant listing rather than the reported Class C misreading (#166)', () => {
+ const ws = country('ws');
+ assert.match(ws.segments.possession.text, /Second Schedule \(Class B\), item 40/);
+ assert.match(ws.segments.possession.text, /fourteen years/);
+ assert.match(ws.sources.ag2023.url, /ag\.gov\.ws/);
+});
+
+test('Russian and Latvian oil thresholds remain distinct from dried flower (#167, #179)', () => {
+ assert.match(country('ru').segments.possession.text, /6 g.*plant.*2 g.*hashish.*0\.4 g.*oil/);
+ assert.match(country('ru').segments.possession.text, /100 g, 25 g and 5 g/);
+ const lv = country('lv');
+ assert.match(lv.segments.possession.text, /1 g.*dried.*5 g.*undried.*0\.1 g.*hashish.*0\.05 g.*oil/);
+ assert.match(lv.answers.caught.text, /product-specific ceiling/);
+});
+
+test('Vietnam ordinary monitoring alone does not establish the rehabilitation-related use crime (#168)', () => {
+ const vn = country('vn');
+ assert.match(vn.segments.consumption.text, /management ends AND while under illicit-user management/);
+ assert.match(vn.context.consequences.text, /ordinary one-year monitoring.*assessment.*requires.*rehabilitation-related/);
+ const article = fs.readFileSync(path.join(root, 'articles/vietnam-repeat-use-crime-2025.md'), 'utf8');
+ assert.match(article, /ordinary monitoring period alone does not establish that offence/i);
+ assert.doesNotMatch(article, /exactly those the state already knows as users/);
+});
+
+test('aggravated use, distribution intent and border offences qualify personal-use summaries (#169–171)', () => {
+ assert.match(country('fr').segments.possession.text, /public-authority.*five years.*€75,000.*outside.*fixed-fine/);
+ assert.match(country('do').segments.possession.text, /intent to distribute or sell.*regardless of quantity/);
+ assert.match(country('mx').context.visitors.text, /import.*export.*ten to twenty-five years/i);
+ assert.match(country('mx').context.visitors.text, /named adult/);
+});
+
+test('New Zealand supply presumptions distinguish Class B preparations from Class C plant (#172)', () => {
+ const s = country('nz').segments.sharing.text;
+ assert.match(s, /28 g.*Class C.*5 g.*Class B.*250 mg/);
+ assert.match(s, /rebuttable presumption.*not an automatic conviction/);
+ assert.match(s, /fourteen years.*Class B.*eight years.*Class C/);
+});
+
+test('medical quantity and driving exceptions retain their qualifying conditions (#173–176)', () => {
+ assert.match(country('hr').context.medical.text, /7\.5 g of THC per 30 days/);
+ assert.doesNotMatch(country('hr').context.medical.text, /0\.75 g/);
+ assert.match(country('ch').context.driving.text, /physician’s prescription.*exempt.*Actual unfitness/);
+ assert.match(country('pe').segments.possession.text, /registered patient.*care or guardianship.*treatment need/);
+ const no = country('no').context.driving.text;
+ assert.match(no, /Fixed concentration rules do not apply.*prescription/);
+ assert.match(no, /Sativex and Epidyolex.*group 1.*specialist/);
+ assert.match(no, /Groups 2 and 3 do not qualify/);
+});
+
+test('Morocco use and holding penalties remain separate (#177)', () => {
+ const text = country('ma').segments.possession.text;
+ assert.match(text, /Article 2.*five to ten years.*5,000–50,000/);
+ assert.match(text, /Article 8.*use.*500–5,000.*not a universal.*ceiling for possession/);
+});
+
+test('new pilot and resin permissions are recorded without inventing broad retail supply (#160, #178)', () => {
+ const py = country('py'), mt = country('mt'), history = events();
+ assert.match(py.context.medical.text, /488\/2025.*19 December 2025.*two-year.*pilot/);
+ assert.match(py.context.products.text, /do not demonstrate.*currently in stock/);
+ assert.match(mt.context.products.text, /solid solventless.*processing authorisation/);
+ assert.match(mt.context.products.text, /33%.*34–66%.*above 66%/);
+ for (const id of ['paraguay-medicinal-cannabinoid-pilot-2025', 'malta-solventless-resin-permission-2025']) {
+ const e = history.find((e) => e.id === id);
+ assert.equal(e.checked, true);
+ assert.equal(e.before, undefined);
+ assert.ok(e.unscored);
+ }
+});