paperlint 7.1.0 → 7.2.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.
- package/.github/workflows/ci.yml +3 -0
- package/.github/workflows/deadlines.yml +100 -0
- package/README.md +6 -0
- package/dist/adapters/hotcrp/deadlines.d.ts +8 -0
- package/dist/adapters/hotcrp/deadlines.d.ts.map +1 -0
- package/dist/adapters/hotcrp/deadlines.io.d.ts +6 -0
- package/dist/adapters/hotcrp/deadlines.io.d.ts.map +1 -0
- package/dist/adapters/hotcrp/deadlines.io.js +26 -0
- package/dist/adapters/hotcrp/deadlines.io.js.map +1 -0
- package/dist/adapters/hotcrp/deadlines.js +134 -0
- package/dist/adapters/hotcrp/deadlines.js.map +1 -0
- package/dist/adapters/hotcrp/index.d.ts +2 -0
- package/dist/adapters/hotcrp/index.d.ts.map +1 -1
- package/dist/adapters/hotcrp/index.js +2 -0
- package/dist/adapters/hotcrp/index.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +40 -5
- package/dist/cli.js.map +1 -1
- package/dist/cycle-rules.d.ts +24 -0
- package/dist/cycle-rules.d.ts.map +1 -0
- package/dist/cycle-rules.js +212 -0
- package/dist/cycle-rules.js.map +1 -0
- package/dist/domain/cycle.d.ts +148 -0
- package/dist/domain/cycle.d.ts.map +1 -0
- package/dist/domain/cycle.js +281 -0
- package/dist/domain/cycle.js.map +1 -0
- package/dist/domain/deadline.d.ts +128 -0
- package/dist/domain/deadline.d.ts.map +1 -0
- package/dist/domain/deadline.js +281 -0
- package/dist/domain/deadline.js.map +1 -0
- package/dist/eslint-rules/cycle-stage.d.ts +39 -0
- package/dist/eslint-rules/cycle-stage.d.ts.map +1 -0
- package/dist/eslint-rules/cycle-stage.js +119 -0
- package/dist/eslint-rules/cycle-stage.js.map +1 -0
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +2 -0
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/paper-settings.d.ts +7 -0
- package/dist/paper-settings.d.ts.map +1 -1
- package/dist/paper-settings.js +61 -8
- package/dist/paper-settings.js.map +1 -1
- package/dist/ports/venue-deadlines.d.ts +14 -0
- package/dist/ports/venue-deadlines.d.ts.map +1 -0
- package/dist/ports/venue-deadlines.js +2 -0
- package/dist/ports/venue-deadlines.js.map +1 -0
- package/dist/presets.d.ts +12 -0
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +19 -11
- package/dist/presets.js.map +1 -1
- package/dist/submission.d.ts +8 -0
- package/dist/submission.d.ts.map +1 -1
- package/dist/submission.js +41 -10
- package/dist/submission.js.map +1 -1
- package/dist/tex-requirements.d.ts +3 -0
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +19 -0
- package/dist/tex-requirements.js.map +1 -1
- package/dist/tex-venue-rules.d.ts +19 -0
- package/dist/tex-venue-rules.d.ts.map +1 -1
- package/dist/tex-venue-rules.js +69 -0
- package/dist/tex-venue-rules.js.map +1 -1
- package/dist/venue-rules.d.ts +10 -0
- package/dist/venue-rules.d.ts.map +1 -1
- package/dist/venue-rules.js +26 -10
- package/dist/venue-rules.js.map +1 -1
- package/docs/configuration.md +139 -11
- package/docs/rules/cycle/evidence.md +87 -0
- package/docs/rules/cycle/port-done.md +75 -0
- package/docs/rules/cycle/record.md +152 -0
- package/docs/rules/cycle/stage.md +85 -0
- package/docs/rules.md +48 -43
- package/docs/submission.md +5 -0
- package/eslint-rules/cycle-stage.test.mjs +131 -0
- package/eslint-rules/cycle-stage.ts +141 -0
- package/eslint.config.mjs +41 -1
- package/lib/paper-config.ts +3 -0
- package/package.json +1 -1
- package/presets/aidc.jsonc +24 -3
- package/presets/aidc.md +6 -3
- package/presets/msr.jsonc +25 -1
- package/presets/msr.md +5 -1
- package/presets/venue-profile.schema.json +39 -0
- package/scripts/check.ts +4 -0
- package/scripts/refresh-deadlines.test.ts +431 -0
- package/scripts/refresh-deadlines.ts +387 -0
- package/src/adapters/hotcrp/cassette/README.md +22 -0
- package/src/adapters/hotcrp/cassette/deadlines-aidc26.html +17 -0
- package/src/adapters/hotcrp/cassette/deadlines-fse2027.html +24 -0
- package/src/adapters/hotcrp/cassette/deadlines-icse2027.html +25 -0
- package/src/adapters/hotcrp/cassette/deadlines-msr2027.html +25 -0
- package/src/adapters/hotcrp/cassette/deadlines-nosuch.html +18 -0
- package/src/adapters/hotcrp/cassette/deadlines-sosp26.html +26 -0
- package/src/adapters/hotcrp/deadlines.io.test.ts +86 -0
- package/src/adapters/hotcrp/deadlines.io.ts +27 -0
- package/src/adapters/hotcrp/deadlines.test.ts +170 -0
- package/src/adapters/hotcrp/deadlines.ts +161 -0
- package/src/adapters/hotcrp/index.ts +2 -0
- package/src/cli.test.ts +9 -0
- package/src/cli.ts +43 -4
- package/src/cycle-rules.test.ts +278 -0
- package/src/cycle-rules.ts +273 -0
- package/src/domain/cycle.test.ts +456 -0
- package/src/domain/cycle.ts +432 -0
- package/src/domain/deadline.test.ts +386 -0
- package/src/domain/deadline.ts +472 -0
- package/src/new-paper.test.ts +1 -0
- package/src/paper-settings.test.ts +167 -0
- package/src/paper-settings.ts +85 -11
- package/src/ports/venue-deadlines.ts +14 -0
- package/src/presets.test.ts +105 -0
- package/src/presets.ts +43 -10
- package/src/rule-cases.test.ts +144 -0
- package/src/submission.test.ts +105 -1
- package/src/submission.ts +73 -12
- package/src/tex-requirements.ts +31 -0
- package/src/tex-venue-rules.test.ts +76 -0
- package/src/tex-venue-rules.ts +85 -0
- package/src/venue-rules.test.ts +82 -0
- package/src/venue-rules.ts +44 -12
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A VENUE'S DEADLINE — what each page said about it, and which instant binds.
|
|
3
|
+
*
|
|
4
|
+
* One entry per deadline of an attempt, in a cycle's `deadlines`:
|
|
5
|
+
*
|
|
6
|
+
* {
|
|
7
|
+
* "what": "submission",
|
|
8
|
+
* "observed": [
|
|
9
|
+
* { "at": "2026-10-20T04:00:00Z", "source": "portal", "url": "…/deadlines", "read": "2026-10-05" },
|
|
10
|
+
* { "at": "2026-10-23 AoE", "source": "call", "url": "…/cfp", "read": "2026-10-05" }
|
|
11
|
+
* ],
|
|
12
|
+
* "override": { "at": "2026-10-27T04:00:00Z", "reason": "…", "evidence": "mail/extension.eml" }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* ── OBSERVED, THEN OVERRIDDEN ──────────────────────────────────────────────────────────
|
|
16
|
+
* A READING is what one page said on one day: its instant, whether the page was the portal (which
|
|
17
|
+
* refuses the upload) or the call (which only announces), where, and when it was read. The portal
|
|
18
|
+
* and the call often disagree — an AoE day in a call is a day after the portal's UTC instant, and a
|
|
19
|
+
* HotCRP "submissions must be completed by" can fall on the call's abstract day — so both are kept,
|
|
20
|
+
* and the EARLIER binds: the safe reading of two. An OVERRIDE is a human decision that another
|
|
21
|
+
* instant binds (the chairs extended by mail); it wins, and it carries its reason and a file as
|
|
22
|
+
* evidence, so it is never a silent edit of a reading.
|
|
23
|
+
*
|
|
24
|
+
* ── THE WORDS ───────────────────────────────────────────────────────────────────────────
|
|
25
|
+
* A call says "abstract" and "paper"; HotCRP says registration, submission and resubmission. Here:
|
|
26
|
+
* `registration` is the abstract registration (a call's "abstract" date), `submission` the full paper
|
|
27
|
+
* (a call's "paper" date, HotCRP's "submissions must be completed by"), `resubmission` the updates a
|
|
28
|
+
* portal allows to a completed submission. Recorded honestly, a call's "paper" day and a portal's
|
|
29
|
+
* earlier "submission" cutoff are two readings of ONE deadline, and the earlier binds.
|
|
30
|
+
*
|
|
31
|
+
* Parsed by hand: the domain imports no schema library (see `src/CLAUDE.md`). Every object in the
|
|
32
|
+
* record refuses a key it does not know: an `override` typed under another name would otherwise look
|
|
33
|
+
* recorded and not be in force.
|
|
34
|
+
*/
|
|
35
|
+
import { err, ok } from "./result.js";
|
|
36
|
+
import { isRecord } from "./record.js";
|
|
37
|
+
/** The kinds, in the order a venue's deadlines keep. */
|
|
38
|
+
export const DEADLINE_WHATS = [
|
|
39
|
+
"registration",
|
|
40
|
+
"submission",
|
|
41
|
+
"resubmission",
|
|
42
|
+
"notification",
|
|
43
|
+
"camera-ready",
|
|
44
|
+
];
|
|
45
|
+
/** What each kind is, in a call's words where they differ — said in every message that names the kinds. */
|
|
46
|
+
export const WHAT_MEANS = {
|
|
47
|
+
registration: 'abstract registration: a call\'s "abstract" date',
|
|
48
|
+
submission: 'the full paper: a call\'s "paper" date',
|
|
49
|
+
resubmission: "updates to a completed submission",
|
|
50
|
+
notification: null,
|
|
51
|
+
"camera-ready": null,
|
|
52
|
+
};
|
|
53
|
+
// ── instants ───────────────────────────────────────────────────────────────────────────
|
|
54
|
+
const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
55
|
+
export const isIsoDate = (v) => typeof v === "string" && ISO_DATE.test(v) && !Number.isNaN(Date.parse(v));
|
|
56
|
+
const asInstant = (ms) => new Date(ms).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
57
|
+
/** Unix seconds → the instant, in UTC. */
|
|
58
|
+
export const instantOfUnix = (seconds) => asInstant(seconds * 1000);
|
|
59
|
+
/** The forms `at` takes, for every message that refuses one. */
|
|
60
|
+
const INSTANT_FORMS = `an instant with its zone (2026-10-20T04:00:00Z) or a call's "YYYY-MM-DD AoE"`;
|
|
61
|
+
/**
|
|
62
|
+
* An ISO instant with its zone (`Z` or `±hh:mm`), or a call's `YYYY-MM-DD AoE`; normalised to UTC.
|
|
63
|
+
* A bare date or a zoneless time is refused: it is the deadline people get wrong.
|
|
64
|
+
*/
|
|
65
|
+
export function instantOf(text) {
|
|
66
|
+
const bad = err(`"${text}" must be an instant with its zone (2026-10-20T04:00:00Z, 2026-10-20T09:00:00+05:00) or a call's "YYYY-MM-DD AoE"`);
|
|
67
|
+
const aoe = /^(\d{4}-\d{2}-\d{2}) AoE$/i.exec(text.trim());
|
|
68
|
+
if (aoe) {
|
|
69
|
+
const day = String(aoe[1]); // the group always participates in a match
|
|
70
|
+
// The end of that day at UTC−12: 23:59:59 there is 11:59:59 UTC of the next day.
|
|
71
|
+
const ms = Date.parse(`${day}T23:59:59-12:00`);
|
|
72
|
+
return Number.isNaN(ms) ? bad : ok(asInstant(ms));
|
|
73
|
+
}
|
|
74
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(Z|[+-]\d{2}:\d{2})$/.test(text))
|
|
75
|
+
return bad;
|
|
76
|
+
const ms = Date.parse(text);
|
|
77
|
+
return Number.isNaN(ms) ? bad : ok(asInstant(ms));
|
|
78
|
+
}
|
|
79
|
+
// ── parsing ────────────────────────────────────────────────────────────────────────────
|
|
80
|
+
/** The first key of `v` that is not in `known`, as the refusal naming it; null when there is none. */
|
|
81
|
+
export const unknownKey = (v, known, at, whose) => {
|
|
82
|
+
const k = Object.keys(v).find((x) => !known.includes(x));
|
|
83
|
+
return k === undefined
|
|
84
|
+
? null
|
|
85
|
+
: `${at}: unknown key "${k}" — ${whose} keys: ${known.join(", ")}`;
|
|
86
|
+
};
|
|
87
|
+
/** `v[key]` as an instant, or the refusal naming the key and both forms. */
|
|
88
|
+
const instantField = (v, key, at) => {
|
|
89
|
+
const text = v[key];
|
|
90
|
+
const instant = typeof text === "string" ? instantOf(text) : err("not a string");
|
|
91
|
+
return instant.ok
|
|
92
|
+
? instant
|
|
93
|
+
: err(`${at}: "${key}" must be ${INSTANT_FORMS}, got ${JSON.stringify(text)}`);
|
|
94
|
+
};
|
|
95
|
+
const nonEmpty = (v) => typeof v === "string" && v !== "";
|
|
96
|
+
const READING_KEYS = ["at", "source", "url", "read"];
|
|
97
|
+
/** `source`, `url` and `read` of a reading: where and when it was read. */
|
|
98
|
+
function provenance(v, at) {
|
|
99
|
+
const { source, url, read } = v;
|
|
100
|
+
if (source !== "portal" && source !== "call")
|
|
101
|
+
return err(`${at}: "source" must be "portal" or "call", got ${JSON.stringify(source)} — a deadline moved by mail is an "override", with the mail as its "evidence"`);
|
|
102
|
+
if (!nonEmpty(url))
|
|
103
|
+
return err(`${at}: "url" must be where the deadline was read`);
|
|
104
|
+
if (!isIsoDate(read))
|
|
105
|
+
return err(`${at}: "read" must be the day the page was read, YYYY-MM-DD`);
|
|
106
|
+
return ok({ source, url, read });
|
|
107
|
+
}
|
|
108
|
+
function parseObservation(v, at) {
|
|
109
|
+
if (!isRecord(v))
|
|
110
|
+
return err(`${at}: a reading must be { "at", "source", "url", "read" }`);
|
|
111
|
+
const unknown = unknownKey(v, READING_KEYS, at, "a reading's");
|
|
112
|
+
if (unknown !== null)
|
|
113
|
+
return err(unknown);
|
|
114
|
+
const instant = instantField(v, "at", at);
|
|
115
|
+
if (!instant.ok)
|
|
116
|
+
return instant;
|
|
117
|
+
const rest = provenance(v, at);
|
|
118
|
+
return rest.ok ? ok({ at: instant.value, ...rest.value }) : rest;
|
|
119
|
+
}
|
|
120
|
+
/** Each item of a list through `one`; the first refusal, naming its index. */
|
|
121
|
+
function eachOf(list, at, one) {
|
|
122
|
+
return list.reduce((acc, v, i) => {
|
|
123
|
+
if (!acc.ok)
|
|
124
|
+
return acc;
|
|
125
|
+
const p = one(v, `${at}[${String(i)}]`);
|
|
126
|
+
return p.ok ? ok([...acc.value, p.value]) : p;
|
|
127
|
+
}, ok([]));
|
|
128
|
+
}
|
|
129
|
+
/** The readings of one deadline: at most one per source — a re-read replaces the earlier one. */
|
|
130
|
+
function parseObserved(v, at) {
|
|
131
|
+
if (v === undefined)
|
|
132
|
+
return ok([]);
|
|
133
|
+
if (!Array.isArray(v))
|
|
134
|
+
return err(`${at}: "observed" must be a list of readings { "at", "source", "url", "read" }`);
|
|
135
|
+
const list = eachOf(v, `${at}.observed`, parseObservation);
|
|
136
|
+
if (!list.ok)
|
|
137
|
+
return list;
|
|
138
|
+
const twice = ["portal", "call"].find((s) => list.value.filter((o) => o.source === s).length > 1);
|
|
139
|
+
return twice === undefined
|
|
140
|
+
? list
|
|
141
|
+
: err(`${at}: two "${twice}" readings — keep one per source, the latest (its "read" says when)`);
|
|
142
|
+
}
|
|
143
|
+
const OVERRIDE_KEYS = ["at", "reason", "evidence"];
|
|
144
|
+
function parseOverride(v, at) {
|
|
145
|
+
if (v === undefined)
|
|
146
|
+
return ok(null);
|
|
147
|
+
if (!isRecord(v))
|
|
148
|
+
return err(`${at}: "override" must be { "at", "reason", "evidence" }`);
|
|
149
|
+
const where = `${at}.override`;
|
|
150
|
+
const unknown = unknownKey(v, OVERRIDE_KEYS, where, "an override's");
|
|
151
|
+
if (unknown !== null)
|
|
152
|
+
return err(unknown);
|
|
153
|
+
const instant = instantField(v, "at", where);
|
|
154
|
+
if (!instant.ok)
|
|
155
|
+
return instant;
|
|
156
|
+
const { reason, evidence } = v;
|
|
157
|
+
if (!nonEmpty(reason))
|
|
158
|
+
return err(`${where}: "reason" must say why this instant binds rather than the readings (the chairs extended it by mail, …)`);
|
|
159
|
+
return nonEmpty(evidence)
|
|
160
|
+
? ok({ at: instant.value, reason, evidence })
|
|
161
|
+
: err(`${where}: "evidence" must be a file in the paper folder — the mail or the saved page the override rests on`);
|
|
162
|
+
}
|
|
163
|
+
const isWhat = (v) => DEADLINE_WHATS.some((w) => w === v);
|
|
164
|
+
/** Every kind with what it is, for the message that refuses an unknown one. */
|
|
165
|
+
const KINDS_TEXT = DEADLINE_WHATS.map((w) => {
|
|
166
|
+
const means = WHAT_MEANS[w];
|
|
167
|
+
return means === null ? w : `${w} (${means})`;
|
|
168
|
+
}).join(", ");
|
|
169
|
+
const DEADLINE_KEYS = ["what", "observed", "override"];
|
|
170
|
+
function parseDeadline(v, at) {
|
|
171
|
+
if (!isRecord(v))
|
|
172
|
+
return err(`${at}: a deadline must be { "what", "observed": [ … ], "override"? }`);
|
|
173
|
+
const unknown = unknownKey(v, DEADLINE_KEYS, at, "a deadline's");
|
|
174
|
+
if (unknown !== null)
|
|
175
|
+
return err(unknown);
|
|
176
|
+
const what = v["what"];
|
|
177
|
+
if (!isWhat(what))
|
|
178
|
+
return err(`${at}: "what" must be one of ${KINDS_TEXT}; got ${JSON.stringify(what)}`);
|
|
179
|
+
const observed = parseObserved(v["observed"], at);
|
|
180
|
+
if (!observed.ok)
|
|
181
|
+
return observed;
|
|
182
|
+
const override = parseOverride(v["override"], at);
|
|
183
|
+
if (!override.ok)
|
|
184
|
+
return override;
|
|
185
|
+
return observed.value.length === 0 && override.value === null
|
|
186
|
+
? err(`${at}: the "${what}" deadline records nothing — add what a page said ("observed") or an "override"`)
|
|
187
|
+
: ok({ what, observed: observed.value, override: override.value });
|
|
188
|
+
}
|
|
189
|
+
/** The first kind with two entries, as the refusal naming both; null when each kind has one. */
|
|
190
|
+
function twoEntries(list, at) {
|
|
191
|
+
const second = list.findIndex((d, i) => list.findIndex((e) => e.what === d.what) !== i);
|
|
192
|
+
const d = list[second];
|
|
193
|
+
if (d === undefined)
|
|
194
|
+
return null;
|
|
195
|
+
const first = list.findIndex((e) => e.what === d.what);
|
|
196
|
+
return `${at}: the "${d.what}" deadline has two entries (deadlines[${String(first)}] and deadlines[${String(second)}]) — one entry per deadline: put every reading of it in that entry's "observed" list`;
|
|
197
|
+
}
|
|
198
|
+
/** A cycle's `deadlines` value → the list, or one line naming the place and the cure. Pure. */
|
|
199
|
+
export function parseDeadlines(v, at) {
|
|
200
|
+
if (v === undefined)
|
|
201
|
+
return ok([]);
|
|
202
|
+
if (!Array.isArray(v))
|
|
203
|
+
return err(`${at}: "deadlines" must be a list`);
|
|
204
|
+
const list = eachOf(v, `${at}.deadlines`, parseDeadline);
|
|
205
|
+
if (!list.ok)
|
|
206
|
+
return list;
|
|
207
|
+
const twice = twoEntries(list.value, at);
|
|
208
|
+
return twice === null ? list : err(twice);
|
|
209
|
+
}
|
|
210
|
+
// ── deriving ───────────────────────────────────────────────────────────────────────────
|
|
211
|
+
/** The earliest of the readings; the first of equals. */
|
|
212
|
+
const earliest = (readings) => readings.reduce((best, o) => (best === undefined || o.at < best.at ? o : best), undefined);
|
|
213
|
+
const withoutWhat = ({ at, source, url, read }) => ({
|
|
214
|
+
at,
|
|
215
|
+
source,
|
|
216
|
+
url,
|
|
217
|
+
read,
|
|
218
|
+
});
|
|
219
|
+
/** One kind in force from the preset's readings and the paper's entry; null when neither says anything. */
|
|
220
|
+
function oneInForce(what, own, preset) {
|
|
221
|
+
const readings = [
|
|
222
|
+
...preset.filter((r) => r.what === what).map(withoutWhat),
|
|
223
|
+
...(own?.observed ?? []),
|
|
224
|
+
];
|
|
225
|
+
const override = own?.override ?? null;
|
|
226
|
+
if (override !== null)
|
|
227
|
+
return {
|
|
228
|
+
what,
|
|
229
|
+
at: override.at,
|
|
230
|
+
by: { kind: "override", override },
|
|
231
|
+
readings,
|
|
232
|
+
};
|
|
233
|
+
const first = earliest(readings);
|
|
234
|
+
return first === undefined
|
|
235
|
+
? null
|
|
236
|
+
: { what, at: first.at, by: { kind: "reading", reading: first }, readings };
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Every deadline in force for an attempt: the paper's own entries over the venue preset's readings
|
|
240
|
+
* (empty for a venue without a preset). The override, else the earliest reading. Pure.
|
|
241
|
+
*/
|
|
242
|
+
export function deadlinesInForce(own, preset) {
|
|
243
|
+
return DEADLINE_WHATS.flatMap((what) => {
|
|
244
|
+
const d = oneInForce(what, own.find((x) => x.what === what), preset);
|
|
245
|
+
return d === null ? [] : [d];
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
const layerOf = (entries) => DEADLINE_WHATS.flatMap((what) => {
|
|
249
|
+
const ats = entries.filter((e) => e.what === what).map((e) => e.at);
|
|
250
|
+
const first = ats.toSorted()[0];
|
|
251
|
+
return first === undefined ? [] : [{ what, at: first }];
|
|
252
|
+
});
|
|
253
|
+
/** The pairs of a layer out of the order registration ≤ submission ≤ resubmission < notification < camera-ready. */
|
|
254
|
+
const inversions = (layer, says) => layer.flatMap((d, i) => {
|
|
255
|
+
const before = layer[i - 1];
|
|
256
|
+
return before !== undefined && before.at > d.at
|
|
257
|
+
? [
|
|
258
|
+
`${says(before.what, before.at, false)} is after ${says(d.what, d.at, true)}`,
|
|
259
|
+
]
|
|
260
|
+
: [];
|
|
261
|
+
});
|
|
262
|
+
const readingsOf = (own, preset, source) => [
|
|
263
|
+
...preset.filter((r) => r.source === source),
|
|
264
|
+
...own.flatMap((d) => d.observed
|
|
265
|
+
.filter((o) => o.source === source)
|
|
266
|
+
.map((o) => ({ what: d.what, at: o.at }))),
|
|
267
|
+
];
|
|
268
|
+
/**
|
|
269
|
+
* The deadlines out of order WITHIN one source — the portal's readings, the call's, the overrides —
|
|
270
|
+
* the shape a date typed wrong or an AoE day miscounted takes. Across sources a disagreement is what
|
|
271
|
+
* the record holds, and the earlier binds; it is not a problem. Pure.
|
|
272
|
+
*/
|
|
273
|
+
export function deadlineOrderProblems(own, preset) {
|
|
274
|
+
const overrides = own.flatMap((d) => d.override === null ? [] : [{ what: d.what, at: d.override.at }]);
|
|
275
|
+
return [
|
|
276
|
+
...inversions(layerOf(readingsOf(own, preset, "portal")), (w, at, later) => `${later ? "its" : "the portal's"} "${w}" (${at})`),
|
|
277
|
+
...inversions(layerOf(readingsOf(own, preset, "call")), (w, at, later) => `${later ? "its" : "the call's"} "${w}" (${at})`),
|
|
278
|
+
...inversions(layerOf(overrides), (w, at) => `the override of "${w}" (${at})`),
|
|
279
|
+
];
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=deadline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline.js","sourceRoot":"","sources":["../../src/domain/deadline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,GAAG,EAAE,EAAE,EAAe,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAavC,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD,cAAc;IACd,YAAY;IACZ,cAAc;IACd,cAAc;IACd,cAAc;CACf,CAAC;AAEF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C5C;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RuleContext } from "./rule-context.ts";
|
|
2
|
+
interface Head {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly phase: string;
|
|
5
|
+
}
|
|
6
|
+
interface Finding {
|
|
7
|
+
readonly messageId: "noCycle" | "unknownCycle" | "porting";
|
|
8
|
+
readonly data: Readonly<Record<string, string>>;
|
|
9
|
+
}
|
|
10
|
+
/** Each stage against the declared cycles. Pure. */
|
|
11
|
+
export declare function judgeStages(stages: readonly unknown[], cycles: readonly Head[]): readonly Finding[];
|
|
12
|
+
declare const _default: {
|
|
13
|
+
rules: {
|
|
14
|
+
stage: {
|
|
15
|
+
meta: {
|
|
16
|
+
type: "problem";
|
|
17
|
+
docs: {
|
|
18
|
+
description: string;
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
schema: never[];
|
|
22
|
+
messages: {
|
|
23
|
+
noCycle: string;
|
|
24
|
+
unknownCycle: string;
|
|
25
|
+
porting: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
create(context: RuleContext): {
|
|
29
|
+
yaml?: never;
|
|
30
|
+
} | {
|
|
31
|
+
yaml(node: {
|
|
32
|
+
readonly value: string;
|
|
33
|
+
}): void;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default _default;
|
|
39
|
+
//# sourceMappingURL=cycle-stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cycle-stage.d.ts","sourceRoot":"","sources":["../../eslint-rules/cycle-stage.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAwBrD,UAAU,IAAI;IACZ,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAuBD,UAAU,OAAO;IACf,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD;AAED,oDAAoD;AACpD,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,OAAO,EAAE,EAC1B,MAAM,EAAE,SAAS,IAAI,EAAE,GACtB,SAAS,OAAO,EAAE,CAgBpB;;;;;;;;;;;;;;;;;4BAsBqB,WAAW;;;2BAIZ;oBAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;iBAAE;;;;;AAxB/C,wBA0CE"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cycle/stage` — a declared stage names the ATTEMPT it belongs to, and that attempt exists.
|
|
3
|
+
*
|
|
4
|
+
* With `cycles` in the paper's `paperlint.json`, a `stages` entry in the scorecard's frontmatter
|
|
5
|
+
* says `cycle: <id>` instead of a free `venue:` string: the venue's name is then the cycle's
|
|
6
|
+
* preset's, spelled once, and a consumer can tell which rows of the scorecard belong to which
|
|
7
|
+
* attempt. Three things can be wrong, each an error:
|
|
8
|
+
*
|
|
9
|
+
* noCycle `cycles` is declared and a stage names no `cycle`
|
|
10
|
+
* unknownCycle the stage's `cycle` is no declared cycle's id
|
|
11
|
+
* porting a `submitted` or `camera-ready` stage in a cycle whose phase is still `porting` —
|
|
12
|
+
* a PDF was sent while the record says the source is in the previous venue's template
|
|
13
|
+
*
|
|
14
|
+
* Without `cycles` (the flat form) the rule is silent: `venue:` stays what it was. The settings file
|
|
15
|
+
* is read here only for the cycles' ids and phases; `cycle/record` (src/cycle-rules.ts) judges the
|
|
16
|
+
* whole record.
|
|
17
|
+
*/
|
|
18
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
19
|
+
import { dirname, join } from "node:path";
|
|
20
|
+
import { load } from "js-yaml";
|
|
21
|
+
import { z } from "zod";
|
|
22
|
+
const SETTINGS_FILE = "paperlint.json";
|
|
23
|
+
/** What this rule reads of a cycle: its id and phase. `cycle/record` parses the rest. */
|
|
24
|
+
const CycleHead = z.looseObject({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
phase: z.string().optional(),
|
|
27
|
+
});
|
|
28
|
+
const Settings = z.looseObject({
|
|
29
|
+
cycles: z.array(CycleHead.catch({ id: "" })).optional(),
|
|
30
|
+
});
|
|
31
|
+
const Frontmatter = z.looseObject({ stages: z.unknown().optional() }).catch({});
|
|
32
|
+
const Stage = z
|
|
33
|
+
.looseObject({
|
|
34
|
+
stage: z.unknown().optional(),
|
|
35
|
+
cycle: z.unknown().optional(),
|
|
36
|
+
date: z.unknown().optional(),
|
|
37
|
+
})
|
|
38
|
+
.catch({});
|
|
39
|
+
/** The stages that send a PDF to the venue: a cycle still porting cannot have one. */
|
|
40
|
+
const SENT = ["submitted", "camera-ready"];
|
|
41
|
+
/** The declared cycles' heads, or null when the paper has no `cycles` (or no readable settings). */
|
|
42
|
+
function cyclesOf(dir) {
|
|
43
|
+
const file = join(dir, SETTINGS_FILE);
|
|
44
|
+
if (!existsSync(file))
|
|
45
|
+
return null;
|
|
46
|
+
try {
|
|
47
|
+
const s = Settings.safeParse(JSON.parse(readFileSync(file, "utf8")));
|
|
48
|
+
return s.success && s.data.cycles !== undefined
|
|
49
|
+
? s.data.cycles.map((c) => ({ id: c.id, phase: c.phase ?? "prepared" }))
|
|
50
|
+
: null;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const text = (v) => typeof v === "string" ? v : v === undefined ? "" : JSON.stringify(v);
|
|
57
|
+
/** A YAML date without quotes is a `Date`; shown as the day it names, as `paper/stages` does. */
|
|
58
|
+
const dateText = (v) => v instanceof Date ? v.toISOString().slice(0, 10) : text(v);
|
|
59
|
+
/** Each stage against the declared cycles. Pure. */
|
|
60
|
+
export function judgeStages(stages, cycles) {
|
|
61
|
+
const known = cycles.map((c) => c.id).join(" · ") || "(none)";
|
|
62
|
+
return stages.flatMap((entry) => {
|
|
63
|
+
const s = Stage.parse(entry);
|
|
64
|
+
const stage = text(s.stage);
|
|
65
|
+
const date = dateText(s.date);
|
|
66
|
+
if (s.cycle === undefined)
|
|
67
|
+
return [{ messageId: "noCycle", data: { stage, date, known } }];
|
|
68
|
+
const id = text(s.cycle);
|
|
69
|
+
const cycle = cycles.find((c) => c.id === id);
|
|
70
|
+
if (cycle === undefined)
|
|
71
|
+
return [{ messageId: "unknownCycle", data: { stage, date, id, known } }];
|
|
72
|
+
return SENT.includes(stage) && cycle.phase === "porting"
|
|
73
|
+
? [{ messageId: "porting", data: { stage, date, id } }]
|
|
74
|
+
: [];
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export default {
|
|
78
|
+
rules: {
|
|
79
|
+
stage: {
|
|
80
|
+
meta: {
|
|
81
|
+
type: "problem",
|
|
82
|
+
docs: {
|
|
83
|
+
description: "with `cycles` declared, every stage names the cycle it belongs to, and no PDF is sent from a cycle still porting",
|
|
84
|
+
url: "https://github.com/zernie/paperlint/blob/main/docs/rules/cycle/stage.md",
|
|
85
|
+
},
|
|
86
|
+
schema: [],
|
|
87
|
+
messages: {
|
|
88
|
+
noCycle: "the «{{stage}}» stage ({{date}}) names no `cycle` — this paper declares `cycles` in paperlint.json, so each stage says which attempt it belongs to: `cycle: <id>`, one of {{known}}",
|
|
89
|
+
unknownCycle: "the «{{stage}}» stage ({{date}}) names the cycle «{{id}}», which paperlint.json does not declare — the declared ids: {{known}}",
|
|
90
|
+
porting: "the «{{stage}}» stage ({{date}}) belongs to the cycle «{{id}}», whose phase is still `porting`: a PDF was sent while the record says the source is in the previous venue's template. Finish the port and drop the phase, or the stage is wrong",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
create(context) {
|
|
94
|
+
const cycles = cyclesOf(dirname(context.filename));
|
|
95
|
+
if (cycles === null)
|
|
96
|
+
return {};
|
|
97
|
+
return {
|
|
98
|
+
yaml(node) {
|
|
99
|
+
const data = (() => {
|
|
100
|
+
try {
|
|
101
|
+
return load(node.value);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
return undefined; // `paper/stages` reports the unreadable YAML
|
|
105
|
+
}
|
|
106
|
+
})();
|
|
107
|
+
const stages = Frontmatter.parse(data).stages;
|
|
108
|
+
if (!Array.isArray(stages))
|
|
109
|
+
return;
|
|
110
|
+
judgeStages(stages, cycles).forEach((f) => {
|
|
111
|
+
context.report({ node, messageId: f.messageId, data: f.data });
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=cycle-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cycle-stage.js","sourceRoot":"","sources":["../../eslint-rules/cycle-stage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,aAAa,GAAG,gBAAgB,CAAC;AAEvC,yFAAyF;AACzF,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AACH,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC;IAC7B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,E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AAEpD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"paper-config.d.ts","sourceRoot":"","sources":["../../lib/paper-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,MAAoB,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,MAAyB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAKzC,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAoB,GAC7C,MAAM,CAmBR;AAKD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,GACX,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAQ/C;AAED,0GAA0G;AAC1G,eAAO,MAAM,mBAAmB,EAAE,MAAiB,CAAC;AAEpD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAoB,CAAC;AAEpD;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBzD,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAI3C,CAAC;AAEH,sGAAsG;AACtG,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAO1C,CAAC"}
|
package/dist/lib/paper-config.js
CHANGED
|
@@ -123,6 +123,7 @@ export const SETTINGS_KEYS = Object.freeze({
|
|
|
123
123
|
identity: "what identifies the authors — names, handles, emails, affiliations, own project names; a blind venue's PDF must not say any of them — anonymity/identity. The root's list and a paper's are joined",
|
|
124
124
|
talk: 'how this paper is presented: { "mode": "remote-video", "dir"?, "files"?, "one_slide"? } — the talk/ rules. A paper\'s own; refused in the root file',
|
|
125
125
|
submission: "which submission on the venue's portal is this paper's: { \"id\": <number> } — paperlint submission, with the preset's \"portal\". A paper's own; refused in the root file",
|
|
126
|
+
cycles: "the paper's attempts at venues, oldest first: [{ id, venue, kind, opened, phase?, deadlines, submission?, outcome }] — extends, kind and submission are then the current attempt's, and the cycle/ rules judge the record. A paper's own; refused in the root file",
|
|
126
127
|
scripts: "how skill prose names the scripts — consumer.mjs",
|
|
127
128
|
timezone: "the zone deadline anchors are written in — consumer.mjs",
|
|
128
129
|
contactEmail: "the polite-pool address for citation lookups — consumer.mjs",
|
|
@@ -133,6 +134,7 @@ export const SETTINGS_KEYS = Object.freeze({
|
|
|
133
134
|
export const PAPER_ONLY_KEYS = Object.freeze([
|
|
134
135
|
"talk",
|
|
135
136
|
"submission",
|
|
137
|
+
"cycles",
|
|
136
138
|
]);
|
|
137
139
|
/** The keys that only mean something for the whole project: refused in a paper's `paperlint.json`. */
|
|
138
140
|
export const ROOT_ONLY_KEYS = Object.freeze([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-config.js","sourceRoot":"","sources":["../../lib/paper-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW,WAAW,CAAC;AAE9C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAW,gBAAgB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC5D,WAAW;IACX,UAAU;IACV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,CAAC;AAEH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,eAAe,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC9D,MAAM;IACN,YAAY;IACZ,QAAQ;CACT,CAAC,CAAC;AAEH,sGAAsG;AACtG,MAAM,CAAC,MAAM,cAAc,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC7D,WAAW;IACX,WAAW;IACX,SAAS;IACT,UAAU;IACV,cAAc;IACd,cAAc;CACf,CAAC,CAAC"}
|
package/dist/paper-settings.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { Files } from "./ports/files.ts";
|
|
|
3
3
|
import { type Parsed, type RuleEntry } from "./rules-config.ts";
|
|
4
4
|
import { type PaperTalk } from "./domain/talk.ts";
|
|
5
5
|
import { type PaperSubmission } from "./domain/submission.ts";
|
|
6
|
+
import { type Cycles } from "./domain/cycle.ts";
|
|
6
7
|
/** What one paper declares. Every absent field is null. */
|
|
7
8
|
export interface PaperSettings {
|
|
8
9
|
/** The venue preset the paper is judged against: `paperlint:<name>` or a relative path. */
|
|
@@ -26,6 +27,12 @@ export interface PaperSettings {
|
|
|
26
27
|
readonly talk: PaperTalk | null;
|
|
27
28
|
/** Which submission on the venue's portal is this paper's; null when it says none. Never the root's. */
|
|
28
29
|
readonly submission: PaperSubmission | null;
|
|
30
|
+
/**
|
|
31
|
+
* The paper's attempts at venues and the current one, when the file declares `cycles`; null for a
|
|
32
|
+
* file in the flat form. With cycles, `extends`, `kind` and `submission` above are the current
|
|
33
|
+
* attempt's — derived, never written beside it. Never the root's.
|
|
34
|
+
*/
|
|
35
|
+
readonly cycles: Cycles | null;
|
|
29
36
|
}
|
|
30
37
|
/** Why a paper's settings cannot be read. */
|
|
31
38
|
export type SettingsProblem = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper-settings.d.ts","sourceRoot":"","sources":["../src/paper-settings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paper-settings.d.ts","sourceRoot":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