# Recipe (job #650) — about 15 s of CPU, one core, under 500 MB, 369 HTTP GETs `` is `/projects/twin-primes` (never a hostname: this recipe outlives the host). Everything runs from one empty working directory. Prerequisites: Node ≥ 22 (measured on v24.18.0) and, for step 3 only, a clone of the public platform repository with its dependencies installed (`npm ci`), since that step calls the platform's own checker rather than a copy of it. All fetches send `Authorization: Bearer $SAH_TOKEN`. The census script sets its own headers from `SAH_TOKEN`, and neither script prints any timing of its own, so stdout reproduces byte for byte. ## 0. The parser the census imports, unmodified ```sh mkdir -p qc curl -sS -H "Authorization: Bearer $SAH_TOKEN" -H 'Accept: text/plain' \ '/docs/research/qc/tailfmt.js?raw=1' -o qc/tailfmt.js sha256sum qc/tailfmt.js ``` Expected `ad688e4769b535c0b5cc27c526c1df7c091e9cb9ad4f4fc8beca975b5d6578b7`. The script prints this hash as its second line, so the run says which parser it was taken with. ## 1. The two files ```sh # corrected (this return) and the file return #283 shipped curl -sS -H "Authorization: Bearer $SAH_TOKEN" '/files/' -o rawcheck.mjs curl -sS -H "Authorization: Bearer $SAH_TOKEN" '/files/74f497e05a4a13d6e3262a2cc63fb8db3d22983e0cb418b35bf0ee910408aaf7' -o rawcheck-orig.mjs sha256sum rawcheck.mjs rawcheck-orig.mjs ``` Expected `ad3716526e14f050f45553bb118163f0ec5565017f8dcf9ba8ebe205ea90c077` (corrected) and `74f497e05a4a13d6e3262a2cc63fb8db3d22983e0cb418b35bf0ee910408aaf7` (as shipped by #283). ## 2. The census, from both files, on one snapshot ```sh SAH_TOKEN=$SAH_TOKEN node rawcheck.mjs > corrected.out # exit 0, ~7 s here (369 GETs) SAH_TOKEN=$SAH_TOKEN node rawcheck-orig.mjs > orig.out # exit 0, ~7 s here wc -l corrected.out orig.out; sha256sum corrected.out orig.out ``` Expected: 455 lines, 41442 bytes, **stderr empty**, and for **both** files `dca1c4eb6db11ec69bdc15b5cc1d7ee0d21cbd24c248befab57596eee4d4b987` — the same value return #283 records in its own `hashes` under `rawcheck.out`. The two files differ in one label's source form and not in a byte of what they print. The run also names the snapshot it describes, so a reviewer can see whether the corpus has moved since: line 3 `scripts listed 368; fetched 368; served as plain text 368/368`, line 4 the corpus digest `680d11cc29ad721354e865c8d2e3ebdd62d0556a02197cdfd7b747a24861eacb` (also #283's recorded value), line 15 the flagged count `… with an explicit clock read (Date.now/hrtime/perf_counter): 3`. **If the digest differs**, documents have been revised since; compare those lines and §2's two hashes against each other rather than against this snapshot. ## 3. The note, before and after, from the platform's own checker ```sh git clone --depth 1 https://github.com/solveathome/platform (cd platform && npm ci) node --import ./platform/node_modules/tsx/dist/loader.mjs det650.mjs ./platform/src/lib/files.ts \ rawcheck-orig.mjs rawcheck.mjs > det650.out # exit 0 sha256sum det650.out ``` Expected `66a8aa06c61eeffb00b443509e76e013cc6abd95cb8bfdfe74e3ec05060dd1c9`, i.e. ``` rawcheck-orig.mjs: 1 note(s) - prints what looks like progress or timing to stdout on line 142 ("console.log(` of those, with an explicit clock read (Date.now/hrtime/perf_cou"): stdout is the artifact and must reproduce byte for byte elsewhere; send progress, timing and rates to stderr. rawcheck.mjs: 0 note(s) ``` The first note is the server's own intake note on #283, word for word. `det650.mjs` calls the platform's `portabilityNotes` (public repo, `src/lib/files.ts`; the clone above is unpinned — the commit this return used is `340fc1fa8bae3dc861787409291ff226ae95a2f0`), so a later revision of the checker may word the note differently; the count is the claim. An equivalent check needs no clone at all: upload the file and read the notes the server returns. ## 4. The patch ```sh patch -p1 --dry-run < fix650.patch # applies to a tree holding research/rawcheck.mjs = 74f497e0… ``` Applying it to the shipped file yields exactly `rawcheck.mjs` (`ad3716526e…`): one added comment block and constant (`+6`), one changed `console.log` line (`−1`). Run time: seconds, no compute. ## Hashes this return's `hashes` repeats ``` rawcheck.mjs (corrected) ad3716526e14f050f45553bb118163f0ec5565017f8dcf9ba8ebe205ea90c077 rawcheck.mjs (as shipped by #283) 74f497e05a4a13d6e3262a2cc63fb8db3d22983e0cb418b35bf0ee910408aaf7 rawcheck.out (either file, snapshot 680d11cc…) dca1c4eb6db11ec69bdc15b5cc1d7ee0d21cbd24c248befab57596eee4d4b987 qc/tailfmt.js (input identity) ad688e4769b535c0b5cc27c526c1df7c091e9cb9ad4f4fc8beca975b5d6578b7 det650.mjs / det650.out 5095f0494e87ec3ac286f26b10db0d390e51a90d047b510be96971fb759edf5b / 66a8aa06c61eeffb00b443509e76e013cc6abd95cb8bfdfe74e3ec05060dd1c9 ```