paperlint 17.3.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/.github/workflows/deadlines.yml +1 -1
  2. package/CONTRIBUTING.md +8 -5
  3. package/README.md +19 -18
  4. package/dist/adapters/latex/index.d.ts +1 -0
  5. package/dist/adapters/latex/index.d.ts.map +1 -1
  6. package/dist/adapters/latex/index.js +3 -0
  7. package/dist/adapters/latex/index.js.map +1 -1
  8. package/dist/adapters/latex/parse.d.ts +9 -0
  9. package/dist/adapters/latex/parse.d.ts.map +1 -1
  10. package/dist/adapters/latex/parse.js +12 -0
  11. package/dist/adapters/latex/parse.js.map +1 -1
  12. package/dist/adapters/latex/venue-lines.d.ts +10 -0
  13. package/dist/adapters/latex/venue-lines.d.ts.map +1 -0
  14. package/dist/adapters/latex/venue-lines.js +11 -0
  15. package/dist/adapters/latex/venue-lines.js.map +1 -0
  16. package/dist/build.d.ts +1 -1
  17. package/dist/build.d.ts.map +1 -1
  18. package/dist/cli.d.ts.map +1 -1
  19. package/dist/cli.js +17 -6
  20. package/dist/cli.js.map +1 -1
  21. package/dist/domain/body-pages.d.ts +1 -1
  22. package/dist/domain/body-pages.js +1 -1
  23. package/dist/domain/edition.d.ts +35 -0
  24. package/dist/domain/edition.d.ts.map +1 -0
  25. package/dist/domain/edition.js +64 -0
  26. package/dist/domain/edition.js.map +1 -0
  27. package/dist/edition-rule.d.ts +17 -0
  28. package/dist/edition-rule.d.ts.map +1 -0
  29. package/dist/edition-rule.js +90 -0
  30. package/dist/edition-rule.js.map +1 -0
  31. package/dist/facts-file.d.ts +1 -1
  32. package/dist/facts-file.d.ts.map +1 -1
  33. package/dist/folder-layout-rule.js +1 -1
  34. package/dist/folder-layout-rule.js.map +1 -1
  35. package/dist/folder-venue-rule.d.ts +1 -1
  36. package/dist/folder-venue-rule.d.ts.map +1 -1
  37. package/dist/folder-venue-rule.js +15 -6
  38. package/dist/folder-venue-rule.js.map +1 -1
  39. package/dist/heading-case.js +1 -1
  40. package/dist/ports/latex.d.ts +6 -1
  41. package/dist/ports/latex.d.ts.map +1 -1
  42. package/dist/preset-card-rule.d.ts.map +1 -1
  43. package/dist/preset-card-rule.js +2 -1
  44. package/dist/preset-card-rule.js.map +1 -1
  45. package/dist/presets.d.ts +26 -8
  46. package/dist/presets.d.ts.map +1 -1
  47. package/dist/presets.js +86 -19
  48. package/dist/presets.js.map +1 -1
  49. package/dist/tex-requirements.d.ts +0 -2
  50. package/dist/tex-requirements.d.ts.map +1 -1
  51. package/dist/tex-requirements.js +0 -1
  52. package/dist/tex-requirements.js.map +1 -1
  53. package/dist/tex-venue-rules.d.ts +19 -8
  54. package/dist/tex-venue-rules.d.ts.map +1 -1
  55. package/dist/tex-venue-rules.js +81 -21
  56. package/dist/tex-venue-rules.js.map +1 -1
  57. package/dist/venue-rules.js +1 -1
  58. package/dist/venue-rules.js.map +1 -1
  59. package/docs/configuration.md +7 -6
  60. package/docs/optional-rules.md +2 -2
  61. package/docs/prior-art/hotcrp-option-types.md +1 -1
  62. package/docs/rules/anonymity/identity.md +2 -2
  63. package/docs/rules/cycle/record.md +4 -4
  64. package/docs/rules/paper/edition-over.md +66 -0
  65. package/docs/rules/paper/folder-venue-leftover.md +22 -18
  66. package/docs/rules/pdf/body-size.md +6 -6
  67. package/docs/rules/talk/profile.md +3 -3
  68. package/docs/rules/tex/claim-emphasis.md +1 -1
  69. package/docs/rules/tex/contrast-frames.md +1 -1
  70. package/docs/rules/tex/heading-case.md +20 -20
  71. package/docs/rules/tex/negated-sentences.md +1 -1
  72. package/docs/rules/tex/relation-markers.md +1 -1
  73. package/docs/rules/tex/venue-leftover.md +82 -44
  74. package/docs/rules.md +37 -24
  75. package/docs/submission.md +6 -6
  76. package/docs/talk.md +2 -2
  77. package/docs/venues.md +85 -5
  78. package/fixtures/build-e2e/acmart/expect.json +1 -1
  79. package/fixtures/build-e2e/acmart/paperlint.json +1 -1
  80. package/fixtures/build-e2e/aidc/paperlint.json +1 -1
  81. package/fixtures/build-e2e/anon-ack/paperlint.json +1 -1
  82. package/fixtures/build-e2e/anon-author/paperlint.json +1 -1
  83. package/fixtures/build-e2e/anon-bib/paperlint.json +1 -1
  84. package/fixtures/build-e2e/anon-href/paperlint.json +1 -1
  85. package/fixtures/build-e2e/anon-macro/paperlint.json +1 -1
  86. package/fixtures/build-e2e/anon-pdfauthor/paperlint.json +1 -1
  87. package/fixtures/build-e2e/fallback/expect.json +1 -1
  88. package/fixtures/build-e2e/fse/expect.json +1 -1
  89. package/fixtures/build-e2e/fse/paperlint.json +1 -1
  90. package/fixtures/build-e2e/fse-over/expect.json +1 -1
  91. package/fixtures/build-e2e/fse-over/paperlint.json +1 -1
  92. package/fixtures/build-e2e/msr/paperlint.json +1 -1
  93. package/fixtures/build-e2e/msr-appendix-after/paperlint.json +1 -1
  94. package/lib/skill-checks.mjs +1 -1
  95. package/package.json +1 -1
  96. package/presets/acl-latex.jsonc +35 -0
  97. package/presets/acl-latex.md +40 -0
  98. package/presets/acm-acmsmall.md +1 -1
  99. package/presets/acm-sigconf.jsonc +1 -1
  100. package/presets/acm-sigconf.md +1 -1
  101. package/presets/acsac-2026.jsonc +19 -0
  102. package/presets/acsac-2026.md +46 -0
  103. package/presets/{agent.jsonc → agent-2027.jsonc} +14 -7
  104. package/presets/{agent.md → agent-2027.md} +10 -6
  105. package/presets/{agenticdev.jsonc → agenticdev-2026.jsonc} +6 -3
  106. package/presets/{agenticdev.md → agenticdev-2026.md} +5 -5
  107. package/presets/{agentverify.jsonc → agentverify-2027.jsonc} +10 -2
  108. package/presets/{agentverify.md → agentverify-2027.md} +9 -3
  109. package/presets/{aidc.jsonc → aidc-2026.jsonc} +12 -4
  110. package/presets/{aidc.md → aidc-2026.md} +8 -4
  111. package/presets/{aisec.jsonc → aisec-2026.jsonc} +7 -4
  112. package/presets/{aisec.md → aisec-2026.md} +7 -6
  113. package/presets/{ase.jsonc → ase-2026.jsonc} +9 -9
  114. package/presets/{ase.md → ase-2026.md} +8 -8
  115. package/presets/{ccs.jsonc → ccs-2026.jsonc} +4 -4
  116. package/presets/{ccs.md → ccs-2026.md} +4 -4
  117. package/presets/emnlp-2026.jsonc +21 -0
  118. package/presets/emnlp-2026.md +46 -0
  119. package/presets/{fse.jsonc → fse-2027.jsonc} +6 -7
  120. package/presets/{fse.md → fse-2027.md} +9 -9
  121. package/presets/icse-2027.jsonc +24 -0
  122. package/presets/icse-2027.md +53 -0
  123. package/presets/{icse.jsonc → icse-2028.jsonc} +8 -7
  124. package/presets/{icse.md → icse-2028.md} +9 -8
  125. package/presets/ieee-conference.jsonc +1 -1
  126. package/presets/ieee-conference.md +2 -2
  127. package/presets/{msr.jsonc → msr-2027.jsonc} +4 -5
  128. package/presets/{msr.md → msr-2027.md} +7 -7
  129. package/presets/{nlbse.jsonc → nlbse-2027.jsonc} +9 -1
  130. package/presets/{nlbse.md → nlbse-2027.md} +9 -3
  131. package/presets/{realm.jsonc → realm-2026.jsonc} +17 -27
  132. package/presets/{realm.md → realm-2026.md} +11 -4
  133. package/presets/{sp.jsonc → sp-2027.jsonc} +8 -8
  134. package/presets/{sp.md → sp-2027.md} +5 -5
  135. package/presets/tex/agenticdev.tex +1 -1
  136. package/presets/venue-profile.schema.json +28 -13
  137. package/scripts/refresh-deadlines/main.test.ts +4 -4
  138. package/scripts/refresh-deadlines/refresh.test.ts +9 -9
  139. package/skills/find-venue/SKILL.md +2 -2
  140. package/skills/find-venue/SKILL.md.spec.ts +1 -1
  141. package/skills/render-paper/extract-pdf-facts.harness.ts +2 -2
  142. package/skills/submit-paper/SKILL.md +7 -7
  143. package/skills/submit-paper/SKILL.md.spec.ts +6 -6
  144. package/src/adapters/latex/index.ts +3 -0
  145. package/src/adapters/latex/parse.ts +15 -0
  146. package/src/adapters/latex/venue-lines.ts +21 -0
  147. package/src/build.harness.mjs +5 -2
  148. package/src/build.ts +1 -1
  149. package/src/cli.test.ts +8 -6
  150. package/src/cli.ts +23 -6
  151. package/src/cycle-rules.test.ts +8 -6
  152. package/src/domain/body-pages.ts +1 -1
  153. package/src/domain/edition.ts +104 -0
  154. package/src/domain/submission-fields.test.ts +13 -10
  155. package/src/domain/venue-name.test.ts +41 -16
  156. package/src/domain/versions.test.ts +2 -2
  157. package/src/edition-rule.test.ts +164 -0
  158. package/src/edition-rule.ts +121 -0
  159. package/src/facts-file.test.ts +4 -4
  160. package/src/facts-file.ts +1 -1
  161. package/src/folder-layout-rule.test.ts +1 -1
  162. package/src/folder-layout-rule.ts +1 -1
  163. package/src/folder-venue-rule.test.ts +33 -11
  164. package/src/folder-venue-rule.ts +16 -7
  165. package/src/heading-case.test.ts +4 -4
  166. package/src/heading-case.ts +1 -1
  167. package/src/linted-set.test.ts +1 -1
  168. package/src/new-paper.test.ts +38 -25
  169. package/src/paper-files.test.ts +1 -1
  170. package/src/paper-settings-commands.test.ts +4 -4
  171. package/src/paper-settings.test.ts +16 -13
  172. package/src/ports/latex.ts +6 -0
  173. package/src/preset-card-rule.test.ts +30 -24
  174. package/src/preset-card-rule.ts +2 -1
  175. package/src/presets.test.ts +347 -70
  176. package/src/presets.ts +124 -31
  177. package/src/register-bands.test.ts +2 -2
  178. package/src/rule-cases.test.ts +26 -4
  179. package/src/submission-show.test.ts +3 -3
  180. package/src/submission-update.test.ts +1 -1
  181. package/src/submission.test.ts +1 -1
  182. package/src/talk-rules.test.ts +1 -1
  183. package/src/tex-requirements.harness.ts +2 -2
  184. package/src/tex-requirements.ts +2 -4
  185. package/src/tex-venue-rules.test.ts +187 -62
  186. package/src/tex-venue-rules.ts +129 -29
  187. package/src/venue-rules.test.ts +26 -23
  188. package/src/venue-rules.ts +1 -1
  189. package/src/versions-command.test.ts +2 -2
  190. package/templates/paper/paperlint.json +1 -1
@@ -0,0 +1,104 @@
1
+ /**
2
+ * ONE PRESET PER EDITION — what a preset's id says about it.
3
+ *
4
+ * A venue preset is one edition of a series, and its id says which: `<series>-<year>`, the year in
5
+ * four digits after the last hyphen (`icse-2028`, `nlbse-2027`, `usenix-sec-2027`). The year has one
6
+ * source, this id: a venue's `name` carries none (`ICSE`), and a display that needs the year is the
7
+ * name and the id's year (`ICSE 2028`). A template family is a format, not an edition, so its id
8
+ * ends in no year (`acm-sigconf`, `ieee-conference`).
9
+ *
10
+ * A bare series (`paperlint:icse`) is never an alias for the latest edition: a paper that names one
11
+ * would have its rules change under it the day a new edition ships. It is refused, listing the
12
+ * editions (`src/presets.ts`).
13
+ */
14
+ import { sortBy } from "remeda";
15
+
16
+ /** A venue preset's id: a series of lowercase words and digits joined by hyphens, then `-<year>`. */
17
+ export const EDITION_ID = /^([a-z0-9]+(?:-[a-z0-9]+)*)-(\d{4})$/u;
18
+
19
+ /** An edition: its series and its year. */
20
+ export interface Edition {
21
+ readonly series: string;
22
+ readonly year: number;
23
+ }
24
+
25
+ /** The edition an id names, or null when the id ends in no year (a family, or a file of one's own). Pure. */
26
+ export function editionOf(id: string): Edition | null {
27
+ const m = EDITION_ID.exec(id);
28
+ return m === null
29
+ ? null
30
+ : { series: String(m[1]), year: Number.parseInt(String(m[2]), 10) };
31
+ }
32
+
33
+ /** Whether `id` ends in a year, as a family's id must not: `-2027`, or `2027` glued on. Pure. */
34
+ export const endsInYear = (id: string): boolean => /\d{4}$/u.test(id);
35
+
36
+ /** A venue's name with its edition's year, `ICSE 2028`; the bare name when the year is not known. Pure. */
37
+ export const editionLabel = (name: string, year: number | null): string =>
38
+ year === null ? name : `${name} ${String(year)}`;
39
+
40
+ /**
41
+ * The shipped editions of `series`, oldest first, as ids (`icse-2027`, `icse-2028`): what a bare
42
+ * series spec is refused with. Pure.
43
+ */
44
+ export const editionsOf = (
45
+ series: string,
46
+ shipped: readonly string[],
47
+ ): readonly string[] => editionsWithIds(series, shipped).map((e) => e.id);
48
+
49
+ /** The shipped editions of `series` after `e`'s year, oldest first, as ids. Pure. */
50
+ export const newerEditions = (
51
+ e: Edition,
52
+ shipped: readonly string[],
53
+ ): readonly string[] =>
54
+ editionsWithIds(e.series, shipped)
55
+ .filter((x) => x.year > e.year)
56
+ .map((x) => x.id);
57
+
58
+ /** Each shipped edition of `series` with its id, oldest first. Pure. */
59
+ const editionsWithIds = (
60
+ series: string,
61
+ shipped: readonly string[],
62
+ ): readonly (Edition & { readonly id: string })[] =>
63
+ sortBy(
64
+ shipped.flatMap((id) => {
65
+ const e = editionOf(id);
66
+ return e !== null && e.series === series ? [{ ...e, id }] : [];
67
+ }),
68
+ (e) => e.year,
69
+ );
70
+
71
+ /**
72
+ * Why a shipped preset's id does not fit what the file declares itself to be, or null: a venue's id
73
+ * is `<series>-<year>`, a family's ends in no year. Pure.
74
+ */
75
+ export function idProblem(
76
+ id: string,
77
+ type: "venue" | "family" | "base",
78
+ ): string | null {
79
+ if (type === "venue" && editionOf(id) === null)
80
+ return `${id}: a venue preset is one edition, and its id is <series>-<year> (icse-2028)`;
81
+ if (type === "family" && endsInYear(id))
82
+ return `${id}: a template family is a format, not an edition, and its id ends in no year`;
83
+ return null;
84
+ }
85
+
86
+ /**
87
+ * Each deadline of the edition `year` that falls outside [year − 2, year + 1], as a line naming it.
88
+ * An edition's dates fall in the two years before it and the year it is held, and its camera-ready
89
+ * may follow it: anything else is a reading of another edition. Pure.
90
+ */
91
+ export const deadlineYearProblems = (
92
+ id: string,
93
+ year: number,
94
+ deadlines: readonly { readonly what: string; readonly at: string }[],
95
+ ): readonly string[] =>
96
+ deadlines
97
+ .filter((d) => {
98
+ const y = Number.parseInt(d.at.slice(0, 4), 10);
99
+ return y < year - 2 || y > year + 1;
100
+ })
101
+ .map(
102
+ (d) =>
103
+ `${id}: the ${d.what} deadline ${d.at} is outside ${String(year - 2)}–${String(year + 1)}, the years an edition of ${String(year)} falls in`,
104
+ );
@@ -35,7 +35,7 @@ const VENUE: VenueFields = {
35
35
  };
36
36
 
37
37
  test("parsePaperFields: absent on a venue that records no fields → nothing to send; every kind's value passes as given", () => {
38
- assert.deepEqual(parsePaperFields(null, null, "msr.jsonc"), {
38
+ assert.deepEqual(parsePaperFields(null, null, "msr-2027.jsonc"), {
39
39
  ok: true,
40
40
  value: {},
41
41
  });
@@ -48,7 +48,7 @@ test("parsePaperFields: absent on a venue that records no fields → nothing to
48
48
  ACMCorAut: "author@example.org",
49
49
  note: "free text",
50
50
  };
51
- assert.deepEqual(parsePaperFields(fields, VENUE, "msr.jsonc"), {
51
+ assert.deepEqual(parsePaperFields(fields, VENUE, "msr-2027.jsonc"), {
52
52
  ok: true,
53
53
  value: fields,
54
54
  });
@@ -59,7 +59,7 @@ test("🔴 parsePaperFields: a topic the form does not offer is refused, naming
59
59
  parsePaperFields(
60
60
  { topics: ["AI for software engineering"] },
61
61
  VENUE,
62
- "msr.jsonc",
62
+ "msr-2027.jsonc",
63
63
  ),
64
64
  {
65
65
  ok: false,
@@ -71,7 +71,7 @@ test("🔴 parsePaperFields: a topic the form does not offer is refused, naming
71
71
 
72
72
  test("🔴 parsePaperFields: each other wrong answer is refused by key", () => {
73
73
  const refused = (v: unknown): string => {
74
- const r = parsePaperFields(v, VENUE, "msr.jsonc");
74
+ const r = parsePaperFields(v, VENUE, "msr-2027.jsonc");
75
75
  return r.ok ? "accepted" : r.error;
76
76
  };
77
77
  assert.equal(
@@ -110,7 +110,7 @@ test("🔴 parsePaperFields: each other wrong answer is refused by key", () => {
110
110
  });
111
111
 
112
112
  test("🔴 parsePaperFields: no fields at all, on a venue whose form requires one — refused, naming it, not sent empty", () => {
113
- const r = parsePaperFields(null, VENUE, "msr.jsonc");
113
+ const r = parsePaperFields(null, VENUE, "msr-2027.jsonc");
114
114
  expect(r.ok ? "accepted" : r.error).toBe(
115
115
  '"fields" does not fill 1 field the venue\'s form requires: topics (checkboxes: one or more of "SE Topic: AI for software engineering", "Performance analysis and testing")',
116
116
  );
@@ -137,11 +137,14 @@ test("parsePaperFields: an optional checkbox list may be empty; a required text
137
137
  });
138
138
 
139
139
  test("🔴 parsePaperFields: fields on a venue whose preset records none — refused, naming where it looked", () => {
140
- assert.deepEqual(parsePaperFields({ topics: ["x"] }, null, "msr.jsonc"), {
141
- ok: false,
142
- error:
143
- '"fields" is set, but the venue preset records no "submission_fields" (read: msr.jsonc) — record the form\'s fields in the venue\'s preset first, or drop "fields"',
144
- });
140
+ assert.deepEqual(
141
+ parsePaperFields({ topics: ["x"] }, null, "msr-2027.jsonc"),
142
+ {
143
+ ok: false,
144
+ error:
145
+ '"fields" is set, but the venue preset records no "submission_fields" (read: msr-2027.jsonc) — record the form\'s fields in the venue\'s preset first, or drop "fields"',
146
+ },
147
+ );
145
148
  });
146
149
 
147
150
  test("🔴 droppedFields: a checkbox list sent, missing from the changes and named by the portal — dropped; otherwise not", () => {
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { nodeFiles } from "../adapters/node/index.ts";
6
6
  import { presetsDir } from "../package-dirs.ts";
7
- import { shippedVenueNames } from "../presets.ts";
7
+ import { shippedFolderNames } from "../presets.ts";
8
8
  import {
9
9
  nameTokens,
10
10
  venuesNamedBy,
@@ -29,32 +29,41 @@ describe("nameTokens — a name as the words it is made of", () => {
29
29
  });
30
30
 
31
31
  /**
32
- * The venues are the SHIPPED presets, read through the one source of venue names
33
- * (`shippedVenueNames`) — never a list of names written here. A case below depends on what a preset
34
- * says (`aidc`'s alias ACSAC, `ccs`'s name ACM CCS); a preset edit that changes it shows here.
32
+ * The venues are the SHIPPED presets as a folder name names them (`shippedFolderNames`: each
33
+ * edition, `AISec 2026`, and its declared `aliases`) — never a list of names written here. A case
34
+ * below depends on what a preset says (`acsac-2026`'s alias ACSAC, `ccs-2026`'s name ACM CCS); a
35
+ * preset edit that changes it shows here.
35
36
  */
36
- const VENUES: readonly NamedVenue[] = shippedVenueNames({
37
+ const VENUES: readonly NamedVenue[] = shippedFolderNames({
37
38
  files: nodeFiles,
38
39
  venuesDir: presetsDir(),
39
40
  });
40
41
 
41
42
  describe("venuesNamedBy — which venues a folder name names", () => {
42
43
  it.each<[string, string, readonly { venue: string; name: string }[]]>([
43
- ["the label", "aisec-2026", [{ venue: "AISec", name: "AISec" }]],
44
- ["an alias", "acsac-2026", [{ venue: "AIDC", name: "ACSAC" }]],
44
+ [
45
+ "the edition",
46
+ "aisec-2026",
47
+ [{ venue: "AISec 2026", name: "AISec 2026" }],
48
+ ],
49
+ ["an alias", "aisec-agents", [{ venue: "AISec 2026", name: "AISec" }]],
45
50
  [
46
51
  "a two-word name, as two tokens in a row",
47
52
  "acm-ccs-agents",
48
- [{ venue: "ACM CCS", name: "ACM CCS" }],
53
+ [{ venue: "ACM CCS 2026", name: "ACM CCS" }],
49
54
  ],
50
55
  ["the two words of a name apart are not it", "acm-agents-ccs", []],
51
- ["glued to a year", "realm2026", [{ venue: "REALM", name: "REALM" }]],
56
+ [
57
+ "glued to a year",
58
+ "realm2026",
59
+ [{ venue: "REALM 2026", name: "REALM 2026" }],
60
+ ],
52
61
  [
53
62
  "two venues, each once, in the order they are listed",
54
63
  "realm-aisec-aisec",
55
64
  [
56
- { venue: "AISec", name: "AISec" },
57
- { venue: "REALM", name: "REALM" },
65
+ { venue: "AISec 2026", name: "AISec" },
66
+ { venue: "REALM 2026", name: "REALM" },
58
67
  ],
59
68
  ],
60
69
  // Whole tokens only: a venue's name inside another word is that other word.
@@ -62,18 +71,31 @@ describe("venuesNamedBy — which venues a folder name names", () => {
62
71
  ["inside a word: realms", "realms-of-agents", []],
63
72
  ["inside a word: aisecure", "aisecure", []],
64
73
  ["no venue at all", "agent-rule-drift", []],
74
+ // A name that is an ordinary word counts only as its edition.
75
+ ["an ordinary word: agent", "agent-study", []],
76
+ [
77
+ "the edition of that word",
78
+ "agent-2027-study",
79
+ [{ venue: "AGENT 2027", name: "AGENT 2027" }],
80
+ ],
65
81
  ])("%s: %s", (_, folder, want) => {
66
82
  expect(venuesNamedBy(folder, VENUES)).toEqual(want);
67
83
  });
84
+ });
68
85
 
86
+ describe("venuesNamedBy — the paper's own names", () => {
69
87
  it("a name that is also the paper's own is not reported, whichever venue declares it", () => {
70
88
  // A paper at a venue whose own chain also says "ACM CCS" (two workshops of one conference).
71
89
  expect(venuesNamedBy("ccs-acm-ccs", VENUES, ["ACM CCS"])).toEqual([]);
72
- expect(venuesNamedBy("aisec-2026", VENUES, ["aisec"])).toEqual([]);
90
+ expect(
91
+ venuesNamedBy("aisec-2026", VENUES, ["aisec", "AISec 2026"]),
92
+ ).toEqual([]);
73
93
  });
74
94
 
75
95
  it("own names compare by their words, not their spelling", () => {
76
- expect(venuesNamedBy("acsac-2026", VENUES, ["ACSAC"])).toEqual([]);
96
+ expect(
97
+ venuesNamedBy("acsac-2026", VENUES, ["ACSAC", "acsac-2026"]),
98
+ ).toEqual([]);
77
99
  expect(venuesNamedBy("acm-ccs-x", VENUES, ["acm-ccs"])).toEqual([]);
78
100
  });
79
101
 
@@ -93,7 +115,7 @@ describe("venuesNamedBy — which venues a folder name names", () => {
93
115
  }),
94
116
  ),
95
117
  );
96
- const venues = shippedVenueNames({ files: nodeFiles, venuesDir: dir });
118
+ const venues = shippedFolderNames({ files: nodeFiles, venuesDir: dir });
97
119
  expect(venues.find((v) => v.label === "dash")?.aliases).toContain("—");
98
120
  expect(venuesNamedBy("agent-rule-drift", venues)).toEqual([]);
99
121
  expect(venuesNamedBy("dash-2026", venues)).toEqual([
@@ -107,13 +129,16 @@ describe("withoutVenues — the name with its venues taken out, when that is a n
107
129
  ["aisec-agent-drift", "agent-drift"],
108
130
  ["agent_drift.aisec", "agent-drift"],
109
131
  ["acm-ccs-agents", "agents"],
110
- ["realm-rules-aisec-2026", "rules-2026"],
132
+ // The edition takes its year with it.
133
+ ["realm-rules-aisec-2026", "rules"],
111
134
  ["--aisec--agents", "agents"],
112
135
  // Only numbers left: `2026` names no work.
113
136
  ["aisec-2026", null],
114
137
  ["aisec", null],
115
138
  // A venue glued to other words in one part is not cleanly taken out.
116
- ["aisec2026-agents", null],
139
+ ["aisec2026review-agents", null],
140
+ // The edition glued to its year is one venue name, taken out whole.
141
+ ["aisec2026-agents", "agents"],
117
142
  ["agent-rule-drift", "agent-rule-drift"],
118
143
  ])("%s → %s", (name, want) => {
119
144
  expect(withoutVenues(name, VENUES)).toBe(want);
@@ -33,7 +33,7 @@ function cycles(...raw: readonly object[]): readonly Cycle[] {
33
33
  }
34
34
  const ALPHA = {
35
35
  id: "alpha-2026",
36
- venue: { kind: "preset", extends: "paperlint:aisec" },
36
+ venue: { kind: "preset", extends: "paperlint:aisec-2026" },
37
37
  opened: "2026-06-01",
38
38
  submission: { id: 3 },
39
39
  outcome: {
@@ -457,7 +457,7 @@ describe("each version's state", () => {
457
457
  },
458
458
  {
459
459
  id: "gamma-2027",
460
- venue: { kind: "preset", extends: "paperlint:msr" },
460
+ venue: { kind: "preset", extends: "paperlint:msr-2027" },
461
461
  opened: "2026-10-01",
462
462
  },
463
463
  );
@@ -0,0 +1,164 @@
1
+ /**
2
+ * `paper/edition-over` (`src/edition-rule.ts`) on papers held in memory beside the SHIPPED presets,
3
+ * with the clock fixed: the warning when every deadline of the paper's edition has passed, naming
4
+ * the newer editions of its series; silence while one is still ahead, and with nothing to judge.
5
+ */
6
+ import { readdirSync, readFileSync } from "node:fs";
7
+ import { join } from "node:path";
8
+ import { describe, expect, it } from "vitest";
9
+ import { memoryFiles } from "./adapters/memory/index.ts";
10
+ import { presetsDir } from "./package-dirs.ts";
11
+ import {
12
+ EDITION_RULE_LEVELS,
13
+ editionRules,
14
+ judgeEdition,
15
+ } from "./edition-rule.ts";
16
+ import { venuePreset } from "../test/support.ts";
17
+
18
+ const VENUES = presetsDir();
19
+ const PAPERS = "/work/papers";
20
+ const shipped = Object.fromEntries(
21
+ readdirSync(VENUES)
22
+ .filter((f) => f.endsWith(".jsonc") || f.endsWith(".json"))
23
+ .map((f) => [join(VENUES, f), readFileSync(join(VENUES, f))]),
24
+ );
25
+
26
+ /** The rule over one paper's PIPELINE-STATUS.md at the instant `now`: each message, as ESLint words it. */
27
+ function lint(
28
+ settings: object,
29
+ now: string,
30
+ {
31
+ file = "PIPELINE-STATUS.md",
32
+ extra = {},
33
+ }: { file?: string; extra?: Record<string, string> } = {},
34
+ ): string[] {
35
+ const dir = `${PAPERS}/p`;
36
+ const files = memoryFiles({
37
+ ...shipped,
38
+ [`${dir}/paperlint.json`]: JSON.stringify(settings),
39
+ ...extra,
40
+ });
41
+ const rule = editionRules({ files, venuesDir: VENUES, now: () => now })[
42
+ "edition-over"
43
+ ];
44
+ const out: string[] = [];
45
+ rule
46
+ .create({
47
+ filename: `${dir}/${file}`,
48
+ sourceCode: { getLocFromIndex: () => ({ line: 1, column: 0 }) },
49
+ report: (d) => {
50
+ out.push(
51
+ Object.entries(d.data).reduce(
52
+ (m, [k, v]) => m.split(`{{${k}}}`).join(String(v)),
53
+ rule.meta.messages[d.messageId] ?? "",
54
+ ),
55
+ );
56
+ },
57
+ })
58
+ .root?.();
59
+ return out;
60
+ }
61
+
62
+ const reading = (what: string, at: string) => ({
63
+ what,
64
+ at,
65
+ source: "call",
66
+ url: "https://example.org/cfp",
67
+ read: "2026-11-19",
68
+ });
69
+
70
+ describe("paper/edition-over — every deadline of the edition has passed", () => {
71
+ it("🔴 the edition is over: warned once, naming the last deadline", () => {
72
+ expect(
73
+ lint(
74
+ { extends: "paperlint:aidc-2026", kind: "regular" },
75
+ "2027-01-01T00:00:00Z",
76
+ ),
77
+ ).toEqual([
78
+ 'AIDC 2026 is over: every deadline its preset records has passed, the last (camera-ready) at 2026-11-09T11:59:59Z. paperlint ships no newer edition of it yet; if the paper goes elsewhere, point "extends" at that venue',
79
+ ]);
80
+ });
81
+
82
+ it("🔴 a newer edition of the series ships: it is named", () => {
83
+ const own = `${PAPERS}/p/icse-2026.jsonc`;
84
+ const extra = {
85
+ [own]: JSON.stringify(
86
+ venuePreset("ICSE", {
87
+ extends: "paperlint:icse-2028",
88
+ deadlines: [reading("submission", "2025-07-02T11:59:59Z")],
89
+ }),
90
+ ),
91
+ };
92
+ expect(
93
+ lint({ extends: "./icse-2026.jsonc" }, "2026-11-19T00:00:00Z", { extra }),
94
+ ).toEqual([
95
+ 'ICSE 2026 is over: every deadline its preset records has passed, the last (submission) at 2025-07-02T11:59:59Z. paperlint ships a newer edition: paperlint:icse-2027, paperlint:icse-2028 — if the paper goes there, point "extends" at it',
96
+ ]);
97
+ });
98
+ });
99
+
100
+ describe("paper/edition-over — silent", () => {
101
+ it.each<[string, object, string]>([
102
+ [
103
+ "a deadline is still ahead",
104
+ { extends: "paperlint:aidc-2026", kind: "regular" },
105
+ "2026-11-01T00:00:00Z",
106
+ ],
107
+ [
108
+ "at the last deadline's very instant",
109
+ { extends: "paperlint:aidc-2026", kind: "regular" },
110
+ "2026-11-09T11:59:59Z",
111
+ ],
112
+ [
113
+ "an edition whose preset records no deadline",
114
+ { extends: "paperlint:agenticdev-2026", kind: "short" },
115
+ "2030-01-01T00:00:00Z",
116
+ ],
117
+ [
118
+ "a template family",
119
+ { extends: "paperlint:acm-sigconf" },
120
+ "2030-01-01T00:00:00Z",
121
+ ],
122
+ ["no extends", { extends: null }, "2030-01-01T00:00:00Z"],
123
+ [
124
+ "an extends that does not resolve — pdf/profile says so",
125
+ { extends: "paperlint:nope" },
126
+ "2030-01-01T00:00:00Z",
127
+ ],
128
+ ])("%s", (_, settings, now) => {
129
+ expect(lint(settings, now)).toEqual([]);
130
+ });
131
+
132
+ it("judged once per paper, on PIPELINE-STATUS.md only", () => {
133
+ expect(
134
+ lint({ extends: "paperlint:aidc-2026" }, "2030-01-01T00:00:00Z", {
135
+ file: "paper.tex",
136
+ }),
137
+ ).toEqual([]);
138
+ });
139
+
140
+ it("a preset of one's own without a year in its id: over, and no series to look up", () => {
141
+ expect(
142
+ judgeEdition(
143
+ {
144
+ id: "mine",
145
+ label: "Mine",
146
+ year: null,
147
+ deadlines: [
148
+ {
149
+ ...reading("submission", "2026-01-01T00:00:00Z"),
150
+ what: "submission",
151
+ source: "call",
152
+ },
153
+ ],
154
+ },
155
+ "2026-02-01T00:00:00Z",
156
+ ["mine-2027"],
157
+ ).map((f) => f.messageId),
158
+ ).toEqual(["overNoNewer"]);
159
+ });
160
+ });
161
+
162
+ it("the level: a warning — the move to another edition is the author's call", () => {
163
+ expect(EDITION_RULE_LEVELS).toEqual({ "paper/edition-over": "warn" });
164
+ });
@@ -0,0 +1,121 @@
1
+ /**
2
+ * `paper/edition-over` (warn) — the paper extends an edition whose every deadline has passed.
3
+ *
4
+ * A venue preset is one edition (`paperlint:icse-2028`), and a series is never an alias for the
5
+ * latest one, so a paper keeps its edition until its settings say otherwise. When every deadline the
6
+ * edition's preset records is in the past, the edition is over: the paper was submitted, or it is
7
+ * aimed at a cycle that has closed. The rule says so once per paper, and names the newer editions
8
+ * of the same series that paperlint ships, so moving to one is a one-line change of `extends`.
9
+ *
10
+ * ── WHERE "NOW" COMES FROM ───────────────────────────────────────────────────────
11
+ * The clock is a dependency (`now`, an ISO instant), read at the edge (`src/cli.ts`, as `paperlint
12
+ * versions` reads it) and fixed in tests; nothing here reads the clock itself.
13
+ *
14
+ * ── WHO SPEAKS WHEN THERE IS NOTHING TO JUDGE ───────────────────────────────────
15
+ * No `paperlint.json`, no `extends`, or one that does not resolve: silent, as for
16
+ * `paper/folder-venue-leftover`. An edition whose preset records no deadline: silent — nothing
17
+ * says when it ends.
18
+ */
19
+ import { basename, dirname } from "node:path";
20
+ import { sortBy } from "remeda";
21
+ import { editionLabel, editionOf, newerEditions } from "./domain/edition.ts";
22
+ import type { Reading } from "./domain/deadline.ts";
23
+ import type {
24
+ FolderRuleContext,
25
+ FolderRuleModule,
26
+ } from "./folder-venue-rule.ts";
27
+ import {
28
+ paperPreset,
29
+ shippedPresets,
30
+ shippedSpec,
31
+ type Preset,
32
+ } from "./presets.ts";
33
+ import type { Finding, VenueRuleDeps } from "./venue-rules.ts";
34
+
35
+ /** The file the rule reports on: one per paper folder. */
36
+ const STATUS_FILE = "PIPELINE-STATUS.md";
37
+
38
+ export interface EditionRuleDeps extends VenueRuleDeps {
39
+ /** The current instant, ISO 8601 in UTC (`2026-11-19T10:00:00.000Z`). */
40
+ readonly now: () => string;
41
+ }
42
+
43
+ /**
44
+ * The finding for an edition all of whose deadlines are before `now`, or none. `shipped` is every
45
+ * shipped preset's id: the newer editions of the series are named from it. Pure.
46
+ */
47
+ export function judgeEdition(
48
+ preset: Pick<Preset, "id" | "label" | "year" | "deadlines">,
49
+ now: string,
50
+ shipped: readonly string[],
51
+ ): readonly Finding[] {
52
+ const last = sortBy(preset.deadlines, (d: Reading) => Date.parse(d.at)).at(
53
+ -1,
54
+ );
55
+ if (last === undefined || Date.parse(last.at) >= Date.parse(now)) return [];
56
+ const edition = editionOf(preset.id);
57
+ const newer = edition === null ? [] : newerEditions(edition, shipped);
58
+ const data = {
59
+ venue: editionLabel(preset.label, preset.year),
60
+ what: last.what,
61
+ at: last.at,
62
+ };
63
+ return newer.length === 0
64
+ ? [{ messageId: "overNoNewer", data }]
65
+ : [
66
+ {
67
+ messageId: "over",
68
+ data: { ...data, newer: newer.map(shippedSpec).join(", ") },
69
+ },
70
+ ];
71
+ }
72
+
73
+ /** The finding for the paper folder `dir`; none when it has no resolved preset. */
74
+ function findingsFor(dir: string, deps: EditionRuleDeps): readonly Finding[] {
75
+ const p = paperPreset(dir, deps);
76
+ return p.kind === "resolved"
77
+ ? judgeEdition(p.preset, deps.now(), shippedPresets(deps.venuesDir))
78
+ : [];
79
+ }
80
+
81
+ const META: FolderRuleModule["meta"] = {
82
+ type: "suggestion",
83
+ docs: {
84
+ description:
85
+ "every deadline of the edition the paper extends has passed: the edition is over",
86
+ url: "https://github.com/zernie/paperlint/blob/main/docs/rules/paper/edition-over.md",
87
+ },
88
+ schema: [],
89
+ messages: {
90
+ over: '{{venue}} is over: every deadline its preset records has passed, the last ({{what}}) at {{at}}. paperlint ships a newer edition: {{newer}} — if the paper goes there, point "extends" at it',
91
+ overNoNewer:
92
+ '{{venue}} is over: every deadline its preset records has passed, the last ({{what}}) at {{at}}. paperlint ships no newer edition of it yet; if the paper goes elsewhere, point "extends" at that venue',
93
+ },
94
+ };
95
+
96
+ /** The rule, reading the paper's settings, the shipped presets and the clock through `deps`. */
97
+ export function editionRules(
98
+ deps: EditionRuleDeps,
99
+ ): Readonly<Record<"edition-over", FolderRuleModule>> {
100
+ return {
101
+ "edition-over": {
102
+ meta: META,
103
+ create(context: FolderRuleContext) {
104
+ if (basename(context.filename) !== STATUS_FILE) return {};
105
+ return {
106
+ root() {
107
+ const at = context.sourceCode.getLocFromIndex(0);
108
+ findingsFor(dirname(context.filename), deps).forEach((f) => {
109
+ context.report({ loc: { start: at, end: at }, ...f });
110
+ });
111
+ },
112
+ };
113
+ },
114
+ },
115
+ };
116
+ }
117
+
118
+ /** The level it is on at in paperlint's own config, for every paper's `PIPELINE-STATUS.md`. */
119
+ export const EDITION_RULE_LEVELS: Readonly<
120
+ Record<"paper/edition-over", "warn">
121
+ > = { "paper/edition-over": "warn" };
@@ -185,7 +185,7 @@ function setup(geometry: Geometry = NONE) {
185
185
  [PDF]: PDF_BYTES,
186
186
  ...SHIPPED_PRESETS,
187
187
  [`${PAPER}/paperlint.json`]: JSON.stringify({
188
- extends: "paperlint:agenticdev",
188
+ extends: "paperlint:agenticdev-2026",
189
189
  kind: "short",
190
190
  }),
191
191
  });
@@ -214,7 +214,7 @@ test("measure: venue and kind from paperlint.json, pdf relative to the paper, th
214
214
  );
215
215
  assert.deepEqual(
216
216
  [m.value.facts.venue, m.value.facts.kind],
217
- ["agenticdev", "short"],
217
+ ["agenticdev-2026", "short"],
218
218
  );
219
219
  const over = await measurePaper(PAPER, PDF, { ...o, venue: "aisec" });
220
220
  assert.equal(over.ok && over.value.facts.venue, "aisec");
@@ -282,9 +282,9 @@ test("declaredVenue: none without paperlint.json; no id when it extends no prese
282
282
  test("declaredVenue: the id is the preset's — its file name, not its display name — and an extends that resolves nowhere is refused", () => {
283
283
  const ok = memoryFiles({
284
284
  ...SHIPPED_PRESETS,
285
- [`${PAPER}/paperlint.json`]: '{"extends":"paperlint:aisec"}',
285
+ [`${PAPER}/paperlint.json`]: '{"extends":"paperlint:aisec-2026"}',
286
286
  });
287
- assert.equal(declaredVenue(ok, PAPER)?.id, "aisec");
287
+ assert.equal(declaredVenue(ok, PAPER)?.id, "aisec-2026");
288
288
  const typo = memoryFiles({
289
289
  ...SHIPPED_PRESETS,
290
290
  [`${PAPER}/paperlint.json`]: '{"extends":"paperlint:aisek"}',
package/src/facts-file.ts CHANGED
@@ -70,7 +70,7 @@ export const factsPath = (paperDir: string): string =>
70
70
 
71
71
  /** What the facts need from a paper's `paperlint.json`: its venue's preset id, its kind, where its PDF is. */
72
72
  export interface VenueDecl {
73
- /** The venue preset's id (`agenticdev`, never its display name), or null when the paper extends none. */
73
+ /** The venue preset's id (`agenticdev-2026`, never its display name), or null when the paper extends none. */
74
74
  readonly id: string | null;
75
75
  readonly kind: string | null;
76
76
  readonly pdf: string | null;
@@ -224,7 +224,7 @@ describe("declaredRoots — nothing to add", () => {
224
224
  });
225
225
 
226
226
  it("a shipped preset names no file", () => {
227
- expect(roots({ extends: "paperlint:aidc" })).toEqual([]);
227
+ expect(roots({ extends: "paperlint:aidc-2026" })).toEqual([]);
228
228
  });
229
229
  });
230
230
 
@@ -50,7 +50,7 @@ function rootOf(dir: string, p: string): string | null {
50
50
  return first === "" || first === ".." ? null : first;
51
51
  }
52
52
 
53
- /** A preset spec that names a file (`./venue.jsonc`), not a shipped preset (`paperlint:aidc`). */
53
+ /** A preset spec that names a file (`./venue.jsonc`), not a shipped preset (`paperlint:aidc-2026`). */
54
54
  const isPresetFile = (spec: string): boolean =>
55
55
  spec.startsWith("./") || spec.startsWith("../");
56
56