Corpus test: the instructions for adding a board run scripts/corpus.mjs, which does not exist #20

Closed
opened 2026-10-01 10:47:17 +00:00 by tiagoagueda · 0 comments
Owner

Found on 2026-09-29 in a read-only review of postulo-chromium at 7998de372, by following the corpus test's instructions for adding a board.

The comment at the top of the corpus test tells a contributor adding a board to "run node scripts/corpus.mjs <url> to see what is read off it now". scripts/ holds only build.mjs and icons.py, nothing else in the repository names corpus.mjs, and the repository's history has never held a file at that path.

  • Where: test/corpus.test.mjs:14, the "Adding a board" paragraph.
  • What happens: a contributor following the documented way to add a board fixture gets "Cannot find module" from Node at the first step.
  • Why it matters: the corpus is the only test here that measures accuracy, and its one written procedure for growing it starts with a step that cannot be run.
  • Fix: either add scripts/corpus.mjs, which reads a saved page (a file path is enough; fetching a URL is not needed) with jsdom and prints what readPosting() and readPostings() from src/lib/parse.js return, as test/corpus.test.mjs already does; or rewrite the paragraph to describe the manual steps. If the script is added, list it in the layout table in README.md.

Done when

  • Either node scripts/corpus.mjs test/fixtures/<name>.html prints the fields read off that fixture, or test/corpus.test.mjs no longer names a script that does not exist.
Found on 2026-09-29 in a read-only review of postulo-chromium at 7998de372, by following the corpus test's instructions for adding a board. The comment at the top of the corpus test tells a contributor adding a board to "run `node scripts/corpus.mjs <url>` to see what is read off it now". `scripts/` holds only `build.mjs` and `icons.py`, nothing else in the repository names `corpus.mjs`, and the repository's history has never held a file at that path. - **Where:** `test/corpus.test.mjs:14`, the "Adding a board" paragraph. - **What happens:** a contributor following the documented way to add a board fixture gets "Cannot find module" from Node at the first step. - **Why it matters:** the corpus is the only test here that measures accuracy, and its one written procedure for growing it starts with a step that cannot be run. - **Fix:** either add `scripts/corpus.mjs`, which reads a saved page (a file path is enough; fetching a URL is not needed) with `jsdom` and prints what `readPosting()` and `readPostings()` from `src/lib/parse.js` return, as `test/corpus.test.mjs` already does; or rewrite the paragraph to describe the manual steps. If the script is added, list it in the layout table in `README.md`. ## Done when - Either `node scripts/corpus.mjs test/fixtures/<name>.html` prints the fields read off that fixture, or `test/corpus.test.mjs` no longer names a script that does not exist.
tiagoagueda added this to the 0.6.0 milestone 2026-10-01 10:47:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo-chromium#20
No description provided.