paperlint 19.0.3 → 20.0.1

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 (38) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/cli.d.ts +7 -4
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +31 -18
  5. package/dist/cli.js.map +1 -1
  6. package/dist/domain/paper-stage.d.ts +20 -0
  7. package/dist/domain/paper-stage.d.ts.map +1 -0
  8. package/dist/domain/paper-stage.js +9 -0
  9. package/dist/domain/paper-stage.js.map +1 -0
  10. package/dist/eslint-rules/CLAUDE.md.spec.d.ts.map +1 -1
  11. package/dist/eslint-rules/CLAUDE.md.spec.js +1 -0
  12. package/dist/eslint-rules/CLAUDE.md.spec.js.map +1 -1
  13. package/dist/paper-files.d.ts +2 -1
  14. package/dist/paper-files.d.ts.map +1 -1
  15. package/dist/paper-files.js +1 -0
  16. package/dist/paper-files.js.map +1 -1
  17. package/dist/rules-config.d.ts +6 -0
  18. package/dist/rules-config.d.ts.map +1 -1
  19. package/dist/rules-config.js.map +1 -1
  20. package/dist/settled-paper.d.ts +6 -0
  21. package/dist/settled-paper.d.ts.map +1 -0
  22. package/dist/settled-paper.js +69 -0
  23. package/dist/settled-paper.js.map +1 -0
  24. package/docs/configuration.md +17 -3
  25. package/docs/rules/paper/edition-over.md +4 -3
  26. package/eslint-rules/CLAUDE.md +5 -1
  27. package/eslint-rules/CLAUDE.md.spec.ts +3 -0
  28. package/lib/skill-eval-kit.mjs +0 -14
  29. package/package.json +1 -2
  30. package/scripts/coverage-config.test.ts +0 -1
  31. package/src/cli.ts +39 -21
  32. package/src/domain/paper-stage.ts +25 -0
  33. package/src/paper-files.ts +8 -1
  34. package/src/paper-settings-commands.test.ts +13 -16
  35. package/src/rules-config.ts +8 -0
  36. package/src/settled-paper.test.ts +214 -0
  37. package/src/settled-paper.ts +78 -0
  38. package/lib/trigger-ledger.mjs +0 -215
@@ -1,11 +1,17 @@
1
1
  /** ESLint's severities, in both of its spellings. */
2
2
  export type Severity = "off" | "warn" | "error" | 0 | 1 | 2;
3
3
  export type RuleEntry = Severity | readonly [Severity, ...unknown[]];
4
+ /** The one linter option paperlint's own blocks set: a final paper's disable comments are not "unused". */
5
+ export type StageLinterOptions = Readonly<{
6
+ reportUnusedDisableDirectives: "off";
7
+ }>;
4
8
  /** One block of the `rules` key, parsed. `basePath` is the settings file's directory. */
5
9
  export interface RuleBlock {
6
10
  readonly basePath: string;
7
11
  readonly files?: readonly string[];
8
12
  readonly ignores?: readonly string[];
13
+ /** Set only by paperlint's own blocks (a paper's stage); `paperlint.json` cannot write it. */
14
+ readonly linterOptions?: StageLinterOptions;
9
15
  readonly rules: Readonly<Record<string, RuleEntry>>;
10
16
  }
11
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"rules-config.d.ts","sourceRoot":"","sources":["../src/rules-config.ts"],"names":[],"mappings":"AA8BA,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAErE,yFAAyF;AACzF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CA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CAAC,EAAE,CAAC;YACjE,IAAI,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBAAE,SAAS;YACvC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;gBAChD,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { Cycles } from "./domain/cycle.ts";
2
+ import type { Files } from "./ports/files.ts";
3
+ import type { RuleBlock } from "./rules-config.ts";
4
+ /** The blocks for the paper in `dir`, or none while it is being written. Reads the lock through `files`. */
5
+ export declare function stageBlocks(dir: string, cycles: Cycles | null, files: Files, shipped: ReadonlySet<string>): readonly RuleBlock[];
6
+ //# sourceMappingURL=settled-paper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settled-paper.d.ts","sourceRoot":"","sources":["../src/settled-paper.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAuBnD,4GAA4G;AAC5G,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAC3B,SAAS,SAAS,EAAE,CA2BtB"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The rule blocks a paper's stage adds (#583, #553).
3
+ *
4
+ * A rule judges its own subject and knows nothing about where a paper is in its life. Whether it
5
+ * should run on a paper that is done is a question about WHICH FILES a rule runs on, and in ESLint
6
+ * that is the config's question. So the stage (`src/domain/paper-stage.ts`) becomes blocks here, in
7
+ * the one place that already reads every paper's `paperlint.json` to build its blocks:
8
+ *
9
+ * accepted `paper/edition-over` off: the edition being over is where an accepted paper ends up
10
+ * final also every rule about the text and the build off on the paper's `.tex`: the published
11
+ * text and PDF are frozen in `versions/`, so "rebuild", "too long" or "not built yet" has
12
+ * nothing left to fix. The talk, the artifact and the records keep their rules
13
+ *
14
+ * The blocks go LAST, after the root `paperlint.json` and after the paper's own `rules`: a writing
15
+ * rule turned on while the paper was written, at either level, says nothing on its published text.
16
+ * Nothing turns a text rule back on for a final paper; the paper is worked on again in a new cycle,
17
+ * and an open cycle makes it `working`.
18
+ */
19
+ import { paperStage } from "./domain/paper-stage.js";
20
+ import { readLock } from "./versions.js";
21
+ /** The paper's own `.tex` files: `paper.tex` and the files it includes. Relative to the paper. */
22
+ const PAPER_TEX = "**/*.tex";
23
+ /**
24
+ * The plugins whose rules judge the paper's TEXT and its BUILD: what the frozen camera-ready already
25
+ * fixed. Only these go off on a final paper. The rest stay on, because freezing the PDF says nothing
26
+ * about them: the talk and the public artifact are still being delivered (`talk/*`, `artifact/*`),
27
+ * and the records are what a final paper is judged on (`cycle/*`, `versions/*`, `repro/*`,
28
+ * `study/*`). A list of what goes off, not of what stays, so a new plugin stays on until someone
29
+ * decides it judges the frozen text.
30
+ */
31
+ const FROZEN_TEXT_PLUGINS = [
32
+ "tex",
33
+ "bib",
34
+ "pdf",
35
+ "format",
36
+ "anonymity",
37
+ "paper",
38
+ ];
39
+ /** The blocks for the paper in `dir`, or none while it is being written. Reads the lock through `files`. */
40
+ export function stageBlocks(dir, cycles, files, shipped) {
41
+ if (cycles === null)
42
+ return [];
43
+ const lock = readLock(dir, files);
44
+ const stage = paperStage(cycles.current, lock?.ok ? lock.value : {});
45
+ if (stage === "working")
46
+ return [];
47
+ const accepted = {
48
+ basePath: dir,
49
+ rules: { "paper/edition-over": "off" },
50
+ };
51
+ if (stage === "accepted")
52
+ return [accepted];
53
+ const textOff = Object.fromEntries([...shipped]
54
+ .filter((id) => FROZEN_TEXT_PLUGINS.some((p) => id.startsWith(`${p}/`)))
55
+ .map((id) => [id, "off"]));
56
+ // A disable comment for a rule this block turns off suppresses nothing, and ESLint would report it
57
+ // as unused, and `--fix` would delete it from the published text: the trap `rulesOff` in cli.ts
58
+ // closes the same way.
59
+ return [
60
+ accepted,
61
+ {
62
+ basePath: dir,
63
+ files: [PAPER_TEX],
64
+ linterOptions: { reportUnusedDisableDirectives: "off" },
65
+ rules: textOff,
66
+ },
67
+ ];
68
+ }
69
+ //# sourceMappingURL=settled-paper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settled-paper.js","sourceRoot":"","sources":["../src/settled-paper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,kGAAkG;AAClG,MAAM,SAAS,GAAG,UAAU,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAsB;IAC7C,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,WAAW;IACX,OAAO;CACR,CAAC;AAEF,4GAA4G;AAC5G,MAAM,UAAU,WAAW,CACzB,GAAW,EACX,MAAqB,EACrB,KAAY,EACZ,OAA4B;IAE5B,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAClC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACrE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAc;QAC1B,QAAQ,EAAE,GAAG;QACb,KAAK,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE;KACvC,CAAC;IACF,IAAI,KAAK,KAAK,UAAU;QAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAChC,CAAC,GAAG,OAAO,CAAC;SACT,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SACvE,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,KAAc,CAAC,CAAC,CACrC,CAAC;IACF,mGAAmG;IACnG,gGAAgG;IAChG,uBAAuB;IACvB,OAAO;QACL,QAAQ;QACR;YACE,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,aAAa,EAAE,EAAE,6BAA6B,EAAE,KAAK,EAAE;YACvD,KAAK,EAAE,OAAO;SACf;KACF,CAAC;AACJ,CAAC"}
@@ -154,9 +154,23 @@ silently do nothing. The key list is `SETTINGS_KEYS` in `lib/paper-config.mjs`.
154
154
 
155
155
  **Where a paper's rules come from, in order — a later one wins, rule by rule:** paperlint's own
156
156
  configuration → the preset chain's `rules`, from the root preset to the one the paper extends →
157
- the root `paperlint.json`'s `rules` → the paper's own `rules`. So a venue can turn a rule on, the
158
- project can change that for every paper, and one paper can still change it for itself. Only rules
159
- paperlint ships may be named, at every level.
157
+ the root `paperlint.json`'s `rules` → the paper's own `rules` → the paper's stage. So a venue can
158
+ turn a rule on, the project can change that for every paper, one paper can still change it for
159
+ itself, and none of them reaches a published paper's text. Only rules paperlint ships may be named,
160
+ at every level.
161
+
162
+ **The paper's stage** is read from its `cycles` and `versions/lock.json`; nothing new is written
163
+ for it. An **accepted** paper turns `paper/edition-over` off: the edition being over is where an
164
+ accepted paper ends up. A **final** paper, accepted with its `<cycle>/camera-ready.pdf` frozen
165
+ (`paperlint versions lock`), also turns the rules about its text and build (`tex/*`, `bib/*`,
166
+ `pdf/*`, `format/*`, `anonymity/*`, `paper/*`) off on its `.tex`: the published text and PDF no
167
+ longer change, so "not built yet", "rebuild" or "too long" has nothing left to fix. Every other rule
168
+ stays on: the talk and the public artifact are still being delivered (`talk/*`, `artifact/*`), and
169
+ whether the frozen camera-ready came from what was accepted is a question only a final paper has
170
+ (`cycle/*`). A `% eslint-disable` comment in a final paper's text is not reported as unused, and
171
+ `--fix` leaves the published text as it is. A paper that is open, rejected or withdrawn is still
172
+ being written, and every rule applies. To work on a final paper's text again, open a new cycle: an
173
+ open cycle makes the paper a working one.
160
174
 
161
175
  ## The paper's cycles
162
176
 
@@ -53,9 +53,10 @@ of each shipped preset's id. The clock is read once per lint by `paperlint lint`
53
53
 
54
54
  ## How to fix
55
55
 
56
- Point `extends` at the edition the paper goes to next, or at another venue. A paper that stays with
57
- the finished edition on purpose — it was accepted there, and the repository is its record — turns
58
- the rule off in its `paperlint.json`:
56
+ Point `extends` at the edition the paper goes to next, or at another venue. A paper accepted at the
57
+ edition needs nothing: when its last cycle is `accepted`, paperlint turns this rule off for it
58
+ ([the paper's stage](../../configuration.md)). Any other paper that stays with the finished edition
59
+ on purpose — the repository is its record — turns the rule off in its `paperlint.json`:
59
60
 
60
61
  ```json
61
62
  {
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:a24e4a23a4caaf86 compiled from eslint-rules/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:f83563bacd9214c9 compiled from eslint-rules/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -44,6 +44,10 @@ the checks push every paper toward a blog post.
44
44
 
45
45
  **Guidance only** — A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.
46
46
 
47
+ ### The Config Decides Where A Rule Runs
48
+
49
+ **Guidance only** — A NEW decision about which files a rule runs on goes into the config, not into the rule. A rule judges its own subject wherever it is turned on; whether it applies to a paper at a given stage is a rule block the lint config builds (`paperRuleBlocks` in `src/cli.ts`): `files`, `ignores`, or a rule set to `off`, where a later block wins, as in ESLint. Example: a finished paper (accepted, camera-ready frozen) has its text and build rules turned off by `src/settled-paper.ts`, and no rule reads its cycles for that (#583, #553). Two older decisions still live inside rules and are not a precedent: `phase` set to `porting` silences the venue rules from inside them (`src/venue-rules.ts`), and the anonymity rules go quiet on an accepted cycle (`effectiveBlind`, `src/domain/cycle.ts`); #599 decides whether they move. The author decided this on 2026-11-23.
50
+
47
51
  ### A Rule Is Configured The Eslint Way
48
52
 
49
53
  **Guidance only** — Provisional, pending #599 (the author is not sure it is right). A rule's own switches (what to require, a threshold, a file to compare) come from its options where it is turned on: `["warn", { … }]`. A new rule is not on by default and silent until some key of `paperlint.json` is declared: that hides a check behind a setting nobody sees in the rule list. A fact several rules share about a paper (its venue, cycles, artifact, talk) reaches them through ESLint's `settings`, filled once by `buildConfig` from `paperlint.json`; a rule does not open `paperlint.json` itself. A rule whose subject IS `paperlint.json` (it validates the config) is exempt. Where an outside service varies (an artifact host, a portal), the rule reads a file of facts a command wrote and never the service; the services are adapters behind a port, as `src/ports/submission-portal.ts` and `src/adapters/hotcrp/` are, and eslint-plugin-import's `settings["import/resolver"]` is the ESLint precedent. About 25 existing rules predate this; #599 decides whether to move them, narrow this rule, or drop it and allow a rule to read `paperlint.json`. The author proposed this on 2026-11-21.
@@ -40,6 +40,9 @@ the checks push every paper toward a blog post.
40
40
  "lint-rule-over-script": guidance(
41
41
  "A check over a syntax tree is a lint rule, not a script. It fires in the editor on save, gets the AST for free, and has a suppression syntax people already know. A script is for corpus-wide questions — index connectivity, ratios across many files. When the work has to run a program, a script may do the work and write facts to a JSON file, and a rule judges that file: the verdict still lands in the engine.",
42
42
  ),
43
+ "the-config-decides-where-a-rule-runs": guidance(
44
+ "A NEW decision about which files a rule runs on goes into the config, not into the rule. A rule judges its own subject wherever it is turned on; whether it applies to a paper at a given stage is a rule block the lint config builds (`paperRuleBlocks` in `src/cli.ts`): `files`, `ignores`, or a rule set to `off`, where a later block wins, as in ESLint. Example: a finished paper (accepted, camera-ready frozen) has its text and build rules turned off by `src/settled-paper.ts`, and no rule reads its cycles for that (#583, #553). Two older decisions still live inside rules and are not a precedent: `phase` set to `porting` silences the venue rules from inside them (`src/venue-rules.ts`), and the anonymity rules go quiet on an accepted cycle (`effectiveBlind`, `src/domain/cycle.ts`); #599 decides whether they move. The author decided this on 2026-11-23.",
45
+ ),
43
46
  "a-rule-is-configured-the-eslint-way": guidance(
44
47
  'Provisional, pending #599 (the author is not sure it is right). A rule\'s own switches (what to require, a threshold, a file to compare) come from its options where it is turned on: `["warn", { … }]`. A new rule is not on by default and silent until some key of `paperlint.json` is declared: that hides a check behind a setting nobody sees in the rule list. A fact several rules share about a paper (its venue, cycles, artifact, talk) reaches them through ESLint\'s `settings`, filled once by `buildConfig` from `paperlint.json`; a rule does not open `paperlint.json` itself. A rule whose subject IS `paperlint.json` (it validates the config) is exempt. Where an outside service varies (an artifact host, a portal), the rule reads a file of facts a command wrote and never the service; the services are adapters behind a port, as `src/ports/submission-portal.ts` and `src/adapters/hotcrp/` are, and eslint-plugin-import\'s `settings["import/resolver"]` is the ESLint precedent. About 25 existing rules predate this; #599 decides whether to move them, narrow this rule, or drop it and allow a rule to read `paperlint.json`. The author proposed this on 2026-11-21.',
45
48
  ),
@@ -207,20 +207,6 @@ export async function runSkillTriggerEval(skill, opts = {}) {
207
207
  console.log(formatTriggerRateReport(report));
208
208
  if (report.n === 0) throw new Error("no runs executed");
209
209
 
210
- // Record that THIS description text was measured. Added 2026-08-28: before that recall was
211
- // a number obtained once — reword the description, and nobody catches the firing regression.
212
- // It is written AFTER the run and only when n > 0, otherwise the ledger would assert a
213
- // measurement that never happened.
214
- {
215
- const { recordRun } = await import("./trigger-ledger.mjs");
216
- recordRun(skill, {
217
- recall: report.rate ?? report.triggerRate ?? null,
218
- precision: report.precision ?? null,
219
- model,
220
- trials,
221
- });
222
- }
223
-
224
210
  // Machine-readable row, appended when asked. The printed report TRUNCATES each
225
211
  // prompt, so comparing two models' per-prompt outcomes off the text would match
226
212
  // on prefixes — fine until two prompts share one. This keeps the full prompt.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "19.0.3",
3
+ "version": "20.0.1",
4
4
  "description": "A linter for scientific papers written in LaTeX: catches mistakes before you submit to a conference or journal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -105,7 +105,6 @@
105
105
  "./lib/skill-corpus.mjs": "./lib/skill-corpus.mjs",
106
106
  "./lib/skill-eval-kit.mjs": "./lib/skill-eval-kit.mjs",
107
107
  "./lib/skill-trigger-cases.mjs": "./lib/skill-trigger-cases.mjs",
108
- "./lib/trigger-ledger.mjs": "./lib/trigger-ledger.mjs",
109
108
  "./lib/*.mjs": {
110
109
  "types": "./dist/lib/*.d.ts",
111
110
  "default": "./dist/lib/*.js"
@@ -451,7 +451,6 @@ test("the exclude list is exactly the justified set", () => {
451
451
  assert.deepEqual(CONFIG.evalOnly, [
452
452
  "lib/skill-eval-kit.mjs",
453
453
  "lib/skill-eval-fixture.ts",
454
- "lib/trigger-ledger.mjs",
455
454
  ]);
456
455
  });
457
456
 
package/src/cli.ts CHANGED
@@ -32,6 +32,7 @@ import {
32
32
  statSync,
33
33
  } from "node:fs";
34
34
  import { absolutePath } from "./domain/paths.ts";
35
+ import { isOk } from "./domain/result.ts";
35
36
  import { stripVTControlCharacters } from "node:util";
36
37
  import { fileURLToPath } from "node:url";
37
38
  import { join, dirname, resolve, relative, basename, sep } from "node:path";
@@ -142,6 +143,7 @@ import {
142
143
  scopeToOwned,
143
144
  } from "./paper-files.ts";
144
145
  import type { PaperScope } from "./paper-files.ts";
146
+ import { stageBlocks } from "./settled-paper.ts";
145
147
  import {
146
148
  paperPreset,
147
149
  settingsProblemLine,
@@ -1043,35 +1045,42 @@ const paperDirs = (paths: readonly string[]): readonly string[] =>
1043
1045
  * them. A file that does not parse, or names a rule paperlint does not ship, stops the run with one
1044
1046
  * line naming the file — the same strictness as the root's own `rules`.
1045
1047
  */
1046
- export function paperRuleBlocks(
1047
- paths: readonly string[],
1048
- ): Parsed<{ preset: RuleBlock[]; own: RuleBlock[] }> {
1049
- const papers = paperDirs(paths);
1050
- const out: { preset: RuleBlock[]; own: RuleBlock[] } = {
1051
- preset: [],
1052
- own: [],
1053
- };
1054
- for (const dir of papers) {
1048
+ export function paperRuleBlocks(paths: readonly string[]): Parsed<PaperBlocks> {
1049
+ const each = paperDirs(paths).map((dir): Parsed<PaperBlocks> => {
1055
1050
  const p = paperPreset(dir, PRESET_DEPS);
1056
- if (p.kind === "settings-problem")
1057
- return { ok: false, error: settingsProblemLine(dir, p.problem) };
1058
- const blocks = rulesOfPaper(dir, p);
1059
- if (!blocks.ok) return blocks;
1060
- out.preset.push(...blocks.value.preset);
1061
- out.own.push(...blocks.value.own);
1062
- }
1063
- return { ok: true, value: out };
1051
+ return p.kind === "settings-problem"
1052
+ ? { ok: false, error: settingsProblemLine(dir, p.problem) }
1053
+ : rulesOfPaper(dir, p);
1054
+ });
1055
+ const failed = each.find((r) => !r.ok);
1056
+ if (failed !== undefined) return failed;
1057
+ const all = each.filter(isOk).map((r) => r.value);
1058
+ return {
1059
+ ok: true,
1060
+ value: {
1061
+ preset: all.flatMap((b) => b.preset),
1062
+ stage: all.flatMap((b) => b.stage),
1063
+ own: all.flatMap((b) => b.own),
1064
+ },
1065
+ };
1066
+ }
1067
+
1068
+ /** One paper's blocks, in the order `lint` applies them around the root's (most general first). */
1069
+ interface PaperBlocks {
1070
+ readonly preset: readonly RuleBlock[];
1071
+ readonly stage: readonly RuleBlock[];
1072
+ readonly own: readonly RuleBlock[];
1064
1073
  }
1065
1074
 
1066
1075
  /**
1067
- * One paper's blocks: its preset chain's `rules`, and its own — either `{ id: severity }` over the
1076
+ * One paper's blocks: its preset chain's `rules`, the blocks its stage adds, and its own — either `{ id: severity }` over the
1068
1077
  * paper's files, or ESLint blocks with globs relative to the paper. A preset that does not resolve
1069
1078
  * contributes nothing here; `pdf/profile` reports it on the paper.
1070
1079
  */
1071
1080
  function rulesOfPaper(
1072
1081
  dir: string,
1073
1082
  p: Exclude<PaperPreset, { kind: "settings-problem" }>,
1074
- ): Parsed<{ preset: RuleBlock[]; own: RuleBlock[] }> {
1083
+ ): Parsed<PaperBlocks> {
1075
1084
  const { settings } = p;
1076
1085
  const fromPreset =
1077
1086
  p.kind === "resolved"
@@ -1100,7 +1109,13 @@ function rulesOfPaper(
1100
1109
  Object.keys(rules).length ? [{ basePath: dir, rules }] : [];
1101
1110
  return {
1102
1111
  ok: true,
1103
- value: { preset: scoped(fromPreset.value), own: [...own.value] },
1112
+ value: {
1113
+ preset: scoped(fromPreset.value),
1114
+ stage: [
1115
+ ...stageBlocks(dir, settings?.cycles ?? null, nodeFiles, SHIPPED_RULES),
1116
+ ],
1117
+ own: [...own.value],
1118
+ },
1104
1119
  };
1105
1120
  }
1106
1121
 
@@ -2715,7 +2730,9 @@ async function paperEslint(
2715
2730
  }>
2716
2731
  > {
2717
2732
  // The order, most general first so the most specific wins (ESLint: a later block wins): each
2718
- // paper's venue preset → the root paperlint.json → the paper's own paperlint.json.
2733
+ // paper's venue preset → the root paperlint.json → the paper's own paperlint.json → the paper's
2734
+ // stage (src/settled-paper.ts), last because a published text has nothing left to fix whoever
2735
+ // turned a writing rule on.
2719
2736
  const papers = paperRuleBlocks(paths);
2720
2737
  if (!papers.ok) return papers;
2721
2738
  const opts = {
@@ -2724,6 +2741,7 @@ async function paperEslint(
2724
2741
  ...papers.value.preset,
2725
2742
  ...(cfg.opts.rules ?? []),
2726
2743
  ...papers.value.own,
2744
+ ...papers.value.stage,
2727
2745
  ],
2728
2746
  };
2729
2747
 
@@ -0,0 +1,25 @@
1
+ /**
2
+ * How far a paper is, read from what paperlint already records: its `cycles` and the files its
3
+ * `versions/lock.json` holds frozen. Nothing new is written down to say a paper is done.
4
+ *
5
+ * working no cycle is accepted: the paper is being written, submitted or moved (open, rejected,
6
+ * withdrawn, none) — every rule applies
7
+ * accepted the last cycle is accepted and its camera-ready is still to come: the build is still
8
+ * changing, but the edition being over is the expected end, not a problem (#553)
9
+ * final accepted, and `<cycle>/camera-ready.pdf` is frozen: the published text and PDF no
10
+ * longer change, so nothing on the paper's `.tex` has anything left to fix (#583)
11
+ *
12
+ * The rules do not read this. The config does (`src/settled-paper.ts`): a stage decides which rules
13
+ * run on which files, the ESLint way, and each rule stays about its own subject.
14
+ */
15
+ import type { Current } from "./cycle.ts";
16
+ import { frozenKey, type Lock } from "./versions.ts";
17
+
18
+ export type PaperStage = "working" | "accepted" | "final";
19
+
20
+ /** The paper's stage from its current attempt and its lock. Pure. */
21
+ export function paperStage(current: Current, lock: Lock): PaperStage {
22
+ if (current.kind !== "accepted") return "working";
23
+ const key = frozenKey(current.cycle.id, "camera-ready", "pdf");
24
+ return lock[key]?.kind === "file" ? "final" : "accepted";
25
+ }
@@ -41,7 +41,12 @@
41
41
  * - `files: [["a", "b"]]` matches a file only when BOTH patterns match.
42
42
  */
43
43
  import { relative, sep } from "node:path";
44
- import type { ConfigBlock, RuleBlock, RuleEntry } from "./rules-config.ts";
44
+ import type {
45
+ ConfigBlock,
46
+ RuleBlock,
47
+ RuleEntry,
48
+ StageLinterOptions,
49
+ } from "./rules-config.ts";
45
50
 
46
51
  /**
47
52
  * Which papers' own files paperlint's blocks claim. `any` is the config's SHAPE, for the rule list and
@@ -122,6 +127,7 @@ export interface ScopedBlock {
122
127
  readonly basePath: string;
123
128
  readonly files?: readonly FilesEntry[];
124
129
  readonly ignores?: readonly string[];
130
+ readonly linterOptions?: StageLinterOptions;
125
131
  readonly rules: Readonly<Record<string, RuleEntry>>;
126
132
  }
127
133
 
@@ -276,6 +282,7 @@ function within(
276
282
  basePath: block.basePath,
277
283
  files,
278
284
  ...(ignores.length ? { ignores } : {}),
285
+ ...(block.linterOptions ? { linterOptions: block.linterOptions } : {}),
279
286
  rules,
280
287
  },
281
288
  ];
@@ -232,23 +232,20 @@ describe("paperlint lint — the venue preset's rules", () => {
232
232
  const cfgOf = await import("./cli.ts").then((m) =>
233
233
  m.paperRuleBlocks([join(root, "papers")]),
234
234
  );
235
- expect(cfgOf.ok && cfgOf.value).toEqual({
236
- preset: [
237
- {
238
- // Scoped to the paper by `basePath` alone: which of its files the rule reaches is decided
239
- // once, by narrowing to paperlint's owned scopes (#101), not by a copy of their globs.
240
- basePath: join(root, "papers/a"),
241
- rules: {
242
- "pdf/last-page-balance": ["error", { tolerancePt: 120 }],
243
- "tex/heading-case": [
244
- "error",
245
- { title: "chicago-headline", headings: "chicago-headline" },
246
- ],
247
- },
235
+ expect(cfgOf.ok && cfgOf.value.preset).toEqual([
236
+ {
237
+ // Scoped to the paper by `basePath` alone: which of its files the rule reaches is decided
238
+ // once, by narrowing to paperlint's owned scopes (#101), not by a copy of their globs.
239
+ basePath: join(root, "papers/a"),
240
+ rules: {
241
+ "pdf/last-page-balance": ["error", { tolerancePt: 120 }],
242
+ "tex/heading-case": [
243
+ "error",
244
+ { title: "chicago-headline", headings: "chicago-headline" },
245
+ ],
248
246
  },
249
- ],
250
- own: [],
251
- });
247
+ },
248
+ ]);
252
249
  });
253
250
 
254
251
  it("🔴 an unbuilt agenticdev paper: two warnings (pdf/measured, paper/sources-fresh), and no balance error", async () => {
@@ -32,11 +32,19 @@ import { RULE_SETS, setMembers } from "./rule-sets.ts";
32
32
  export type Severity = "off" | "warn" | "error" | 0 | 1 | 2;
33
33
  export type RuleEntry = Severity | readonly [Severity, ...unknown[]];
34
34
 
35
+ /** The one linter option paperlint's own blocks set: a final paper's disable comments are not "unused". */
36
+ // A type, not an interface: it must be assignable to `ConfigBlock`'s record of linter options.
37
+ export type StageLinterOptions = Readonly<{
38
+ reportUnusedDisableDirectives: "off";
39
+ }>;
40
+
35
41
  /** One block of the `rules` key, parsed. `basePath` is the settings file's directory. */
36
42
  export interface RuleBlock {
37
43
  readonly basePath: string;
38
44
  readonly files?: readonly string[];
39
45
  readonly ignores?: readonly string[];
46
+ /** Set only by paperlint's own blocks (a paper's stage); `paperlint.json` cannot write it. */
47
+ readonly linterOptions?: StageLinterOptions;
40
48
  readonly rules: Readonly<Record<string, RuleEntry>>;
41
49
  }
42
50