paperlint 20.1.1 → 20.1.2
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/.github/workflows/ci.yml +7 -0
- package/CLAUDE.md +2 -2
- package/CONTRIBUTING.md +2 -2
- package/{action.harness.mjs → action.test.mjs} +147 -138
- package/dist/eslint-rules/papers.js +1 -1
- package/dist/latex-log.d.ts +1 -1
- package/dist/latex-log.js +1 -1
- package/dist/latex-loop.d.ts +1 -1
- package/dist/latex-loop.js +1 -1
- package/dist/lib/paper-config.d.ts +3 -3
- package/dist/lib/paper-config.js +3 -3
- package/docs/e2e.md +9 -9
- package/docs/testing.md +3 -4
- package/eslint-rules/{install-path-literals.harness.mjs → install-path-literals.test.mjs} +14 -13
- package/eslint-rules/{latex-language.harness.mjs → latex-language-rules.test.mjs} +61 -51
- package/eslint-rules/{paper-stages.harness.mjs → paper-stages-rule.test.mjs} +66 -69
- package/eslint-rules/{papers.harness.mjs → papers.test.mjs} +41 -30
- package/eslint-rules/papers.ts +1 -1
- package/eslint-rules/{pdf-last-page-balance.harness.mjs → pdf-last-page-balance.test.mjs} +27 -15
- package/eslint-rules/{temp-root-realpath.harness.mjs → temp-root-realpath.test.mjs} +24 -24
- package/eslint-rules/{tex-build.harness.mjs → tex-build.test.mjs} +292 -271
- package/eslint.config.mjs +15 -2
- package/fixtures/pdf-facts/README.md +1 -1
- package/fixtures/render-paper/build-clean.sh +1 -1
- package/fixtures/toolchain-mirror/install-tl +1 -1
- package/lib/{agent-cli-version.harness.mjs → agent-cli-version.test.mjs} +17 -18
- package/lib/{paper-config.harness.mjs → paper-config.test.mjs} +21 -20
- package/lib/paper-config.ts +3 -3
- package/lib/{skill-trigger-cases.harness.mjs → skill-trigger-cases-carrier.test.mjs} +78 -115
- package/package.json +3 -3
- package/presets/acm-acmsmall.jsonc +1 -1
- package/scripts/check-workflow.test.ts +368 -0
- package/scripts/check.ts +2 -2
- package/scripts/eslint-file-length.mjs +9 -9
- package/scripts/eslint-report-guard.mjs +1 -1
- package/scripts/eslint-report-guard.test.mjs +1 -1
- package/scripts/harness-api.test.ts +7 -46
- package/scripts/{rules-see-files.harness.mjs → rules-see-files-rule.test.mjs} +10 -6
- package/scripts/rules-see-files.mjs +1 -1
- package/skills/paper-pipeline/{paper-pipeline.harness.mjs → paper-pipeline.test.mjs} +45 -46
- package/skills/paper-pipeline/scripts/{consumer.harness.mjs → consumer-paths.test.mjs} +66 -59
- package/skills/paper-pipeline/scripts/consumer.mjs +3 -3
- package/skills/paper-pipeline/scripts/{extract-ref-facts.harness.mjs → extract-ref-facts-cli.test.mjs} +29 -31
- package/skills/paper-pipeline/scripts/fixtures/real-bib/refs.bib +1 -1
- package/skills/paper-pipeline/scripts/{generated-code.harness.mjs → generated-code-fixtures.test.mjs} +39 -46
- package/skills/render-paper/{extract-pdf-facts.harness.ts → extract-pdf-facts.test.ts} +20 -13
- package/skills/render-paper/{render-paper.harness.mjs → render-paper.test.mjs} +41 -40
- package/src/adapters/pdfjs/fill.test.ts +1 -1
- package/src/{build-engine.harness.mjs → build-engine-prepare.test.mjs} +98 -81
- package/src/{build.harness.mjs → build-fake-tex.test.mjs} +61 -28
- package/src/{cli.harness.mjs → cli-e2e.test.mjs} +108 -102
- package/src/cli.test.ts +1 -1
- package/src/{doctor.harness.mjs → doctor-install.test.mjs} +28 -29
- package/src/{engine.harness.mjs → engine.test.mjs} +120 -106
- package/src/facts-file.test.ts +1 -1
- package/src/{hooks-settings.harness.ts → hooks-settings.test.ts} +161 -146
- package/src/latex-log.test.ts +395 -0
- package/src/latex-log.ts +1 -1
- package/src/latex-loop.test.ts +553 -0
- package/src/latex-loop.ts +1 -1
- package/src/{link-skills.harness.ts → link-skills-fs.test.ts} +26 -26
- package/src/{new-paper.harness.mjs → new-paper-scaffold.test.mjs} +31 -19
- package/src/{pdf-facts.harness.ts → pdf-facts-tables.test.ts} +28 -22
- package/src/{pdf-geometry.harness.ts → pdf-geometry.test.ts} +93 -75
- package/src/{rules-config.harness.ts → rules-config.test.ts} +41 -31
- package/src/{structure.harness.ts → structure.test.ts} +12 -10
- package/src/{tex-requirements.harness.ts → tex-requirements-tables.test.ts} +106 -85
- package/src/{toolchain.harness.mjs → toolchain-mirror.test.mjs} +204 -186
- package/scripts/check.harness.ts +0 -343
- package/scripts/harness-api.frozen.json +0 -41
- package/src/latex-log.harness.ts +0 -382
- package/src/latex-loop.harness.ts +0 -515
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
* for nothing — and a reformat of the user's own file is a change they did not ask for;
|
|
13
13
|
* - a doctor that says "wired" over nothing, or offers a remedy `init` then refuses to apply.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* as a pass.
|
|
15
|
+
* The tests run in order, on the temp projects the earlier ones made.
|
|
17
16
|
*/
|
|
17
|
+
import { afterAll, describe, expect, it } from "vitest";
|
|
18
|
+
import { failureMessage } from "../lib/check.ts";
|
|
18
19
|
import {
|
|
19
20
|
existsSync,
|
|
20
21
|
mkdirSync,
|
|
@@ -26,7 +27,6 @@ import {
|
|
|
26
27
|
} from "node:fs";
|
|
27
28
|
import { tmpdir } from "node:os";
|
|
28
29
|
import { join } from "node:path";
|
|
29
|
-
import { createChecker } from "../lib/check.ts";
|
|
30
30
|
import { isDeepStrictEqual } from "node:util";
|
|
31
31
|
import { z } from "zod";
|
|
32
32
|
import type { Merge, Settings } from "./hooks-settings.ts";
|
|
@@ -54,20 +54,28 @@ const { claudeCodeHookProtocol } = await import("vigiles/claude-code");
|
|
|
54
54
|
const merge: Merge = (e, c, m) =>
|
|
55
55
|
claudeCodeHookProtocol.mergeRegistrations(e, c, m);
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
// A failed check is recorded and the rest of the test keeps running.
|
|
58
|
+
const check = (label: string, cond: unknown, detail?: unknown): void => {
|
|
59
|
+
expect.soft(cond, failureMessage(label, detail)).toBeTruthy();
|
|
60
|
+
};
|
|
58
61
|
|
|
59
62
|
// ── the contract with vigiles, checked before anything relies on it ──────────────────────
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
it("the contract with vigiles, checked before anything relies on it", () => {
|
|
64
|
+
check(
|
|
65
|
+
"🔴 vigiles/claude-code exports claudeCodeHookProtocol.mergeRegistrations — the merge init calls",
|
|
66
|
+
typeof claudeCodeHookProtocol.mergeRegistrations === "function",
|
|
67
|
+
);
|
|
68
|
+
});
|
|
64
69
|
|
|
65
70
|
// ── the one source: plugin/hooks/hooks.json ─────────────────────────────────────────────
|
|
66
71
|
const wiring = shippedWiring();
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
)
|
|
72
|
+
it("the one source: plugin/hooks/hooks.json", () => {
|
|
73
|
+
check(
|
|
74
|
+
"the hook names are DERIVED from hooks.json — three, in its order",
|
|
75
|
+
wiring.names.join() ===
|
|
76
|
+
"submission-confirm,paper-folder-layout,lint-edited",
|
|
77
|
+
);
|
|
78
|
+
});
|
|
71
79
|
// ── settings written by hand: shapes Claude Code would ignore are skipped, not crashed on ──
|
|
72
80
|
const MALFORMED = {
|
|
73
81
|
PreToolUse: "npx paperlint hook submission-confirm",
|
|
@@ -75,12 +83,14 @@ const MALFORMED = {
|
|
|
75
83
|
Stop: [{ hooks: [{ type: "command" }, null] }],
|
|
76
84
|
};
|
|
77
85
|
const zero = { ours: 0, other: 0, places: 0 };
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
JSON.stringify(
|
|
82
|
-
)
|
|
83
|
-
|
|
86
|
+
it("settings written by hand: shapes Claude Code would ignore are skipped, not crashed on", () => {
|
|
87
|
+
check(
|
|
88
|
+
"an event that is not a list, an entry with no `hooks` list, a handler with no command → no commands",
|
|
89
|
+
JSON.stringify(wiredCounts({ hooks: MALFORMED }, wiring.names)) ===
|
|
90
|
+
JSON.stringify(wiring.names.map((name) => ({ name, ...zero }))),
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
it("a wiring file without `hooks` names no hook", () => {
|
|
84
94
|
const file = join(tmpdir(), `paperlint-no-hooks-${String(process.pid)}.json`);
|
|
85
95
|
writeFileSync(file, "{}\n");
|
|
86
96
|
let thrown = "";
|
|
@@ -95,72 +105,80 @@ check(
|
|
|
95
105
|
thrown === `${file} names no paperlint hook — there is nothing to wire`,
|
|
96
106
|
thrown,
|
|
97
107
|
);
|
|
98
|
-
}
|
|
108
|
+
});
|
|
99
109
|
|
|
100
110
|
const work = realpathSync(mkdtempSync(join(tmpdir(), "paperlint-hooks-")));
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
let threw = false;
|
|
105
|
-
try {
|
|
106
|
-
shippedWiring(empty);
|
|
107
|
-
} catch {
|
|
108
|
-
threw = true;
|
|
109
|
-
}
|
|
110
|
-
check(
|
|
111
|
-
"a wiring file naming no hook THROWS — wiring nothing must not read as wired",
|
|
112
|
-
threw,
|
|
113
|
-
);
|
|
111
|
+
afterAll(() => {
|
|
112
|
+
rmSync(work, { recursive: true, force: true });
|
|
113
|
+
});
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
'{"hooks":{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
why,
|
|
130
|
-
);
|
|
115
|
+
describe("the hooks land in .claude/settings.json once", () => {
|
|
116
|
+
it("a wiring file that is empty or malformed THROWS", () => {
|
|
117
|
+
const empty = join(work, "empty-hooks.json");
|
|
118
|
+
writeFileSync(empty, '{"hooks":{}}');
|
|
119
|
+
let threw = false;
|
|
120
|
+
try {
|
|
121
|
+
shippedWiring(empty);
|
|
122
|
+
} catch {
|
|
123
|
+
threw = true;
|
|
124
|
+
}
|
|
125
|
+
check(
|
|
126
|
+
"a wiring file naming no hook THROWS — wiring nothing must not read as wired",
|
|
127
|
+
threw,
|
|
128
|
+
);
|
|
131
129
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
],
|
|
144
|
-
[
|
|
145
|
-
`npx paperlint hook paper-folder-layout`,
|
|
146
|
-
{ name: "paper-folder-layout", ours: false },
|
|
147
|
-
],
|
|
148
|
-
[
|
|
149
|
-
`npx paperlint hook paper-folder-layout`,
|
|
150
|
-
{ name: "paper-folder-layout", ours: false },
|
|
151
|
-
],
|
|
152
|
-
[
|
|
153
|
-
`node /abs/proj/node_modules/paperlint/bin/paperlint.mjs hook submission-confirm`,
|
|
154
|
-
{ name: "submission-confirm", ours: false },
|
|
155
|
-
],
|
|
156
|
-
[`node my-own-lint.mjs`, null],
|
|
157
|
-
[`node node_modules/paperlint/bin/paperlint.mjs lint`, null],
|
|
158
|
-
];
|
|
159
|
-
for (const [cmd, want] of cases)
|
|
130
|
+
const malformed = join(work, "malformed-hooks.json");
|
|
131
|
+
writeFileSync(
|
|
132
|
+
malformed,
|
|
133
|
+
'{"hooks":{"PreToolUse":[{"hooks":[{"type":"command"}]}]}}',
|
|
134
|
+
);
|
|
135
|
+
let why = "";
|
|
136
|
+
try {
|
|
137
|
+
shippedWiring(malformed);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
why = e instanceof Error ? e.message : String(e);
|
|
140
|
+
}
|
|
160
141
|
check(
|
|
161
|
-
`
|
|
162
|
-
|
|
142
|
+
"a wiring file whose `hooks` is not Claude Code's shape THROWS, naming the shape",
|
|
143
|
+
why.startsWith(`${malformed}: "hooks" is not a map of event`),
|
|
144
|
+
why,
|
|
163
145
|
);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ── which spelling runs which hook ─────────────────────────────────────────────────────
|
|
149
|
+
it("which spelling runs which hook", () => {
|
|
150
|
+
const ours = `node "\${CLAUDE_PROJECT_DIR}/${MANAGED_BY}" hook submission-confirm`;
|
|
151
|
+
const cases: [string, { name: string; ours: boolean } | null][] = [
|
|
152
|
+
[ours, { name: "submission-confirm", ours: true }],
|
|
153
|
+
[
|
|
154
|
+
`node "$CLAUDE_PROJECT_DIR/${MANAGED_BY}" hook lint-edited`,
|
|
155
|
+
{ name: "lint-edited", ours: true },
|
|
156
|
+
],
|
|
157
|
+
[
|
|
158
|
+
`node "$CLAUDE_PROJECT_DIR/node_modules/vigiles/dist/cli.js" hook-runtime run-program "$CLAUDE_PROJECT_DIR/node_modules/paperlint/hooks/submission-confirm.hook.mjs"`,
|
|
159
|
+
{ name: "submission-confirm", ours: false },
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
`npx paperlint hook paper-folder-layout`,
|
|
163
|
+
{ name: "paper-folder-layout", ours: false },
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
`npx paperlint hook paper-folder-layout`,
|
|
167
|
+
{ name: "paper-folder-layout", ours: false },
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
`node /abs/proj/node_modules/paperlint/bin/paperlint.mjs hook submission-confirm`,
|
|
171
|
+
{ name: "submission-confirm", ours: false },
|
|
172
|
+
],
|
|
173
|
+
[`node my-own-lint.mjs`, null],
|
|
174
|
+
[`node node_modules/paperlint/bin/paperlint.mjs lint`, null],
|
|
175
|
+
];
|
|
176
|
+
for (const [cmd, want] of cases)
|
|
177
|
+
check(
|
|
178
|
+
`hookRun(${cmd.slice(0, 60)}…) → ${JSON.stringify(want)}`,
|
|
179
|
+
JSON.stringify(hookRun(cmd)) === JSON.stringify(want),
|
|
180
|
+
);
|
|
181
|
+
});
|
|
164
182
|
|
|
165
183
|
const project = (name: string, settings?: Settings | string) => {
|
|
166
184
|
const dir = join(work, name);
|
|
@@ -182,7 +200,7 @@ try {
|
|
|
182
200
|
};
|
|
183
201
|
|
|
184
202
|
// ── a fresh project ────────────────────────────────────────────────────────────────────
|
|
185
|
-
{
|
|
203
|
+
it("a fresh project", () => {
|
|
186
204
|
const dir = join(work, "fresh");
|
|
187
205
|
mkdirSync(dir);
|
|
188
206
|
const r = wireHooks(dir, merge, wiring);
|
|
@@ -200,10 +218,10 @@ try {
|
|
|
200
218
|
"🔴 a second run changes NOTHING — byte-identical, status `present`",
|
|
201
219
|
again.status === "present" && text(dir) === before,
|
|
202
220
|
);
|
|
203
|
-
}
|
|
221
|
+
});
|
|
204
222
|
|
|
205
223
|
// ── the user's own hooks and keys survive ──────────────────────────────────────────────
|
|
206
|
-
{
|
|
224
|
+
it("the user's own hooks and keys survive", () => {
|
|
207
225
|
const dir = project("user", {
|
|
208
226
|
permissions: { allow: ["Bash(ls:*)"] },
|
|
209
227
|
hooks: {
|
|
@@ -231,10 +249,10 @@ try {
|
|
|
231
249
|
(c) => c.ours === wiring.times[c.name],
|
|
232
250
|
),
|
|
233
251
|
);
|
|
234
|
-
}
|
|
252
|
+
});
|
|
235
253
|
|
|
236
254
|
// ── already wired, in someone else's formatting → the file is not touched ──────────────
|
|
237
|
-
{
|
|
255
|
+
it("already wired, in someone else's formatting → the file is not touched", () => {
|
|
238
256
|
const wired = merge({}, wiring.compiled, MANAGED_BY);
|
|
239
257
|
const fourSpaces = JSON.stringify(wired, null, 4);
|
|
240
258
|
const dir = project("formatted", fourSpaces);
|
|
@@ -243,10 +261,10 @@ try {
|
|
|
243
261
|
"🔴 wired already → nothing is rewritten, not even to our indentation",
|
|
244
262
|
r.status === "present" && text(dir) === fourSpaces,
|
|
245
263
|
);
|
|
246
|
-
}
|
|
264
|
+
});
|
|
247
265
|
|
|
248
266
|
// ── another spelling of the same hook → write NOTHING ──────────────────────────────────
|
|
249
|
-
{
|
|
267
|
+
it("another spelling of the same hook → write NOTHING", () => {
|
|
250
268
|
const handWired = {
|
|
251
269
|
hooks: {
|
|
252
270
|
PreToolUse: [
|
|
@@ -291,10 +309,10 @@ try {
|
|
|
291
309
|
"(control) vigiles' merge alone would wire submission-confirm TWICE here",
|
|
292
310
|
c?.ours === 1 && c.other === 1,
|
|
293
311
|
);
|
|
294
|
-
}
|
|
312
|
+
});
|
|
295
313
|
|
|
296
314
|
// ── a file that does not parse is reported, never overwritten ──────────────────────────
|
|
297
|
-
{
|
|
315
|
+
it("a file that does not parse is reported, never overwritten", () => {
|
|
298
316
|
const dir = project("broken", "{ not json");
|
|
299
317
|
const r = wireHooks(dir, merge, wiring);
|
|
300
318
|
check(
|
|
@@ -305,68 +323,65 @@ try {
|
|
|
305
323
|
"an array is not a settings object either",
|
|
306
324
|
readSettings(project("array", "[]\n")).status === "unparsable",
|
|
307
325
|
);
|
|
308
|
-
}
|
|
326
|
+
});
|
|
309
327
|
|
|
310
328
|
// ── doctor's section ───────────────────────────────────────────────────────────────────
|
|
329
|
+
let docs = 0;
|
|
311
330
|
const doc = (settings?: Settings | string) => {
|
|
312
|
-
const dir = project(`doc-${String(
|
|
331
|
+
const dir = project(`doc-${String(++docs)}`, settings);
|
|
313
332
|
return doctorHooks(dir, wiring).lines.join("\n");
|
|
314
333
|
};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
/
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
334
|
+
it("doctor's section", () => {
|
|
335
|
+
const wiredOnce = merge({}, wiring.compiled, MANAGED_BY);
|
|
336
|
+
check(
|
|
337
|
+
"wired as shipped → ✓ wired, with the fresh-clone consequence",
|
|
338
|
+
/✓ wired — submission-confirm, paper-folder-layout, lint-edited, each as shipped/.test(
|
|
339
|
+
doc(wiredOnce),
|
|
340
|
+
) && /cannot run until `npm install`/.test(doc(wiredOnce)),
|
|
341
|
+
);
|
|
342
|
+
check(
|
|
343
|
+
"nothing wired → ⚠ not wired, with the remedy",
|
|
344
|
+
/⚠ not wired — none of the 3 hooks/.test(doc({})),
|
|
345
|
+
);
|
|
346
|
+
const twice = PreToolUseSettings.parse(structuredClone(wiredOnce));
|
|
347
|
+
twice.hooks.PreToolUse[0]?.hooks.push({
|
|
348
|
+
type: "command",
|
|
349
|
+
command: "npx paperlint hook submission-confirm",
|
|
350
|
+
});
|
|
351
|
+
const twiceText = doc(twice);
|
|
352
|
+
check(
|
|
353
|
+
"🔴 the same hook under two spellings → ⚠ wired TWICE, naming it with its count",
|
|
354
|
+
/wired TWICE/.test(twiceText) &&
|
|
355
|
+
/submission-confirm ×2/.test(twiceText) &&
|
|
356
|
+
!/✓ wired/.test(twiceText),
|
|
357
|
+
);
|
|
358
|
+
const handPartial = doc({
|
|
359
|
+
hooks: {
|
|
360
|
+
PreToolUse: [
|
|
361
|
+
{
|
|
362
|
+
matcher: "Bash",
|
|
363
|
+
hooks: [
|
|
364
|
+
{ type: "command", command: "npx paperlint hook lint-edited" },
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
check(
|
|
371
|
+
"🔴 partly wired BY HAND → the remedy is NOT `npx paperlint init`, which would refuse to write",
|
|
372
|
+
/partly wired — missing: submission-confirm, paper-folder-layout/.test(
|
|
373
|
+
handPartial,
|
|
374
|
+
) && /writes nothing then/.test(handPartial),
|
|
375
|
+
);
|
|
376
|
+
check(
|
|
377
|
+
"an unparsable file is named in doctor, not crashed on",
|
|
378
|
+
/does not parse/.test(
|
|
379
|
+
doctorHooks(project("doc-broken", "{"), wiring).lines.join("\n"),
|
|
380
|
+
),
|
|
381
|
+
);
|
|
382
|
+
check(
|
|
383
|
+
"(the scratch projects exist — nothing above was vacuous)",
|
|
384
|
+
existsSync(work),
|
|
385
|
+
);
|
|
349
386
|
});
|
|
350
|
-
|
|
351
|
-
"🔴 partly wired BY HAND → the remedy is NOT `npx paperlint init`, which would refuse to write",
|
|
352
|
-
/partly wired — missing: submission-confirm, paper-folder-layout/.test(
|
|
353
|
-
handPartial,
|
|
354
|
-
) && /writes nothing then/.test(handPartial),
|
|
355
|
-
);
|
|
356
|
-
check(
|
|
357
|
-
"an unparsable file is named in doctor, not crashed on",
|
|
358
|
-
/does not parse/.test(
|
|
359
|
-
doctorHooks(project("doc-broken", "{"), wiring).lines.join("\n"),
|
|
360
|
-
),
|
|
361
|
-
);
|
|
362
|
-
check(
|
|
363
|
-
"(the scratch projects exist — nothing above was vacuous)",
|
|
364
|
-
existsSync(work),
|
|
365
|
-
);
|
|
366
|
-
} finally {
|
|
367
|
-
rmSync(work, { recursive: true, force: true });
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
console.log(
|
|
371
|
-
`✓ ${String(check.count)} assertions passed — the hooks land in .claude/settings.json once`,
|
|
372
|
-
);
|
|
387
|
+
});
|