paperlint 20.3.0 → 20.4.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/.claude-plugin/plugin.json +1 -1
- package/dist/adapters/venue-corpus/index.d.ts +2 -2
- package/dist/adapters/venue-corpus/index.d.ts.map +1 -1
- package/dist/adapters/venue-corpus/index.js +15 -3
- package/dist/adapters/venue-corpus/index.js.map +1 -1
- package/dist/domain/venue-corpus.d.ts +11 -2
- package/dist/domain/venue-corpus.d.ts.map +1 -1
- package/dist/domain/venue-corpus.js +16 -0
- package/dist/domain/venue-corpus.js.map +1 -1
- package/docs/design/venue-corpus.md +17 -16
- package/docs/rules/corpus/record.md +3 -0
- package/docs/venues.md +4 -0
- package/package.json +1 -1
- package/skills/study-accepted-papers/SKILL.md +2 -2
- package/skills/study-accepted-papers/SKILL.md.spec.ts +1 -1
- package/skills/study-accepted-papers/papers.schema.json +1 -0
- package/skills/study-accepted-papers/scripts/corpus-licences.js +21 -2
- package/skills/study-accepted-papers/scripts/corpus-licences.test.ts +1 -0
- package/src/adapters/venue-corpus/index.test.ts +22 -54
- package/src/adapters/venue-corpus/index.ts +15 -2
- package/src/adapters/venue-corpus/schema.test.ts +47 -0
- package/src/corpus-record-rule.test.ts +1 -0
- package/src/domain/venue-corpus.test.ts +85 -0
- package/src/domain/venue-corpus.ts +27 -2
|
@@ -192,7 +192,7 @@ declare const edition: z.ZodObject<{
|
|
|
192
192
|
edition: z.ZodNumber;
|
|
193
193
|
listed_from: z.ZodURL;
|
|
194
194
|
read_on: z.ZodISODate;
|
|
195
|
-
accepted: z.
|
|
195
|
+
accepted: z.ZodNumber;
|
|
196
196
|
capped: z.ZodNullable<z.ZodString>;
|
|
197
197
|
proxy: z.ZodNullable<z.ZodObject<{
|
|
198
198
|
what: z.ZodString;
|
|
@@ -205,7 +205,7 @@ declare const record: z.ZodObject<{
|
|
|
205
205
|
edition: z.ZodNumber;
|
|
206
206
|
listed_from: z.ZodURL;
|
|
207
207
|
read_on: z.ZodISODate;
|
|
208
|
-
accepted: z.
|
|
208
|
+
accepted: z.ZodNumber;
|
|
209
209
|
capped: z.ZodNullable<z.ZodString>;
|
|
210
210
|
proxy: z.ZodNullable<z.ZodObject<{
|
|
211
211
|
what: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/venue-corpus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/venue-corpus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAEL,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,KAAK,IAAI,EACT,KAAK,OAAO,EAEZ,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,KAAK,EACV,KAAK,QAAQ,EAEb,KAAK,iBAAiB,EACtB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAyB1E,qFAAqF;AACrF,QAAA,MAAM,OAAO;;;;;;;;;;;;;;GAsBT,CAAC;AA2BL,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAgBR,CAAC;AAEH,QAAA,MAAM,GAAG;;;;;;kBAWN,CAAC;AAeJ,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,CAAC,OAAO,KAAK,CAAC,EAAE,KAAK,CAAC;IACnC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,EAAE,IAAI,CAAC;IACjC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,OAAO,CAAC,EAAE,OAAO,CAAC;IACvC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,GAAG,CAAC,EAAE,QAAQ,CAAC;CACrC,SAAS,IAAI,EAAE,GACZ,IAAI,GACJ,KAAK,CAAC;AAEV,iDAAiD;AACjD,eAAO,MAAM,sBAAsB,EAAE,mBAA0B,CAAC;AAuBhE,sGAAsG;AACtG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAQ3D;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAA8C,CAAC;AAE9E,6GAA6G;AAC7G,eAAO,MAAM,WAAW,oDAAoD,CAAC;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,QAAO,OAKvC,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,QAAO,MACgB,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { isLicenceId, NOASSERTION, STORED_KINDS, } from "../../domain/licence.js";
|
|
14
|
-
import { KEY_PATTERN, KNOWN_VERSIONS, PAPER_ID_KINDS, } from "../../domain/venue-corpus.js";
|
|
14
|
+
import { KEY_PATTERN, KNOWN_VERSIONS, PAPER_ID_KINDS, editionCountIssue, } from "../../domain/venue-corpus.js";
|
|
15
15
|
const words = z.string().min(1);
|
|
16
16
|
const date = z.iso.date();
|
|
17
17
|
/** Where a page or a file was read: a web address, never a local path or another scheme. */
|
|
@@ -130,7 +130,7 @@ const edition = z.strictObject({
|
|
|
130
130
|
edition: year,
|
|
131
131
|
listed_from: webUrl,
|
|
132
132
|
read_on: date,
|
|
133
|
-
accepted: count
|
|
133
|
+
accepted: count,
|
|
134
134
|
capped: words.nullable(),
|
|
135
135
|
proxy: proxy.nullable(),
|
|
136
136
|
});
|
|
@@ -168,7 +168,19 @@ const record = z
|
|
|
168
168
|
papers: z.array(paper),
|
|
169
169
|
rebuild: z.array(words),
|
|
170
170
|
})
|
|
171
|
-
.superRefine(consistent)
|
|
171
|
+
.superRefine(consistent)
|
|
172
|
+
.superRefine((r, ctx) => {
|
|
173
|
+
// Each edition's papers add up to what it accepted (the domain decides how).
|
|
174
|
+
r.editions.forEach((e, i) => {
|
|
175
|
+
const message = editionCountIssue(e, r.papers);
|
|
176
|
+
if (message !== null)
|
|
177
|
+
ctx.addIssue({
|
|
178
|
+
code: "custom",
|
|
179
|
+
path: ["editions", i, "accepted"],
|
|
180
|
+
message,
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
});
|
|
172
184
|
/** The proof is used, so the build checks it. */
|
|
173
185
|
export const SCHEMAS_ARE_THE_DOMAIN = true;
|
|
174
186
|
/** The JSON `text` holds, or undefined when it is not JSON. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/venue-corpus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/venue-corpus/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EAGd,iBAAiB,GAQlB,MAA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AE9E,6GAA6G;AAC7G,MAAM,CAAC,MAAM,WAAW,GAAG,iDAAiD,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE,CAAC,CAAC;IACnD,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IAClE,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,4ZAA4Z;CAC/Z,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAW,EAAE,CAChD,GAAG,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -35,8 +35,11 @@ export interface Edition {
|
|
|
35
35
|
/** The page that lists what the edition accepted. */
|
|
36
36
|
readonly listed_from: string;
|
|
37
37
|
readonly read_on: string;
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* How many it accepted: the rows of the page that lists them. Without `capped` the corpus lists
|
|
40
|
+
* exactly this many of the edition's papers; with it, at most this many.
|
|
41
|
+
*/
|
|
42
|
+
readonly accepted: number;
|
|
40
43
|
/** What was left out of the edition and why; null when nothing was (never left out). */
|
|
41
44
|
readonly capped: string | null;
|
|
42
45
|
/** The stand-in for "strong accept" in this edition; null when it has none. */
|
|
@@ -138,5 +141,11 @@ export type ParsedCorpus = {
|
|
|
138
141
|
export declare const pathText: (path: RecordPath) => string;
|
|
139
142
|
/** Every problem on one line, each with its path. */
|
|
140
143
|
export declare const problemsText: (problems: readonly CorpusProblem[]) => string;
|
|
144
|
+
/**
|
|
145
|
+
* What an edition lists against what it accepted, or null when they agree: without `capped` its
|
|
146
|
+
* papers (`accepted` and `award` rows; a `sister` is another venue's) number exactly `accepted`,
|
|
147
|
+
* with `capped` at most that many.
|
|
148
|
+
*/
|
|
149
|
+
export declare const editionCountIssue: (edition: Readonly<Edition>, papers: readonly Paper[]) => string | null;
|
|
141
150
|
export {};
|
|
142
151
|
//# sourceMappingURL=venue-corpus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"venue-corpus.d.ts","sourceRoot":"","sources":["../../src/domain/venue-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,YAAY,0CAA2C,CAAC;AACrE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,8EAA8E;AAC9E,eAAO,MAAM,cAAc,gDAAiD,CAAC;AAC7E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,oGAAoG;AACpG,eAAO,MAAM,cAAc,gDAAiD,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,WAAW,QAAiC,CAAC;AAE1D,mDAAmD;AACnD,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB
|
|
1
|
+
{"version":3,"file":"venue-corpus.d.ts","sourceRoot":"","sources":["../../src/domain/venue-corpus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE5D,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,YAAY,0CAA2C,CAAC;AACrE,MAAM,MAAM,UAAU,GAAG,CAAC,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D,eAAO,MAAM,YAAY,GAAI,UAAU,SAAS,aAAa,EAAE,KAAG,MAC0B,CAAC;AAE7F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,QAAQ,CAAC,OAAO,CAAC,EAC1B,QAAQ,SAAS,KAAK,EAAE,KACvB,MAAM,GAAG,IAYX,CAAC"}
|
|
@@ -14,4 +14,20 @@ export const KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u;
|
|
|
14
14
|
export const pathText = (path) => path.length === 0 ? "(top)" : path.join(".");
|
|
15
15
|
/** Every problem on one line, each with its path. */
|
|
16
16
|
export const problemsText = (problems) => `${CORPUS_RECORD}: ${problems.map((p) => `${pathText(p.path)}: ${p.message}`).join("; ")}`;
|
|
17
|
+
/**
|
|
18
|
+
* What an edition lists against what it accepted, or null when they agree: without `capped` its
|
|
19
|
+
* papers (`accepted` and `award` rows; a `sister` is another venue's) number exactly `accepted`,
|
|
20
|
+
* with `capped` at most that many.
|
|
21
|
+
*/
|
|
22
|
+
export const editionCountIssue = (edition, papers) => {
|
|
23
|
+
const listed = papers.filter((p) => p.group !== "sister" && p.edition === edition.edition).length;
|
|
24
|
+
const tally = `${String(listed)} papers of ${String(edition.edition)} are listed`;
|
|
25
|
+
if (edition.capped === null)
|
|
26
|
+
return listed === edition.accepted
|
|
27
|
+
? null
|
|
28
|
+
: `${tally} and ${String(edition.accepted)} were accepted: list them all, or say in capped what was left out`;
|
|
29
|
+
return listed > edition.accepted
|
|
30
|
+
? `${tally}, more than the ${String(edition.accepted)} it accepted`
|
|
31
|
+
: null;
|
|
32
|
+
};
|
|
17
33
|
//# sourceMappingURL=venue-corpus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"venue-corpus.js","sourceRoot":"","sources":["../../src/domain/venue-corpus.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C,8FAA8F;AAC9F,MAAM,CAAC,MA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,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAE7F;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,OAA0B,EAC1B,MAAwB,EACT,EAAE;IACjB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAC1B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAC7D,CAAC,MAAM,CAAC;IACT,MAAM,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC;IAClF,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI;QACzB,OAAO,MAAM,KAAK,OAAO,CAAC,QAAQ;YAChC,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,GAAG,KAAK,QAAQ,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IAClH,OAAO,MAAM,GAAG,OAAO,CAAC,QAAQ;QAC9B,CAAC,CAAC,GAAG,KAAK,mBAAmB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc;QACnE,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC"}
|
|
@@ -77,22 +77,23 @@ pull requests that follow. It is the base for #302, #568, #356, #500, #215, #608
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
| field | values
|
|
81
|
-
| ------------------------- |
|
|
82
|
-
| `venue` | the corpus folder's name, which is the venue preset's series: the preset id without its year (`agent` for `paperlint:agent-2027`)
|
|
83
|
-
| `editions[]` | each edition of THIS venue the corpus covers: the year, the page that lists what it accepted, the date read; `accepted
|
|
84
|
-
| `editions[].capped` | what was left out of the edition and why (`"the research track only, 100 of 312"`), or `null`
|
|
85
|
-
| `editions[].
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `papers[].
|
|
89
|
-
| `papers[].
|
|
90
|
-
| `papers[].
|
|
91
|
-
| `papers[].
|
|
92
|
-
| `
|
|
93
|
-
| `copies[].
|
|
94
|
-
| `copies[].
|
|
95
|
-
| `copies[].
|
|
80
|
+
| field | values |
|
|
81
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
+
| `venue` | the corpus folder's name, which is the venue preset's series: the preset id without its year (`agent` for `paperlint:agent-2027`) |
|
|
83
|
+
| `editions[]` | each edition of THIS venue the corpus covers: the year, the page that lists what it accepted, the date read; `accepted`, the count of that page's rows (required) |
|
|
84
|
+
| `editions[].capped` | what was left out of the edition and why (`"the research track only, 100 of 312"`), or `null` |
|
|
85
|
+
| `editions[].accepted` | without `capped`, exactly this many of the edition's papers are listed (`accepted` and `award` rows, not `sister`); with `capped`, at most this many |
|
|
86
|
+
| `editions[].proxy` | `{ "what", "papers" }`: the stand-in for "strong accept" and how many papers it marks, or `null` |
|
|
87
|
+
| `rebuild` | the commands that regenerate the corpus, in order; `[]` when none was kept |
|
|
88
|
+
| `papers[].key` | unique in the file; names the stored files and the measurement rows |
|
|
89
|
+
| `papers[].group` | `accepted`, `award`, or `sister` (corpus 2: papers of another venue) |
|
|
90
|
+
| `papers[].edition` | for `accepted` and `award`: one of `editions[].edition` |
|
|
91
|
+
| `papers[].venue`, `.year` | for `sister`: the other venue and its year; `listed_from` on the row says where it was found |
|
|
92
|
+
| `papers[].ids` | any of `doi`, `arxiv`, `dblp`, `s2`, `url` (the paper's page on the listing, when nothing else identifies it); at least one |
|
|
93
|
+
| `copies[].version` | `published`, `accepted`, `preprint` (OpenAlex's `publishedVersion` / `acceptedVersion` / `submittedVersion`), or `unknown` |
|
|
94
|
+
| `copies[].licence` | `id`, `read_from` (the page or API response it was read from, never inferred), `read_on` |
|
|
95
|
+
| `copies[].fetched_from` | required when `stored` is not empty: the URL the stored bytes were downloaded from |
|
|
96
|
+
| `copies[].stored` | what of this copy is in the corpus: `[]`, `["text"]`, `["pdf"]` or both; `"text"` covers every text variant of the paper |
|
|
96
97
|
|
|
97
98
|
The top level, the edition, the copy and the licence objects are strict, so a misspelt key is an error.
|
|
98
99
|
A paper row keeps any further fields as they are: the consumer's scripts read about forty of them
|
|
@@ -20,6 +20,9 @@ paper which copy every stored file is and under which licence, and how the corpu
|
|
|
20
20
|
- a copy whose `stored` names a kind whose file is not there (`missing`), at that `stored`;
|
|
21
21
|
- two copies of one paper that both store one kind (`twice`), at the second copy's `stored`: one
|
|
22
22
|
file is a copy of one version.
|
|
23
|
+
- an edition whose papers do not add up to its `accepted` (`unparsed`, at that `accepted`): without
|
|
24
|
+
`capped` the record lists every paper the edition accepted, winners included; with `capped` it
|
|
25
|
+
lists at most that many. A list copied in half is caught here, not by the schema.
|
|
23
26
|
|
|
24
27
|
A `papers.json` that is not JSON is not this rule's finding: ESLint reports it as a parse error on
|
|
25
28
|
its first line. A `paper.tex` or `PIPELINE-STATUS.md` kept in a corpus (an accepted paper's source)
|
package/docs/venues.md
CHANGED
|
@@ -239,6 +239,10 @@ row, from a workshop's 2026 list:
|
|
|
239
239
|
}
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
+
The example shows one of the edition's 27 rows. `accepted` is the count of the listing page's rows
|
|
243
|
+
and is required: with `capped` null the record lists all 27 papers of 2026 (`accepted` and `award`
|
|
244
|
+
rows together), and `corpus/record` reports an edition whose rows do not add up to it.
|
|
245
|
+
|
|
242
246
|
The fields, their values and which are required are the JSON Schema
|
|
243
247
|
[`skills/study-accepted-papers/papers.schema.json`](../skills/study-accepted-papers/papers.schema.json),
|
|
244
248
|
generated from the parser (`src/adapters/venue-corpus/index.ts`; `npm run schema:venue-corpus`
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ context: fork
|
|
|
5
5
|
allowed-tools: [Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, Agent]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
<!-- vigiles:sha256:
|
|
8
|
+
<!-- vigiles:sha256:e956f9144d8c9170 compiled from skills/study-accepted-papers/SKILL.md.spec.ts -->
|
|
9
9
|
|
|
10
10
|
# study-accepted-papers — what this venue rewards, measured on its own papers
|
|
11
11
|
|
|
@@ -108,7 +108,7 @@ as judgement, against the base rates of `references/base-rates.md`; simulated pa
|
|
|
108
108
|
|
|
109
109
|
| what | where | why there |
|
|
110
110
|
|---|---|---|
|
|
111
|
-
| **the venue corpus** | `<papers-root>/venues/<venue>/` (the papers directory from the project's `paperlint.json`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. `papers.json` (one row per paper: winners `award`, ordinary `accepted`, corpus 2 `sister`; every copy with its licence; how the corpus was collected, in fields: each edition's `listed_from`, `read_on`, `capped` and `proxy`, and `rebuild`, the commands run), `MANIFEST.md` (optional: caveats only, the prose no field holds), `measurements.json` (L0/L1 codes keyed by the row's `key`), `pdf/<key>.pdf` and `text/<key>.txt` only as the licence step below permits, `deep-reads/<key>.md`, `sources/` (saved listing and call pages). No other name. |
|
|
111
|
+
| **the venue corpus** | `<papers-root>/venues/<venue>/` (the papers directory from the project's `paperlint.json`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. `papers.json` (one row per paper: winners `award`, ordinary `accepted`, corpus 2 `sister`; every copy with its licence; how the corpus was collected, in fields: each edition's `listed_from`, `read_on`, `accepted` (the listing's row count), `capped` and `proxy`, and `rebuild`, the commands run), `MANIFEST.md` (optional: caveats only, the prose no field holds), `measurements.json` (L0/L1 codes keyed by the row's `key`), `pdf/<key>.pdf` and `text/<key>.txt` only as the licence step below permits, `deep-reads/<key>.md`, `sources/` (saved listing and call pages). No other name. |
|
|
112
112
|
| **the scorecard** | the section **"Strong-accept scorecard (M1–M10)"** of the paper's `PIPELINE-STATUS.md` | a row per mechanism: status (pass / partial / fail), evidence (`file:line`), owner, plan or "accept ceiling". **The only place the verdicts live**; update it there. |
|
|
113
113
|
| **the reasoning** | `<paper>/reviews/<YYYY-MM-DD>-study-accepted-<venue>-<mode>.md` | a dated report per run, with frontmatter (below). It keeps the reasoning, the selection and the per-mechanism argument, and **points to the scorecard section; it never copies the table**. |
|
|
114
114
|
| **the stage** | the SETUP row with id `venuebar` in `PIPELINE-STATUS.md` (the id is kept for existing scorecards) | status, date, the mode and depth run, and a link to the report. One row, updated by every mode. |
|
|
@@ -133,7 +133,7 @@ as judgement, against the base rates of \`references/base-rates.md\`; simulated
|
|
|
133
133
|
|
|
134
134
|
| what | where | why there |
|
|
135
135
|
|---|---|---|
|
|
136
|
-
| **the venue corpus** | \`<papers-root>/venues/<venue>/\` (the papers directory from the project's \`paperlint.json\`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. \`papers.json\` (one row per paper: winners \`award\`, ordinary \`accepted\`, corpus 2 \`sister\`; every copy with its licence; how the corpus was collected, in fields: each edition's \`listed_from\`, \`read_on\`, \`capped\` and \`proxy\`, and \`rebuild\`, the commands run), \`MANIFEST.md\` (optional: caveats only, the prose no field holds), \`measurements.json\` (L0/L1 codes keyed by the row's \`key\`), \`pdf/<key>.pdf\` and \`text/<key>.txt\` only as the licence step below permits, \`deep-reads/<key>.md\`, \`sources/\` (saved listing and call pages). No other name. |
|
|
136
|
+
| **the venue corpus** | \`<papers-root>/venues/<venue>/\` (the papers directory from the project's \`paperlint.json\`; the folder is the preset's series) | **shared by every paper that targets the venue**, collected once and reused by every later mode. \`papers.json\` (one row per paper: winners \`award\`, ordinary \`accepted\`, corpus 2 \`sister\`; every copy with its licence; how the corpus was collected, in fields: each edition's \`listed_from\`, \`read_on\`, \`accepted\` (the listing's row count), \`capped\` and \`proxy\`, and \`rebuild\`, the commands run), \`MANIFEST.md\` (optional: caveats only, the prose no field holds), \`measurements.json\` (L0/L1 codes keyed by the row's \`key\`), \`pdf/<key>.pdf\` and \`text/<key>.txt\` only as the licence step below permits, \`deep-reads/<key>.md\`, \`sources/\` (saved listing and call pages). No other name. |
|
|
137
137
|
| **the scorecard** | the section **"Strong-accept scorecard (M1–M10)"** of the paper's \`PIPELINE-STATUS.md\` | a row per mechanism: status (pass / partial / fail), evidence (\`file:line\`), owner, plan or "accept ceiling". **The only place the verdicts live**; update it there. |
|
|
138
138
|
| **the reasoning** | \`<paper>/reviews/<YYYY-MM-DD>-study-accepted-<venue>-<mode>.md\` | a dated report per run, with frontmatter (below). It keeps the reasoning, the selection and the per-mechanism argument, and **points to the scorecard section; it never copies the table**. |
|
|
139
139
|
| **the stage** | the SETUP row with id \`venuebar\` in \`PIPELINE-STATUS.md\` (the id is kept for existing scorecards) | status, date, the mode and depth run, and a link to the report. One row, updated by every mode. |
|
|
@@ -62,6 +62,15 @@ var PAPER_ID_KINDS = ["doi", "arxiv", "dblp", "s2", "url"];
|
|
|
62
62
|
var KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]*$/u;
|
|
63
63
|
var pathText = (path) => path.length === 0 ? "(top)" : path.join(".");
|
|
64
64
|
var problemsText = (problems) => `${CORPUS_RECORD}: ${problems.map((p) => `${pathText(p.path)}: ${p.message}`).join("; ")}`;
|
|
65
|
+
var editionCountIssue = (edition2, papers) => {
|
|
66
|
+
const listed = papers.filter(
|
|
67
|
+
(p) => p.group !== "sister" && p.edition === edition2.edition
|
|
68
|
+
).length;
|
|
69
|
+
const tally = `${String(listed)} papers of ${String(edition2.edition)} are listed`;
|
|
70
|
+
if (edition2.capped === null)
|
|
71
|
+
return listed === edition2.accepted ? null : `${tally} and ${String(edition2.accepted)} were accepted: list them all, or say in capped what was left out`;
|
|
72
|
+
return listed > edition2.accepted ? `${tally}, more than the ${String(edition2.accepted)} it accepted` : null;
|
|
73
|
+
};
|
|
65
74
|
|
|
66
75
|
// src/adapters/venue-corpus/index.ts
|
|
67
76
|
var words = external_exports.string().min(1);
|
|
@@ -164,7 +173,7 @@ var edition = external_exports.strictObject({
|
|
|
164
173
|
edition: year,
|
|
165
174
|
listed_from: webUrl,
|
|
166
175
|
read_on: date,
|
|
167
|
-
accepted: count
|
|
176
|
+
accepted: count,
|
|
168
177
|
capped: words.nullable(),
|
|
169
178
|
proxy: proxy.nullable()
|
|
170
179
|
});
|
|
@@ -199,7 +208,17 @@ var record = external_exports.strictObject({
|
|
|
199
208
|
editions: external_exports.array(edition),
|
|
200
209
|
papers: external_exports.array(paper),
|
|
201
210
|
rebuild: external_exports.array(words)
|
|
202
|
-
}).superRefine(consistent)
|
|
211
|
+
}).superRefine(consistent).superRefine((r, ctx) => {
|
|
212
|
+
r.editions.forEach((e, i) => {
|
|
213
|
+
const message = editionCountIssue(e, r.papers);
|
|
214
|
+
if (message !== null)
|
|
215
|
+
ctx.addIssue({
|
|
216
|
+
code: "custom",
|
|
217
|
+
path: ["editions", i, "accepted"],
|
|
218
|
+
message
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
});
|
|
203
222
|
function jsonOf(text) {
|
|
204
223
|
try {
|
|
205
224
|
return JSON.parse(text);
|
|
@@ -3,22 +3,13 @@
|
|
|
3
3
|
* parses to itself with a paper row's extra fields kept, and every way a file can fail to be one is
|
|
4
4
|
* refused with the zod path of each problem.
|
|
5
5
|
*/
|
|
6
|
-
import { readFileSync } from "node:fs";
|
|
7
|
-
import { dirname, join } from "node:path";
|
|
8
|
-
import { fileURLToPath } from "node:url";
|
|
9
6
|
import { describe, expect, it } from "vitest";
|
|
10
|
-
import { z } from "zod";
|
|
11
7
|
import {
|
|
12
8
|
problemsText,
|
|
13
9
|
type Paper,
|
|
14
10
|
type VenueCorpus,
|
|
15
11
|
} from "../../domain/venue-corpus.ts";
|
|
16
|
-
import {
|
|
17
|
-
SCHEMA_FILE,
|
|
18
|
-
venueCorpusCodec,
|
|
19
|
-
venueCorpusJsonSchema,
|
|
20
|
-
venueCorpusSchemaText,
|
|
21
|
-
} from "./index.ts";
|
|
12
|
+
import { venueCorpusCodec } from "./index.ts";
|
|
22
13
|
|
|
23
14
|
const parse = venueCorpusCodec.parse;
|
|
24
15
|
|
|
@@ -51,9 +42,9 @@ const EDITION = {
|
|
|
51
42
|
edition: 2026,
|
|
52
43
|
listed_from: "https://conf.researchr.org/home/icse-2026/agent-2026",
|
|
53
44
|
read_on: "2026-11-03",
|
|
54
|
-
accepted:
|
|
45
|
+
accepted: 1,
|
|
55
46
|
capped: null,
|
|
56
|
-
proxy: { what: "distinguished-paper award", papers:
|
|
47
|
+
proxy: { what: "distinguished-paper award", papers: 1 },
|
|
57
48
|
} as const;
|
|
58
49
|
|
|
59
50
|
const RECORD = {
|
|
@@ -96,7 +87,7 @@ describe("parsing a papers.json", () => {
|
|
|
96
87
|
});
|
|
97
88
|
|
|
98
89
|
it("a sister paper names its venue, year and where it was found; an unknown copy stores under NOASSERTION", () => {
|
|
99
|
-
const { edition, ...rest } = PAPER;
|
|
90
|
+
const { edition, ...rest } = { ...PAPER, key: "nlbse-2025-07" };
|
|
100
91
|
const sister: Paper = {
|
|
101
92
|
...rest,
|
|
102
93
|
group: "sister",
|
|
@@ -113,7 +104,7 @@ describe("parsing a papers.json", () => {
|
|
|
113
104
|
},
|
|
114
105
|
],
|
|
115
106
|
};
|
|
116
|
-
const record: VenueCorpus = { ...RECORD, papers: [sister] };
|
|
107
|
+
const record: VenueCorpus = { ...RECORD, papers: [PAPER, sister] };
|
|
117
108
|
// Guards: the sister shape and the unknown-origin copy are both representable.
|
|
118
109
|
expect([edition, parse(text(record))]).toEqual([
|
|
119
110
|
2026,
|
|
@@ -150,8 +141,13 @@ describe("a copy whose licence was never read", () => {
|
|
|
150
141
|
const facts = {
|
|
151
142
|
...RECORD,
|
|
152
143
|
editions: [
|
|
153
|
-
|
|
154
|
-
{
|
|
144
|
+
EDITION,
|
|
145
|
+
{
|
|
146
|
+
...EDITION,
|
|
147
|
+
edition: 2025,
|
|
148
|
+
capped: "the research track only, 100 of 312",
|
|
149
|
+
proxy: null,
|
|
150
|
+
},
|
|
155
151
|
],
|
|
156
152
|
rebuild: [],
|
|
157
153
|
};
|
|
@@ -175,7 +171,7 @@ const REFUSED: readonly (readonly [string, string, string])[] = [
|
|
|
175
171
|
[
|
|
176
172
|
"🔴 a key two papers share",
|
|
177
173
|
text({ ...RECORD, papers: [PAPER, { ...PAPER, title: "Other" }] }),
|
|
178
|
-
'papers.1.key: "2026-01" is the key of papers.0 too',
|
|
174
|
+
'papers.1.key: "2026-01" is the key of papers.0 too; editions.0.accepted: 2 papers of 2026 are listed and 1 were accepted: list them all, or say in capped what was left out',
|
|
179
175
|
],
|
|
180
176
|
[
|
|
181
177
|
"a misspelt key at the top level",
|
|
@@ -225,7 +221,7 @@ const REFUSED: readonly (readonly [string, string, string])[] = [
|
|
|
225
221
|
[
|
|
226
222
|
"a paper of an edition the record does not list",
|
|
227
223
|
withPaper({ ...PAPER, edition: 2025 }),
|
|
228
|
-
"papers.0.edition: 2025 is not one of editions[].edition (2026)",
|
|
224
|
+
"papers.0.edition: 2025 is not one of editions[].edition (2026); editions.0.accepted: 0 papers of 2026 are listed and 1 were accepted: list them all, or say in capped what was left out",
|
|
229
225
|
],
|
|
230
226
|
[
|
|
231
227
|
"an edition listed twice",
|
|
@@ -254,14 +250,19 @@ const REFUSED: readonly (readonly [string, string, string])[] = [
|
|
|
254
250
|
"papers.0.key: a letter or digit, then letters, digits, '_' or '-'",
|
|
255
251
|
],
|
|
256
252
|
[
|
|
257
|
-
"🔴 an edition that leaves out what was capped, and a proxy marking -1 papers",
|
|
253
|
+
"🔴 an edition that leaves out how many it accepted and what was capped, and a proxy marking -1 papers",
|
|
258
254
|
text({
|
|
259
255
|
...RECORD,
|
|
260
256
|
editions: [
|
|
261
|
-
{
|
|
257
|
+
{
|
|
258
|
+
...EDITION,
|
|
259
|
+
accepted: undefined,
|
|
260
|
+
capped: undefined,
|
|
261
|
+
proxy: { what: "award", papers: -1 },
|
|
262
|
+
},
|
|
262
263
|
],
|
|
263
264
|
}),
|
|
264
|
-
"editions.0.capped: Invalid input: expected string, received undefined; editions.0.proxy.papers: Too small: expected number to be >=0",
|
|
265
|
+
"editions.0.accepted: Invalid input: expected number, received undefined; editions.0.capped: Invalid input: expected string, received undefined; editions.0.proxy.papers: Too small: expected number to be >=0",
|
|
265
266
|
],
|
|
266
267
|
[
|
|
267
268
|
"🔴 a record without its rebuild commands",
|
|
@@ -302,36 +303,3 @@ describe("refusing what is not a papers.json", () => {
|
|
|
302
303
|
);
|
|
303
304
|
});
|
|
304
305
|
});
|
|
305
|
-
|
|
306
|
-
describe("venueCorpusJsonSchema — the shipped schema file", () => {
|
|
307
|
-
const SHIPPED = join(
|
|
308
|
-
dirname(fileURLToPath(import.meta.url)),
|
|
309
|
-
"../../../",
|
|
310
|
-
SCHEMA_FILE,
|
|
311
|
-
);
|
|
312
|
-
|
|
313
|
-
it("🔴 is the generated schema, byte for byte", () => {
|
|
314
|
-
// Guards: the schema the skill points at never drifts from the parser that judges the record.
|
|
315
|
-
expect(
|
|
316
|
-
readFileSync(SHIPPED, "utf8"),
|
|
317
|
-
`${SCHEMA_FILE} is stale: regenerate it with \`npm run schema:venue-corpus\``,
|
|
318
|
-
).toBe(venueCorpusSchemaText());
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
it("🔴 says the parser checks what a schema cannot, and names the record's fields", () => {
|
|
322
|
-
const schema = z
|
|
323
|
-
.looseObject({
|
|
324
|
-
description: z.string(),
|
|
325
|
-
properties: z.looseObject({}),
|
|
326
|
-
})
|
|
327
|
-
.parse(venueCorpusJsonSchema());
|
|
328
|
-
expect(schema.description).toContain("papers.json");
|
|
329
|
-
expect(schema.description).toContain("corpus-licences.js");
|
|
330
|
-
expect(Object.keys(schema.properties)).toEqual([
|
|
331
|
-
"venue",
|
|
332
|
-
"editions",
|
|
333
|
-
"papers",
|
|
334
|
-
"rebuild",
|
|
335
|
-
]);
|
|
336
|
-
});
|
|
337
|
-
});
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
PAPER_ID_KINDS,
|
|
22
22
|
type Copy,
|
|
23
23
|
type Edition,
|
|
24
|
+
editionCountIssue,
|
|
24
25
|
type Licence,
|
|
25
26
|
type ParsedCorpus,
|
|
26
27
|
type Paper,
|
|
@@ -172,7 +173,7 @@ const edition = z.strictObject({
|
|
|
172
173
|
edition: year,
|
|
173
174
|
listed_from: webUrl,
|
|
174
175
|
read_on: date,
|
|
175
|
-
accepted: count
|
|
176
|
+
accepted: count,
|
|
176
177
|
capped: words.nullable(),
|
|
177
178
|
proxy: proxy.nullable(),
|
|
178
179
|
});
|
|
@@ -215,7 +216,19 @@ const record = z
|
|
|
215
216
|
papers: z.array(paper),
|
|
216
217
|
rebuild: z.array(words),
|
|
217
218
|
})
|
|
218
|
-
.superRefine(consistent)
|
|
219
|
+
.superRefine(consistent)
|
|
220
|
+
.superRefine((r, ctx) => {
|
|
221
|
+
// Each edition's papers add up to what it accepted (the domain decides how).
|
|
222
|
+
r.editions.forEach((e, i) => {
|
|
223
|
+
const message = editionCountIssue(e, r.papers);
|
|
224
|
+
if (message !== null)
|
|
225
|
+
ctx.addIssue({
|
|
226
|
+
code: "custom",
|
|
227
|
+
path: ["editions", i, "accepted"],
|
|
228
|
+
message,
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
});
|
|
219
232
|
|
|
220
233
|
// ── the schemas ARE the domain's types (as in the study registry's adapter) ──────────────────
|
|
221
234
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The JSON Schema `study-accepted-papers` ships for `papers.json`: generated from the parser, so the
|
|
3
|
+
* fields an editor or a skill reads are the ones the record is judged by.
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from "node:fs";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { describe, expect, it } from "vitest";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import {
|
|
11
|
+
SCHEMA_FILE,
|
|
12
|
+
venueCorpusJsonSchema,
|
|
13
|
+
venueCorpusSchemaText,
|
|
14
|
+
} from "./index.ts";
|
|
15
|
+
|
|
16
|
+
describe("venueCorpusJsonSchema — the shipped schema file", () => {
|
|
17
|
+
const SHIPPED = join(
|
|
18
|
+
dirname(fileURLToPath(import.meta.url)),
|
|
19
|
+
"../../../",
|
|
20
|
+
SCHEMA_FILE,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
it("🔴 is the generated schema, byte for byte", () => {
|
|
24
|
+
// Guards: the schema the skill points at never drifts from the parser that judges the record.
|
|
25
|
+
expect(
|
|
26
|
+
readFileSync(SHIPPED, "utf8"),
|
|
27
|
+
`${SCHEMA_FILE} is stale: regenerate it with \`npm run schema:venue-corpus\``,
|
|
28
|
+
).toBe(venueCorpusSchemaText());
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("🔴 says the parser checks what a schema cannot, and names the record's fields", () => {
|
|
32
|
+
const schema = z
|
|
33
|
+
.looseObject({
|
|
34
|
+
description: z.string(),
|
|
35
|
+
properties: z.looseObject({}),
|
|
36
|
+
})
|
|
37
|
+
.parse(venueCorpusJsonSchema());
|
|
38
|
+
expect(schema.description).toContain("papers.json");
|
|
39
|
+
expect(schema.description).toContain("corpus-licences.js");
|
|
40
|
+
expect(Object.keys(schema.properties)).toEqual([
|
|
41
|
+
"venue",
|
|
42
|
+
"editions",
|
|
43
|
+
"papers",
|
|
44
|
+
"rebuild",
|
|
45
|
+
]);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { editionCountIssue, type Edition, type Paper } from "./venue-corpus.ts";
|
|
3
|
+
|
|
4
|
+
const EDITION: Edition = {
|
|
5
|
+
edition: 2026,
|
|
6
|
+
listed_from: "https://example.org/accepted",
|
|
7
|
+
read_on: "2026-11-03",
|
|
8
|
+
accepted: 2,
|
|
9
|
+
capped: null,
|
|
10
|
+
proxy: null,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const row = (
|
|
14
|
+
key: string,
|
|
15
|
+
group: "accepted" | "award",
|
|
16
|
+
edition = 2026,
|
|
17
|
+
): Paper => ({
|
|
18
|
+
key,
|
|
19
|
+
edition,
|
|
20
|
+
group,
|
|
21
|
+
title: key,
|
|
22
|
+
ids: { doi: `10.1/${key}` },
|
|
23
|
+
copies: [],
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const SISTER: Paper = {
|
|
27
|
+
key: "other",
|
|
28
|
+
group: "sister",
|
|
29
|
+
venue: "nlbse",
|
|
30
|
+
year: 2026,
|
|
31
|
+
listed_from: "https://example.org/nlbse",
|
|
32
|
+
title: "other",
|
|
33
|
+
ids: { doi: "10.1/other" },
|
|
34
|
+
copies: [],
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
describe("an edition's papers against what it accepted", () => {
|
|
38
|
+
it("🔴 uncapped: the winners and the ordinary papers together are all it accepted", () => {
|
|
39
|
+
// Guards: an award row is one of the accepted papers; a sister or another edition's row is not.
|
|
40
|
+
expect(
|
|
41
|
+
editionCountIssue(EDITION, [
|
|
42
|
+
row("a", "accepted"),
|
|
43
|
+
row("b", "award"),
|
|
44
|
+
row("c", "accepted", 2025),
|
|
45
|
+
SISTER,
|
|
46
|
+
]),
|
|
47
|
+
).toBeNull();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it("🔴 uncapped: fewer rows than it accepted is a list copied in part", () => {
|
|
51
|
+
expect(editionCountIssue(EDITION, [row("a", "accepted")])).toBe(
|
|
52
|
+
"1 papers of 2026 are listed and 2 were accepted: list them all, or say in capped what was left out",
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("🔴 uncapped: more rows than it accepted", () => {
|
|
57
|
+
expect(
|
|
58
|
+
editionCountIssue(EDITION, [
|
|
59
|
+
row("a", "accepted"),
|
|
60
|
+
row("b", "accepted"),
|
|
61
|
+
row("c", "award"),
|
|
62
|
+
]),
|
|
63
|
+
).toBe(
|
|
64
|
+
"3 papers of 2026 are listed and 2 were accepted: list them all, or say in capped what was left out",
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("🔴 capped: fewer rows than it accepted is what capped says", () => {
|
|
69
|
+
expect(
|
|
70
|
+
editionCountIssue({ ...EDITION, capped: "the research track only" }, [
|
|
71
|
+
row("a", "accepted"),
|
|
72
|
+
]),
|
|
73
|
+
).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it("🔴 capped: still never more rows than it accepted", () => {
|
|
77
|
+
expect(
|
|
78
|
+
editionCountIssue({ ...EDITION, capped: "the research track only" }, [
|
|
79
|
+
row("a", "accepted"),
|
|
80
|
+
row("b", "accepted"),
|
|
81
|
+
row("c", "accepted"),
|
|
82
|
+
]),
|
|
83
|
+
).toBe("3 papers of 2026 are listed, more than the 2 it accepted");
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -41,8 +41,11 @@ export interface Edition {
|
|
|
41
41
|
/** The page that lists what the edition accepted. */
|
|
42
42
|
readonly listed_from: string;
|
|
43
43
|
readonly read_on: string;
|
|
44
|
-
/**
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* How many it accepted: the rows of the page that lists them. Without `capped` the corpus lists
|
|
46
|
+
* exactly this many of the edition's papers; with it, at most this many.
|
|
47
|
+
*/
|
|
48
|
+
readonly accepted: number;
|
|
46
49
|
/** What was left out of the edition and why; null when nothing was (never left out). */
|
|
47
50
|
readonly capped: string | null;
|
|
48
51
|
/** The stand-in for "strong accept" in this edition; null when it has none. */
|
|
@@ -157,3 +160,25 @@ export const pathText = (path: RecordPath): string =>
|
|
|
157
160
|
/** Every problem on one line, each with its path. */
|
|
158
161
|
export const problemsText = (problems: readonly CorpusProblem[]): string =>
|
|
159
162
|
`${CORPUS_RECORD}: ${problems.map((p) => `${pathText(p.path)}: ${p.message}`).join("; ")}`;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* What an edition lists against what it accepted, or null when they agree: without `capped` its
|
|
166
|
+
* papers (`accepted` and `award` rows; a `sister` is another venue's) number exactly `accepted`,
|
|
167
|
+
* with `capped` at most that many.
|
|
168
|
+
*/
|
|
169
|
+
export const editionCountIssue = (
|
|
170
|
+
edition: Readonly<Edition>,
|
|
171
|
+
papers: readonly Paper[],
|
|
172
|
+
): string | null => {
|
|
173
|
+
const listed = papers.filter(
|
|
174
|
+
(p) => p.group !== "sister" && p.edition === edition.edition,
|
|
175
|
+
).length;
|
|
176
|
+
const tally = `${String(listed)} papers of ${String(edition.edition)} are listed`;
|
|
177
|
+
if (edition.capped === null)
|
|
178
|
+
return listed === edition.accepted
|
|
179
|
+
? null
|
|
180
|
+
: `${tally} and ${String(edition.accepted)} were accepted: list them all, or say in capped what was left out`;
|
|
181
|
+
return listed > edition.accepted
|
|
182
|
+
? `${tally}, more than the ${String(edition.accepted)} it accepted`
|
|
183
|
+
: null;
|
|
184
|
+
};
|