paperlint 17.3.0 → 18.1.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 (220) hide show
  1. package/.github/workflows/deadlines.yml +1 -1
  2. package/CONTRIBUTING.md +8 -5
  3. package/README.md +20 -19
  4. package/dist/adapters/hotcrp/index.d.ts +11 -1
  5. package/dist/adapters/hotcrp/index.d.ts.map +1 -1
  6. package/dist/adapters/hotcrp/index.js +11 -1
  7. package/dist/adapters/hotcrp/index.js.map +1 -1
  8. package/dist/adapters/hotcrp/site.d.ts.map +1 -1
  9. package/dist/adapters/hotcrp/site.js +3 -1
  10. package/dist/adapters/hotcrp/site.js.map +1 -1
  11. package/dist/adapters/hotcrp/token.d.ts +11 -0
  12. package/dist/adapters/hotcrp/token.d.ts.map +1 -1
  13. package/dist/adapters/hotcrp/token.js +34 -7
  14. package/dist/adapters/hotcrp/token.js.map +1 -1
  15. package/dist/adapters/latex/index.d.ts +1 -0
  16. package/dist/adapters/latex/index.d.ts.map +1 -1
  17. package/dist/adapters/latex/index.js +3 -0
  18. package/dist/adapters/latex/index.js.map +1 -1
  19. package/dist/adapters/latex/parse.d.ts +9 -0
  20. package/dist/adapters/latex/parse.d.ts.map +1 -1
  21. package/dist/adapters/latex/parse.js +12 -0
  22. package/dist/adapters/latex/parse.js.map +1 -1
  23. package/dist/adapters/latex/venue-lines.d.ts +10 -0
  24. package/dist/adapters/latex/venue-lines.d.ts.map +1 -0
  25. package/dist/adapters/latex/venue-lines.js +11 -0
  26. package/dist/adapters/latex/venue-lines.js.map +1 -0
  27. package/dist/build.d.ts +1 -1
  28. package/dist/build.d.ts.map +1 -1
  29. package/dist/cli.d.ts.map +1 -1
  30. package/dist/cli.js +21 -9
  31. package/dist/cli.js.map +1 -1
  32. package/dist/domain/body-pages.d.ts +1 -1
  33. package/dist/domain/body-pages.js +1 -1
  34. package/dist/domain/edition.d.ts +35 -0
  35. package/dist/domain/edition.d.ts.map +1 -0
  36. package/dist/domain/edition.js +64 -0
  37. package/dist/domain/edition.js.map +1 -0
  38. package/dist/domain/portal-token.d.ts +26 -10
  39. package/dist/domain/portal-token.d.ts.map +1 -1
  40. package/dist/domain/portal-token.js +19 -12
  41. package/dist/domain/portal-token.js.map +1 -1
  42. package/dist/edition-rule.d.ts +17 -0
  43. package/dist/edition-rule.d.ts.map +1 -0
  44. package/dist/edition-rule.js +90 -0
  45. package/dist/edition-rule.js.map +1 -0
  46. package/dist/facts-file.d.ts +1 -1
  47. package/dist/facts-file.d.ts.map +1 -1
  48. package/dist/folder-layout-rule.js +1 -1
  49. package/dist/folder-layout-rule.js.map +1 -1
  50. package/dist/folder-venue-rule.d.ts +1 -1
  51. package/dist/folder-venue-rule.d.ts.map +1 -1
  52. package/dist/folder-venue-rule.js +15 -6
  53. package/dist/folder-venue-rule.js.map +1 -1
  54. package/dist/heading-case.js +1 -1
  55. package/dist/ports/latex.d.ts +6 -1
  56. package/dist/ports/latex.d.ts.map +1 -1
  57. package/dist/ports/submission-portal.d.ts +7 -0
  58. package/dist/ports/submission-portal.d.ts.map +1 -1
  59. package/dist/preset-card-rule.d.ts.map +1 -1
  60. package/dist/preset-card-rule.js +2 -1
  61. package/dist/preset-card-rule.js.map +1 -1
  62. package/dist/presets.d.ts +26 -8
  63. package/dist/presets.d.ts.map +1 -1
  64. package/dist/presets.js +86 -19
  65. package/dist/presets.js.map +1 -1
  66. package/dist/submission.d.ts +3 -2
  67. package/dist/submission.d.ts.map +1 -1
  68. package/dist/submission.js +24 -12
  69. package/dist/submission.js.map +1 -1
  70. package/dist/tex-requirements.d.ts +0 -2
  71. package/dist/tex-requirements.d.ts.map +1 -1
  72. package/dist/tex-requirements.js +0 -1
  73. package/dist/tex-requirements.js.map +1 -1
  74. package/dist/tex-venue-rules.d.ts +19 -8
  75. package/dist/tex-venue-rules.d.ts.map +1 -1
  76. package/dist/tex-venue-rules.js +81 -21
  77. package/dist/tex-venue-rules.js.map +1 -1
  78. package/dist/venue-rules.js +1 -1
  79. package/dist/venue-rules.js.map +1 -1
  80. package/docs/configuration.md +7 -6
  81. package/docs/optional-rules.md +2 -2
  82. package/docs/prior-art/hotcrp-option-types.md +1 -1
  83. package/docs/rules/anonymity/identity.md +2 -2
  84. package/docs/rules/cycle/record.md +4 -4
  85. package/docs/rules/paper/edition-over.md +66 -0
  86. package/docs/rules/paper/folder-venue-leftover.md +22 -18
  87. package/docs/rules/pdf/body-size.md +6 -6
  88. package/docs/rules/talk/profile.md +3 -3
  89. package/docs/rules/tex/claim-emphasis.md +1 -1
  90. package/docs/rules/tex/contrast-frames.md +1 -1
  91. package/docs/rules/tex/heading-case.md +20 -20
  92. package/docs/rules/tex/negated-sentences.md +1 -1
  93. package/docs/rules/tex/relation-markers.md +1 -1
  94. package/docs/rules/tex/venue-leftover.md +82 -44
  95. package/docs/rules.md +37 -24
  96. package/docs/submission.md +31 -14
  97. package/docs/talk.md +2 -2
  98. package/docs/venues.md +85 -5
  99. package/fixtures/build-e2e/acmart/expect.json +1 -1
  100. package/fixtures/build-e2e/acmart/paperlint.json +1 -1
  101. package/fixtures/build-e2e/aidc/paperlint.json +1 -1
  102. package/fixtures/build-e2e/anon-ack/paperlint.json +1 -1
  103. package/fixtures/build-e2e/anon-author/paperlint.json +1 -1
  104. package/fixtures/build-e2e/anon-bib/paperlint.json +1 -1
  105. package/fixtures/build-e2e/anon-href/paperlint.json +1 -1
  106. package/fixtures/build-e2e/anon-macro/paperlint.json +1 -1
  107. package/fixtures/build-e2e/anon-pdfauthor/paperlint.json +1 -1
  108. package/fixtures/build-e2e/fallback/expect.json +1 -1
  109. package/fixtures/build-e2e/fse/expect.json +1 -1
  110. package/fixtures/build-e2e/fse/paperlint.json +1 -1
  111. package/fixtures/build-e2e/fse-over/expect.json +1 -1
  112. package/fixtures/build-e2e/fse-over/paperlint.json +1 -1
  113. package/fixtures/build-e2e/msr/paperlint.json +1 -1
  114. package/fixtures/build-e2e/msr-appendix-after/paperlint.json +1 -1
  115. package/lib/skill-checks.mjs +1 -1
  116. package/package.json +1 -1
  117. package/presets/acl-latex.jsonc +35 -0
  118. package/presets/acl-latex.md +40 -0
  119. package/presets/acm-acmsmall.md +1 -1
  120. package/presets/acm-sigconf.jsonc +1 -1
  121. package/presets/acm-sigconf.md +1 -1
  122. package/presets/acsac-2026.jsonc +19 -0
  123. package/presets/acsac-2026.md +46 -0
  124. package/presets/{agent.jsonc → agent-2027.jsonc} +14 -7
  125. package/presets/{agent.md → agent-2027.md} +10 -6
  126. package/presets/{agenticdev.jsonc → agenticdev-2026.jsonc} +6 -3
  127. package/presets/{agenticdev.md → agenticdev-2026.md} +5 -5
  128. package/presets/{agentverify.jsonc → agentverify-2027.jsonc} +10 -2
  129. package/presets/{agentverify.md → agentverify-2027.md} +9 -3
  130. package/presets/{aidc.jsonc → aidc-2026.jsonc} +12 -4
  131. package/presets/{aidc.md → aidc-2026.md} +8 -4
  132. package/presets/{aisec.jsonc → aisec-2026.jsonc} +7 -4
  133. package/presets/{aisec.md → aisec-2026.md} +7 -6
  134. package/presets/{ase.jsonc → ase-2026.jsonc} +9 -9
  135. package/presets/{ase.md → ase-2026.md} +8 -8
  136. package/presets/{ccs.jsonc → ccs-2026.jsonc} +4 -4
  137. package/presets/{ccs.md → ccs-2026.md} +4 -4
  138. package/presets/emnlp-2026.jsonc +21 -0
  139. package/presets/emnlp-2026.md +46 -0
  140. package/presets/{fse.jsonc → fse-2027.jsonc} +6 -7
  141. package/presets/{fse.md → fse-2027.md} +9 -9
  142. package/presets/icse-2027.jsonc +24 -0
  143. package/presets/icse-2027.md +53 -0
  144. package/presets/{icse.jsonc → icse-2028.jsonc} +8 -7
  145. package/presets/{icse.md → icse-2028.md} +9 -8
  146. package/presets/ieee-conference.jsonc +1 -1
  147. package/presets/ieee-conference.md +2 -2
  148. package/presets/{msr.jsonc → msr-2027.jsonc} +4 -5
  149. package/presets/{msr.md → msr-2027.md} +7 -7
  150. package/presets/{nlbse.jsonc → nlbse-2027.jsonc} +9 -1
  151. package/presets/{nlbse.md → nlbse-2027.md} +9 -3
  152. package/presets/{realm.jsonc → realm-2026.jsonc} +17 -27
  153. package/presets/{realm.md → realm-2026.md} +11 -4
  154. package/presets/{sp.jsonc → sp-2027.jsonc} +8 -8
  155. package/presets/{sp.md → sp-2027.md} +5 -5
  156. package/presets/tex/agenticdev.tex +1 -1
  157. package/presets/venue-profile.schema.json +28 -13
  158. package/scripts/refresh-deadlines/main.test.ts +4 -4
  159. package/scripts/refresh-deadlines/refresh.test.ts +9 -9
  160. package/skills/find-venue/SKILL.md +2 -2
  161. package/skills/find-venue/SKILL.md.spec.ts +1 -1
  162. package/skills/render-paper/extract-pdf-facts.harness.ts +2 -2
  163. package/skills/submit-paper/SKILL.md +7 -7
  164. package/skills/submit-paper/SKILL.md.spec.ts +6 -6
  165. package/src/adapters/hotcrp/cassette/README.md +1 -1
  166. package/src/adapters/hotcrp/index.ts +12 -0
  167. package/src/adapters/hotcrp/site.ts +4 -0
  168. package/src/adapters/hotcrp/token.test.ts +39 -1
  169. package/src/adapters/hotcrp/token.ts +40 -7
  170. package/src/adapters/latex/index.ts +3 -0
  171. package/src/adapters/latex/parse.ts +15 -0
  172. package/src/adapters/latex/venue-lines.ts +21 -0
  173. package/src/build.harness.mjs +5 -2
  174. package/src/build.ts +1 -1
  175. package/src/cli.test.ts +8 -6
  176. package/src/cli.ts +27 -9
  177. package/src/cycle-rules.test.ts +8 -6
  178. package/src/domain/body-pages.ts +1 -1
  179. package/src/domain/edition.ts +104 -0
  180. package/src/domain/portal-token.test.ts +121 -2
  181. package/src/domain/portal-token.ts +39 -15
  182. package/src/domain/submission-fields.test.ts +13 -10
  183. package/src/domain/venue-name.test.ts +41 -16
  184. package/src/domain/versions.test.ts +2 -2
  185. package/src/edition-rule.test.ts +164 -0
  186. package/src/edition-rule.ts +121 -0
  187. package/src/facts-file.test.ts +4 -4
  188. package/src/facts-file.ts +1 -1
  189. package/src/folder-layout-rule.test.ts +1 -1
  190. package/src/folder-layout-rule.ts +1 -1
  191. package/src/folder-venue-rule.test.ts +33 -11
  192. package/src/folder-venue-rule.ts +16 -7
  193. package/src/heading-case.test.ts +4 -4
  194. package/src/heading-case.ts +1 -1
  195. package/src/linted-set.test.ts +1 -1
  196. package/src/new-paper.test.ts +38 -25
  197. package/src/paper-files.test.ts +1 -1
  198. package/src/paper-settings-commands.test.ts +4 -4
  199. package/src/paper-settings.test.ts +16 -13
  200. package/src/ports/latex.ts +6 -0
  201. package/src/ports/submission-portal.ts +7 -0
  202. package/src/preset-card-rule.test.ts +30 -24
  203. package/src/preset-card-rule.ts +2 -1
  204. package/src/presets.test.ts +347 -70
  205. package/src/presets.ts +124 -31
  206. package/src/register-bands.test.ts +2 -2
  207. package/src/rule-cases.test.ts +26 -4
  208. package/src/submission-show.test.ts +4 -4
  209. package/src/submission-update.test.ts +1 -1
  210. package/src/submission.test.ts +99 -8
  211. package/src/submission.ts +28 -11
  212. package/src/talk-rules.test.ts +1 -1
  213. package/src/tex-requirements.harness.ts +2 -2
  214. package/src/tex-requirements.ts +2 -4
  215. package/src/tex-venue-rules.test.ts +187 -62
  216. package/src/tex-venue-rules.ts +129 -29
  217. package/src/venue-rules.test.ts +26 -23
  218. package/src/venue-rules.ts +1 -1
  219. package/src/versions-command.test.ts +2 -2
  220. package/templates/paper/paperlint.json +1 -1
package/src/cli.test.ts CHANGED
@@ -437,10 +437,10 @@ test("chooseVenue: a preset by path (inside and outside the paper), by prefixed
437
437
  const dir = join(root, "venues");
438
438
  writeTree(dir, {
439
439
  "papers/p/mine.jsonc": JSON.stringify(
440
- venuePreset("mine", { extends: "paperlint:agenticdev" }),
440
+ venuePreset("mine", { extends: "paperlint:agenticdev-2026" }),
441
441
  ),
442
442
  "shared/ours.jsonc": JSON.stringify(
443
- venuePreset("ours", { extends: "paperlint:agenticdev" }),
443
+ venuePreset("ours", { extends: "paperlint:agenticdev-2026" }),
444
444
  ),
445
445
  "shared/broken.jsonc": "{ nope",
446
446
  });
@@ -458,7 +458,7 @@ test("chooseVenue: a preset by path (inside and outside the paper), by prefixed
458
458
  const results = await Promise.all([
459
459
  choose("./papers/p/mine.jsonc"),
460
460
  choose("./shared/ours.jsonc"),
461
- choose("paperlint:agenticdev"),
461
+ choose("paperlint:agenticdev-2026"),
462
462
  choose("./shared/broken.jsonc"),
463
463
  ]);
464
464
  assert.deepEqual(
@@ -466,7 +466,7 @@ test("chooseVenue: a preset by path (inside and outside the paper), by prefixed
466
466
  [
467
467
  "./mine.jsonc",
468
468
  "../../shared/ours.jsonc",
469
- "paperlint:agenticdev",
469
+ "paperlint:agenticdev-2026",
470
470
  "--venue ./shared/broken.jsonc",
471
471
  ],
472
472
  );
@@ -645,7 +645,9 @@ test("build --dry-run on a paper with a venue plans for the preset's packages",
645
645
  "package.json": "{}",
646
646
  "papers/v/paper.tex":
647
647
  "\\documentclass{acmart}\\begin{document}x\\end{document}\n",
648
- "papers/v/paperlint.json": JSON.stringify({ extends: "paperlint:aisec" }),
648
+ "papers/v/paperlint.json": JSON.stringify({
649
+ extends: "paperlint:aisec-2026",
650
+ }),
649
651
  });
650
652
  const r = await withoutTex(dir, () =>
651
653
  cli(["build", "papers/v", "--dry-run"], dir),
@@ -967,7 +969,7 @@ const submissionPaper = (dir: string, site: string): void => {
967
969
  "package.json": "{}",
968
970
  "venue.jsonc": JSON.stringify(
969
971
  venuePreset("venue", {
970
- extends: "paperlint:aidc",
972
+ extends: "paperlint:aidc-2026",
971
973
  portal: { kind: "hotcrp", url: site },
972
974
  }),
973
975
  ),
package/src/cli.ts CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  paperBodies,
50
50
  type PaperBody,
51
51
  } from "./paper-includes.ts";
52
- import { omit } from "remeda";
52
+ import { hasAtLeast, omit } from "remeda";
53
53
  import { refusalOf } from "./unowned-file.ts";
54
54
  import { ruleTimes, timingLines } from "./lint-timing.ts";
55
55
  import { prepareEngine } from "./build-engine.ts";
@@ -129,9 +129,10 @@ import {
129
129
  presetProblemText,
130
130
  resolvePreset,
131
131
  resolveShipped,
132
+ bareSeriesText,
132
133
  shippedPresets,
133
134
  shippedSpec,
134
- shippedVenueNames,
135
+ shippedFolderNames,
135
136
  SHIPPED_PREFIX,
136
137
  type PaperPreset,
137
138
  type Preset,
@@ -185,6 +186,7 @@ export { nextSteps } from "./init.ts";
185
186
  import paperStages from "#eslint-rules/paper-stages";
186
187
  import preregCoverage from "#eslint-rules/prereg-coverage";
187
188
  import { CYCLE_RULE_LEVELS, cycleRules } from "./cycle-rules.ts";
189
+ import { EDITION_RULE_LEVELS, editionRules } from "./edition-rule.ts";
188
190
  import { changesRules } from "./changes-rule.ts";
189
191
  import { latexDiff, withTexBin } from "./adapters/latexdiff/index.ts";
190
192
  import { runVersions } from "./versions-command.ts";
@@ -254,6 +256,7 @@ import reviewFrontmatter from "#eslint-rules/review-frontmatter";
254
256
  import siblingFrontmatter from "#eslint-rules/sibling-frontmatter";
255
257
  import pdfRules from "#eslint-rules/pdf-last-page-balance";
256
258
  import { messageOf } from "./domain/text.ts";
259
+ import { editionsOf } from "./domain/edition.ts";
257
260
  import { isRecord } from "./domain/record.ts";
258
261
  import { ESCAPE_HATCH } from "./domain/paper-layout.ts";
259
262
 
@@ -362,9 +365,10 @@ submission:
362
365
  — and, for new, its "authors": [{ "name", "email", "affiliation"? }]. Its "fields" answer the
363
366
  form's own fields the preset records in "submission_fields" ({ "topics": [...], "pc_conflicts":
364
367
  { "<pc email>": "<type>" }, … }); new and update send them, checked first. The token comes only from
365
- the environment, one variable per site: HOTCRP_TOKEN_<subdomain> on *.hotcrp.com, else
366
- HOTCRP_TOKEN_<host and path> — e.g. HOTCRP_TOKEN_MSR2027 for msr2027.hotcrp.com,
367
- HOTCRP_TOKEN_AIDC_SUBMIT_ACSAC_ORG for aidc.submit.acsac.org (HotCRP: Account settings →
368
+ the environment: HOTCRP_TOKEN_HOTCRP_COM for every *.hotcrp.com site (an "All sites" token),
369
+ HOTCRP_TOKEN_<subdomain> to override it for one site, e.g. HOTCRP_TOKEN_MSR2027; a self-hosted
370
+ install only HOTCRP_TOKEN_<host and path>, e.g. HOTCRP_TOKEN_AIDC_SUBMIT_ACSAC_ORG for
371
+ aidc.submit.acsac.org, never the hotcrp.com one (HotCRP: Account settings →
368
372
  Developer). A plain HOTCRP_TOKEN is not read.
369
373
  [paper] the paper's folder; default the current directory
370
374
  --pdf <file> the PDF to compare (show) or send (update) instead of the paper's own
@@ -403,7 +407,7 @@ settings — paperlint.json, at two levels, one schema. Both are optional.
403
407
 
404
408
  <papersDir>/<paper>/paperlint.json — one paper, merged over the root file:
405
409
 
406
- { "extends": "paperlint:aisec", "kind": "research", "rules": { "pdf/last-page-balance": "error" } }
410
+ { "extends": "paperlint:aisec-2026", "kind": "research", "rules": { "pdf/last-page-balance": "error" } }
407
411
 
408
412
  "extends" names a venue preset: paperlint:<name> (shipped: ${SHIPPED_VENUES().join(", ")})
409
413
  or ./path.jsonc, relative to the paperlint.json. npm presets are not supported yet.
@@ -411,7 +415,7 @@ settings — paperlint.json, at two levels, one schema. Both are optional.
411
415
  cycles and deadlines — a paper's attempts at venues, oldest first, instead of "extends",
412
416
  "kind" and "submission" (those are then the current attempt's, and refused beside "cycles"):
413
417
 
414
- { "cycles": [ { "id": "msr-2027", "venue": { "kind": "preset", "extends": "paperlint:msr" },
418
+ { "cycles": [ { "id": "msr-2027", "venue": { "kind": "preset", "extends": "paperlint:msr-2027" },
415
419
  "kind": "technical", "opened": "2026-10-05",
416
420
  "deadlines": [ { "what": "submission",
417
421
  "observed": [ { "at": "2026-10-23 AoE", "source": "call",
@@ -617,6 +621,11 @@ export function buildConfig(
617
621
  rules: {
618
622
  ...paperStages.rules,
619
623
  ...folderVenueRules({ files: nodeFiles, venuesDir: presetsDir() }),
624
+ ...editionRules({
625
+ files: nodeFiles,
626
+ venuesDir: presetsDir(),
627
+ now: isoNow,
628
+ }),
620
629
  ...folderLayoutRules(LAYOUT_RULE_DEPS),
621
630
  },
622
631
  },
@@ -631,6 +640,7 @@ export function buildConfig(
631
640
  "paper/stages": "error",
632
641
  "paper/source": "error",
633
642
  ...FOLDER_VENUE_RULE_LEVELS,
643
+ ...EDITION_RULE_LEVELS,
634
644
  ...FOLDER_LAYOUT_RULE_LEVELS,
635
645
  ...REPRO_RULE_LEVELS,
636
646
  ...STATUS_CYCLE_RULE_LEVELS,
@@ -1701,7 +1711,7 @@ export async function createPaperAt(
1701
1711
  ): Promise<number> {
1702
1712
  const result = newPaper(papersRoot, name, {
1703
1713
  venue,
1704
- venues: allowVenueName ? [] : shippedVenueNames(PRESET_DEPS),
1714
+ venues: allowVenueName ? [] : shippedFolderNames(PRESET_DEPS),
1705
1715
  });
1706
1716
  const here = (p: string): string => shown(cwd, p);
1707
1717
  for (const line of reportNewPaper(result, here)) log(line);
@@ -1836,6 +1846,14 @@ function venueSpec(
1836
1846
  const name = venue.startsWith(SHIPPED_PREFIX)
1837
1847
  ? venue.slice(SHIPPED_PREFIX.length)
1838
1848
  : venue;
1849
+ const editions = editionsOf(name, shipped);
1850
+ if (!shipped.includes(name) && hasAtLeast(editions, 1))
1851
+ return bad(
1852
+ bareSeriesText(
1853
+ { kind: "bare-series", spec: shippedSpec(name), editions },
1854
+ "--venue",
1855
+ ),
1856
+ );
1839
1857
  if (!shipped.includes(name))
1840
1858
  return bad(
1841
1859
  `--venue ${venue}: no such venue preset. Shipped: ${shipped.join(", ")} — or a path to your own preset, starting with ./ or ../`,
@@ -2233,7 +2251,7 @@ async function runInit(
2233
2251
  paper: a.paper,
2234
2252
  createPaper: (papersRoot, name) =>
2235
2253
  createPaperAt(papersRoot, name, { log, err, cwd }),
2236
- venues: shippedVenueNames(PRESET_DEPS),
2254
+ venues: shippedFolderNames(PRESET_DEPS),
2237
2255
  tex: initTexLive(a, { log, err, cwd }),
2238
2256
  resolveCliPapers: (root: string): string | null =>
2239
2257
  cliPapers({ ...a, config: null }, root),
@@ -13,7 +13,7 @@ import { frozenText } from "../test/frozen-presets.ts";
13
13
  const VENUES = presetsDir();
14
14
  const DIR = "/work/papers/p";
15
15
  /**
16
- * The shipped presets, so a cycle naming `paperlint:msr` resolves through the memory files — msr
16
+ * The shipped presets, so a cycle naming `paperlint:msr-2027` resolves through the memory files — msr
17
17
  * FROZEN (test/frozen-presets.ts): its deadlines are rewritten by the scheduled refresh, and the
18
18
  * tests below assert the readings they sit beside.
19
19
  */
@@ -23,7 +23,7 @@ const SHIPPED = {
23
23
  .filter((f) => f.endsWith(".jsonc"))
24
24
  .map((f) => [join(VENUES, f), readFileSync(join(VENUES, f), "utf8")]),
25
25
  ),
26
- [join(VENUES, "msr.jsonc")]: frozenText("msr.jsonc"),
26
+ [join(VENUES, "msr-2027.jsonc")]: frozenText("msr-2027.jsonc"),
27
27
  };
28
28
 
29
29
  interface Reported {
@@ -68,10 +68,10 @@ const CALL = {
68
68
  url: "https://2027.msrconf.org/track/msr-2027-technical-papers",
69
69
  read: "2026-10-05",
70
70
  };
71
- /** A cycle at the shipped `paperlint:msr`, whose preset carries the portal's readings. */
71
+ /** A cycle at the shipped `paperlint:msr-2027`, whose preset carries the portal's readings. */
72
72
  const msr = (deadlines: readonly object[]) => ({
73
73
  id: "msr-2027",
74
- venue: { kind: "preset", extends: "paperlint:msr" },
74
+ venue: { kind: "preset", extends: "paperlint:msr-2027" },
75
75
  kind: "technical",
76
76
  opened: "2026-10-05",
77
77
  deadlines,
@@ -135,7 +135,9 @@ describe("cycle/record", () => {
135
135
  });
136
136
 
137
137
  it("the flat form, no settings file, or a file that is not JSON: silent — not this rule's to say", () => {
138
- expect(lint({ extends: "paperlint:aidc", kind: "regular" })).toEqual([]);
138
+ expect(lint({ extends: "paperlint:aidc-2026", kind: "regular" })).toEqual(
139
+ [],
140
+ );
139
141
  expect(lint(undefined)).toEqual([]);
140
142
  expect(lint("{ not json")).toEqual([]);
141
143
  });
@@ -218,7 +220,7 @@ describe("cycle/record — a portal reading beside the preset's", () => {
218
220
  ],
219
221
  });
220
222
  expect(fs.map((f) => f.message)).toEqual([
221
- "paperlint.json, cycle «msr-2027»: the \"submission\" deadline records a portal reading, and the preset paperlint:msr carries it (2026-10-21T11:59:59Z, the portal's reading on 2026-10-19 from https://msr2027.hotcrp.com/deadlines — venues move dates: re-check there before relying on it) — a second copy drifts when paperlint updates the preset: delete this one (the call's reading and an override stay)",
223
+ "paperlint.json, cycle «msr-2027»: the \"submission\" deadline records a portal reading, and the preset paperlint:msr-2027 carries it (2026-10-21T11:59:59Z, the portal's reading on 2026-10-19 from https://msr2027.hotcrp.com/deadlines — venues move dates: re-check there before relying on it) — a second copy drifts when paperlint updates the preset: delete this one (the call's reading and an override stay)",
222
224
  ]);
223
225
  });
224
226
 
@@ -3,7 +3,7 @@
3
3
  * classifies its pages. A venue that limits the body «excluding references and appendices» (AIDC)
4
4
  * cannot be judged on banal's body count: banal calls any page holding non-bibliography text body,
5
5
  * so an LLM Usage Statement or an appendix placed after the bibliography is counted as body, and a
6
- * correct paper fails (measured, `presets/aidc.jsonc`).
6
+ * correct paper fails (measured, `presets/aidc-2026.jsonc`).
7
7
  *
8
8
  * ── WHERE THE BODY ENDS: AT THE REFERENCES, OR AT THE APPENDIX, WHICHEVER COMES FIRST ──────
9
9
  * «Excluding references and appendices» excludes an appendix wherever it sits, so the body ends at
@@ -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
+ );
@@ -3,7 +3,13 @@ import assert from "node:assert/strict";
3
3
  import { test } from "vitest";
4
4
  import { hostOf, lookUpToken } from "./portal-token.ts";
5
5
 
6
- const NAMES = { variable: "HOTCRP_TOKEN_MSR2027", siteLess: "HOTCRP_TOKEN" };
6
+ const NAMES = {
7
+ variable: "HOTCRP_TOKEN_MSR2027",
8
+ shared: null,
9
+ siteOnly: (t: string) => t.startsWith("hct_"),
10
+ siteLess: "HOTCRP_TOKEN",
11
+ };
12
+ const HOSTED = { ...NAMES, shared: "HOTCRP_TOKEN_HOTCRP_COM" };
7
13
 
8
14
  test("hostOf: the URL's host; a text that is no URL stands for itself", () => {
9
15
  assert.equal(
@@ -36,6 +42,7 @@ test("🔴 lookUpToken: only the site-less variable set → refused by name, nev
36
42
  error: {
37
43
  kind: "site-less",
38
44
  variable: "HOTCRP_TOKEN_MSR2027",
45
+ shared: null,
39
46
  siteLess: "HOTCRP_TOKEN",
40
47
  },
41
48
  },
@@ -50,6 +57,118 @@ test("lookUpToken: neither set, or only blanks → missing, naming the site's va
50
57
  for (const read of [() => undefined, (n: string) => blank[n]])
51
58
  assert.deepEqual(lookUpToken(NAMES, read), {
52
59
  ok: false,
53
- error: { kind: "missing", variable: "HOTCRP_TOKEN_MSR2027" },
60
+ error: {
61
+ kind: "missing",
62
+ variable: "HOTCRP_TOKEN_MSR2027",
63
+ shared: null,
64
+ },
54
65
  });
55
66
  });
67
+
68
+ test("lookUpToken: a hosted site with only the shared variable set → the shared token, and its name", () => {
69
+ const env: Record<string, string> = {
70
+ HOTCRP_TOKEN_HOTCRP_COM: " hcT_all \n",
71
+ };
72
+ assert.deepEqual(
73
+ lookUpToken(HOSTED, (n) => env[n]),
74
+ {
75
+ ok: true,
76
+ value: { variable: "HOTCRP_TOKEN_HOTCRP_COM", token: "hcT_all" },
77
+ },
78
+ );
79
+ });
80
+
81
+ test("lookUpToken: a hosted site with both set → the site's own token wins", () => {
82
+ const env: Record<string, string> = {
83
+ HOTCRP_TOKEN_MSR2027: "hct_site",
84
+ HOTCRP_TOKEN_HOTCRP_COM: "hcT_all",
85
+ };
86
+ assert.deepEqual(
87
+ lookUpToken(HOSTED, (n) => env[n]),
88
+ {
89
+ ok: true,
90
+ value: { variable: "HOTCRP_TOKEN_MSR2027", token: "hct_site" },
91
+ },
92
+ );
93
+ });
94
+
95
+ test("lookUpToken: a hosted site with a blank own variable falls to the shared one", () => {
96
+ const env: Record<string, string> = {
97
+ HOTCRP_TOKEN_MSR2027: " ",
98
+ HOTCRP_TOKEN_HOTCRP_COM: "hcT_all",
99
+ };
100
+ assert.deepEqual(
101
+ lookUpToken(HOSTED, (n) => env[n]),
102
+ {
103
+ ok: true,
104
+ value: { variable: "HOTCRP_TOKEN_HOTCRP_COM", token: "hcT_all" },
105
+ },
106
+ );
107
+ });
108
+
109
+ test("🔴 lookUpToken: a site with no shared variable never reads it, set or not", () => {
110
+ const env: Record<string, string> = { HOTCRP_TOKEN_HOTCRP_COM: "hcT_all" };
111
+ const seen: string[] = [];
112
+ assert.deepEqual(
113
+ lookUpToken(NAMES, (n) => (seen.push(n), env[n])),
114
+ {
115
+ ok: false,
116
+ error: {
117
+ kind: "missing",
118
+ variable: "HOTCRP_TOKEN_MSR2027",
119
+ shared: null,
120
+ },
121
+ },
122
+ );
123
+ assert.deepEqual(seen, ["HOTCRP_TOKEN_MSR2027", "HOTCRP_TOKEN"]);
124
+ });
125
+
126
+ test("🔴 lookUpToken: a hosted site with only the site-less variable set → refused by name, shared named", () => {
127
+ const env: Record<string, string> = { HOTCRP_TOKEN: "hct_other" };
128
+ assert.deepEqual(
129
+ lookUpToken(HOSTED, (n) => env[n]),
130
+ {
131
+ ok: false,
132
+ error: {
133
+ kind: "site-less",
134
+ variable: "HOTCRP_TOKEN_MSR2027",
135
+ shared: "HOTCRP_TOKEN_HOTCRP_COM",
136
+ siteLess: "HOTCRP_TOKEN",
137
+ },
138
+ },
139
+ );
140
+ });
141
+
142
+ test("🔴 lookUpToken: a site-only token in the shared variable → refused, naming both variables, never used", () => {
143
+ const env: Record<string, string> = { HOTCRP_TOKEN_HOTCRP_COM: "hct_fake" };
144
+ assert.deepEqual(
145
+ lookUpToken(HOSTED, (n) => env[n]),
146
+ {
147
+ ok: false,
148
+ error: {
149
+ kind: "site-only",
150
+ variable: "HOTCRP_TOKEN_MSR2027",
151
+ shared: "HOTCRP_TOKEN_HOTCRP_COM",
152
+ },
153
+ },
154
+ );
155
+ });
156
+
157
+ test("lookUpToken: the same token in the site's own variable is used; an all-sites token in the shared one is used", () => {
158
+ const own: Record<string, string> = { HOTCRP_TOKEN_MSR2027: "hct_fake" };
159
+ assert.deepEqual(
160
+ lookUpToken(HOSTED, (n) => own[n]),
161
+ {
162
+ ok: true,
163
+ value: { variable: "HOTCRP_TOKEN_MSR2027", token: "hct_fake" },
164
+ },
165
+ );
166
+ const all: Record<string, string> = { HOTCRP_TOKEN_HOTCRP_COM: "hcT_fake" };
167
+ assert.deepEqual(
168
+ lookUpToken(HOSTED, (n) => all[n]),
169
+ {
170
+ ok: true,
171
+ value: { variable: "HOTCRP_TOKEN_HOTCRP_COM", token: "hcT_fake" },
172
+ },
173
+ );
174
+ });
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * WHICH TOKEN A PORTAL COMMAND USES — the policy, in one place. Pure.
3
3
  *
4
- * The site's own variable, and nothing else: there is NO fallback to a site-less variable. With one,
5
- * which token a command used is not visible, and a token from another site reads as "the portal
6
- * refused". A site-less variable that is set while the site's own is not is refused by name. The
7
- * names themselves are the portal's (`src/adapters/hotcrp/token.ts`).
4
+ * The site's own variable, then the one its portal's sites share (when it has one), and nothing else:
5
+ * there is NO fallback to a site-less variable. With one, which token a command used is not visible,
6
+ * and a token from another site reads as "the portal refused". A site-less variable that is set while
7
+ * neither of those is, is refused by name. The names themselves are the portal's
8
+ * (`src/adapters/hotcrp/token.ts`).
8
9
  */
9
10
  import { err, ok, type Result } from "./result.ts";
10
11
 
@@ -16,9 +17,15 @@ import { err, ok, type Result } from "./result.ts";
16
17
  export const hostOf = (url: string): string =>
17
18
  URL.canParse(url) ? new URL(url).host : url;
18
19
 
19
- /** The variables a lookup reads: the site's own, and the site-less one it refuses. */
20
+ /**
21
+ * The variables a lookup reads: the site's own, the one shared by the portal's sites (null: none),
22
+ * and the site-less one it refuses.
23
+ */
20
24
  export interface TokenNames {
21
25
  readonly variable: string;
26
+ readonly shared: string | null;
27
+ /** Whether a token is valid on one site only, so cannot stand in for the shared variable. */
28
+ readonly siteOnly: (token: string) => boolean;
22
29
  readonly siteLess: string;
23
30
  }
24
31
 
@@ -30,12 +37,23 @@ export interface FoundToken {
30
37
 
31
38
  /** Why there is no token to use. */
32
39
  export type TokenProblem =
33
- /** The site's variable is not set (or blank), and neither is the site-less one. */
34
- | { readonly kind: "missing"; readonly variable: string }
35
- /** The site's variable is not set, but the site-less one, no longer read, is. */
40
+ /** The site's variable is not set (or blank), nor the shared one, nor the site-less one. */
41
+ | {
42
+ readonly kind: "missing";
43
+ readonly variable: string;
44
+ readonly shared: string | null;
45
+ }
46
+ /** The shared variable holds a token that works on one site only. */
47
+ | {
48
+ readonly kind: "site-only";
49
+ readonly variable: string;
50
+ readonly shared: string;
51
+ }
52
+ /** Neither the site's variable nor the shared one is set, but the site-less one, no longer read, is. */
36
53
  | {
37
54
  readonly kind: "site-less";
38
55
  readonly variable: string;
56
+ readonly shared: string | null;
39
57
  readonly siteLess: string;
40
58
  };
41
59
 
@@ -48,16 +66,22 @@ const value = (
48
66
  };
49
67
 
50
68
  /**
51
- * The token for a portal, read through `read` (the root reads the environment): the site's variable
52
- * only. A set site-less variable never stands in for it — it is named as the problem instead.
69
+ * The token for a portal, read through `read` (the root reads the environment): the site's variable,
70
+ * else the shared one (unless that holds a token for one site only). A set site-less variable never stands in for either — it is named as the
71
+ * problem instead.
53
72
  */
54
73
  export function lookUpToken(
55
- { variable, siteLess }: TokenNames,
74
+ { variable, shared, siteOnly, siteLess }: TokenNames,
56
75
  read: (name: string) => string | undefined,
57
76
  ): Result<FoundToken, TokenProblem> {
58
- const token = value(read, variable);
59
- if (token !== null) return ok({ variable, token });
77
+ const own = value(read, variable);
78
+ if (own !== null) return ok({ variable, token: own });
79
+ const common = shared === null ? null : value(read, shared);
80
+ if (shared !== null && common !== null)
81
+ return siteOnly(common)
82
+ ? err({ kind: "site-only", variable, shared })
83
+ : ok({ variable: shared, token: common });
60
84
  return value(read, siteLess) === null
61
- ? err({ kind: "missing", variable })
62
- : err({ kind: "site-less", variable, siteLess });
85
+ ? err({ kind: "missing", variable, shared })
86
+ : err({ kind: "site-less", variable, shared, siteLess });
63
87
  }
@@ -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", () => {