Date the EU hemp-leaf tea limit when it entered into force, not when it applies
The entry was dated 1 January 2027, its application day, so the history opened
on a year that has not happened. Commission Regulation 2026/1828 was published
on 29 July and entered into force on the twentieth day after, 18 August 2026;
the entry is now dated then, its title says the limits come in 2027, and the
description keeps the application date. Its id and address are unchanged.
history:test now fails on any entry dated after the day it runs, and
docs/DATA-MAINTENANCE.md says how to enter a law that applies later: at
adoption or entry into force, unscored, with a scored entry when it changes
what people may do.
Claude-Session: https://claude.ai/code/session_015PFhJhHBpXsnUocs8vvYAd
Commission Regulation 2026/1828, adopted on 28 July and published in the Official Journal … ng.[@1] Food already on the market may stay until its durability date.[@1] The regulation entersentered into force on the twentieth day after publication, 18 August 2026, and applies from 1 January 2027.[@1] Member states may keep stricter rules on selling the leaves.[@1]
Code, design and documents 2 files
docs/DATA-MAINTENANCE.md+6 −0
@@ -688,4 +688,10 @@ node scripts/data-status.cjs chain de # one country's full timeline
entry by the stage that changes what people may do, and mention the earlier dates in its
description.
+- **History is what has happened: never date an entry in the future.** A law adopted now that
+ applies later is entered at its adoption or entry into force, unscored, with the date it applies
+ in its description ("applies from 1 January 2027"); when that day comes and it changes what
+ people may do, a scored entry follows, dated then. The EU's hemp-leaf tea limit was once dated on
+ its application day, months ahead, and sat at the top of the history. `npm run history:test`
+ fails on any entry dated after the day it runs.
- **Never state a whole region's law in one country's profile.** "The model is prohibited
throughout the European Union" sat in 13 profiles, copied from a 2018–2019 study, and was
scripts/history-scope.test.cjs+10 −1
@@ -336,5 +336,6 @@ test("2026 backfill records the licences, bills and delays without moving scores
assert.match(mo.description, /12 November/);
assert.equal(tea.country, undefined);
- assert.equal(tea.date, "2027-01-01");
+ // dated at entry into force; the limits apply from 1 January 2027, as the description says
+ assert.equal(tea.date, "2026-08-18");
assert.match(tea.description, /1 January 2027/);
assert.match(tea.description, /40 mg\/kg/);
@@ -957,2 +958,10 @@ test("Cambodia's 2012 custodial penalty correction preserves its earlier score (
assert.deepEqual(scoreAt('kh', 2026), profile);
});
+
+test("no history entry is dated in the future: history is what has happened", () => {
+ const all = y.load(fs.readFileSync("changes.yaml", "utf8"));
+ // a day's slack, as the date of a commit is its author's local day
+ const tomorrow = new Date(Date.now() + 864e5).toISOString().slice(0, 10);
+ const ahead = all.filter((e) => String(e.date) > tomorrow).map((e) => `${e.id} (${e.date})`);
+ assert.deepEqual(ahead, [], "date a law that applies later by its adoption or entry into force; see docs/DATA-MAINTENANCE.md");
+});