Skip to content

chore: shrink the npm patch to the README gap - #224

Merged
duharry0915 merged 1 commit into
mainfrom
harry/post-regen-patch-0.38.10
Sep 1, 2026
Merged

chore: shrink the npm patch to the README gap#224
duharry0915 merged 1 commit into
mainfrom
harry/post-regen-patch-0.38.10

Conversation

@duharry0915

Copy link
Copy Markdown
Collaborator

Shrinks the npm patch in post-regen-patch.py to what 0.38.10 still leaves undone.

Fern fixed most of item 2

The generator now routes packageIdentity into the launcher's package.json. Proof from the
1.2.0 regeneration, comparing the raw generator commit against the Fern Replay commit — this is
the generator's own output, before any of our patches:

"description": "Command-line interface for the AgentMail API. Send, receive, ...",
"license": "MIT",
"keywords": ["email","api","cli","agent","agentmail"],
"homepage": "https://agentmail.to",
"author": "AgentMail <support@agentmail.cc>",

That was the part that mattered. 1.1.0 shipped as License: none because of this gap, and
dependency scanners reject unlicensed packages.

What remains

The generator emits "files": ["bin/"]. npm packs a README only when it sits beside
package.json, so without both the files entry and the copy step the package page renders
blank. The patch is now exactly that.

Why the script aborted

The old anchor spanned the whole metadata block, which upstream now writes itself — so the
anchor matched zero times and the script stopped:

ABORT [npm package metadata]: expected 1 occurrence(s) of the anchor in ci.yml, found 0.

That is the designed behaviour — fail loudly rather than skip — but the anchor had to follow
upstream. Also recorded in the docstring: custom.rs now ships in the generated .fernignore.
The entry stays in FERNIGNORE because that patch rewrites the whole file, so dropping it would
remove protection the generator adds on its own.

Verification

Exercised against four trees:

tree result
raw 0.38.10 generator output applies all three patches
Fern Replay-processed branch every patch already applied
same tree, second run no-op
files line deliberately mangled still aborts loudly

The 1.2.0 generated PR is agentmail-to/agentmail-cli#49;
running this script against it is a no-op, confirming Replay carried the hand-edits correctly.

Generator 0.38.10 routes packageIdentity into the launcher's package.json.
description, license, keywords, homepage and author now come through on
their own, which was the part that mattered -- dependency scanners reject
unlicensed packages, and 1.1.0 shipped as "License: none" because of this.

What it still does not do is ship the README. `files` lists only "bin/",
and npm packs a README only when it sits beside package.json, so the
package page renders blank. The patch is reduced to that: one `files`
entry and the copy step that was already separate.

The old anchor carried the whole metadata block, so the script aborted on
the 1.2.0 regeneration rather than silently skipping -- working as
designed, but the anchor had to follow upstream. Also records in the
docstring that custom.rs now ships in the generated .fernignore; the entry
stays in FERNIGNORE because that patch rewrites the whole file.

Exercised against four trees: raw 0.38.10 output applies all three
patches; a Fern Replay-processed branch reports every one already applied;
a second run on the same tree is a no-op; and a tree with a deliberately
mangled `files` line still aborts loudly.
@github-actions

Copy link
Copy Markdown

@duharry0915
duharry0915 merged commit cafabd6 into main Sep 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants