Skip to content

Commit cd50495

Browse files
donislawdevclaude
andcommitted
eml: review of #173 - a lockfile for mailparser, the contents refusal speaks of files, the checker refuses what it cannot read
The reference tool job installs mailparser with npm ci from a committed lockfile rather than resolving its tree each run. The refusal of contains beside the attachment settings no longer calls a message an archive. strict.py turns a header that is not UTF-8, a part with no Content-Type or a date it cannot read into a refusal with a reason - four of six broken messages ended in a traceback before. The reference tool guard runs its cases side by side, 26.5 s down to 4.3 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 829800c commit cd50495

10 files changed

Lines changed: 428 additions & 37 deletions

File tree

‎.github/mailparser/package-lock.json‎

Lines changed: 356 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.github/mailparser/package.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "tfg-reference-mailparser",
3+
"private": true,
4+
"description": "mailparser for the eml reference tool guard, installed by the reference tools job with npm ci from the lockfile beside this file.",
5+
"dependencies": {
6+
"mailparser": "3.9.36"
7+
}
8+
}

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,11 +1376,16 @@ jobs:
13761376
# Mail is read by mailparser beside Python's email package - the
13771377
# parser much of the mail handling written in Node uses, and the one
13781378
# that refuses a message of more than 1000 MIME entities
1379-
# (docs/EML-2026-10-07.md section 5.1). Pinned, installed outside the
1380-
# checkout, and named to the guard through TFG_MAILPARSER. Asked for
1381-
# its version, so a package that did not install stops this step, and
1382-
# the guard fails if it is named and reads nothing.
1383-
npm install --prefix "$RUNNER_TEMP/mailparser" mailparser@3.9.36
1379+
# (docs/EML-2026-10-07.md section 5.1). Installed with npm ci from the
1380+
# lockfile in .github/mailparser, so the whole tree is the one
1381+
# committed rather than whatever the registry resolves that day
1382+
# (review of #173), outside the checkout, and named to the guard
1383+
# through TFG_MAILPARSER. Asked for its version, so a package that did
1384+
# not install stops this step, and the guard fails if it is named and
1385+
# reads nothing.
1386+
mkdir -p "$RUNNER_TEMP/mailparser"
1387+
cp .github/mailparser/package.json .github/mailparser/package-lock.json "$RUNNER_TEMP/mailparser/"
1388+
npm ci --prefix "$RUNNER_TEMP/mailparser"
13841389
echo "TFG_MAILPARSER=$RUNNER_TEMP/mailparser/node_modules/mailparser" >> "$GITHUB_ENV"
13851390
node -e "console.log('mailparser', require(process.argv[1] + '/package.json').version)" "$RUNNER_TEMP/mailparser/node_modules/mailparser"
13861391

0 commit comments

Comments
 (0)