Skip to content

Remove packageManifest.test.ts - #379

Merged
sroussey merged 3 commits into
mainfrom
claude/admiring-lovelace-at0l56
Sep 21, 2026
Merged

sroussey merged 3 commits into
mainfrom
claude/admiring-lovelace-at0l56

Conversation

@sroussey

@sroussey sroussey commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Deletes src/packageManifest.test.ts — +2 / −123 across 2 files.

The PR started as a repair of the bunset assertion (#375) and changed direction on the maintainer's call: the case for deleting the suite is stronger than the case for fixing it. The intermediate commit is kept so the reasoning stays on the record.

Why

Of eleven assertions, most restated a value that lives one file away. They can only fail when someone edits package.json, and they cannot tell a mistaken edit from an intended one — which is the entire job they were being asked to do. Both of this month's failures were the tautological ones misfiring:

What is genuinely lost

Two assertions encoded real intent rather than restating the file, and are recorded here rather than disappearing in a diff:

  1. No better-sqlite3 in any dependency map or trustedDependencies. Nothing loads a native SQLite driver since @workglow/sqlite moved to node:sqlite, so a reappearance would be a stale copy-paste — and the trustedDependencies entry would run that package's install scripts. This is the one I would most want kept in some form.
  2. Binary-only distribution — exactly the two bin entries, and no exports / main / types.

Neither belongs in a test that reads the same manifest it guards. The natural homes are a dependency policy or a prepack check against the packed tarball, which would also catch what a manifest assertion structurally cannot. Happy to add either as separate work.

Commits

  1. 97ba4a85 — the floor fix, superseded. Kept for the reasoning.
  2. 85313224 — the deletion.
  3. 48f2c909 — drops the README's pointer to the deleted file.

That third commit is worth a note, because it is the counter-example to the rest of this PR. exampleCoverage.test.ts stats every src/… path the README names, so deleting the file turned it red. That is a guard doing real work: one test asserts that a file it reads says what it says, the other catches a claim that stopped being true. The second earned its place.

Verification

format-check, lint, typecheck and exampleCoverage.test.ts (4/4) all pass locally on 48f2c909.

Closes #375.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BLxewpuWR1ZeGdt3XHvVDh

The assertion read `toBe("1.1.1")` while the comment two lines above it
described a floor ("an older pin does not fail loudly"). The two
directions fail differently and only one of them is a fault: an older
bunset takes `--auto` as an unknown flag and says nothing, so the lower
bound has to be asserted; a newer one is the ordinary state of a
maintained dependency.

Written as equality, a routine forward bump turned the suite red for a
version that was never wrong — which is what happened when the pin moved
to 1.1.2 and left main failing for five days.

Now parses the pin and compares it field by field against a 1.1.2 floor.
A range (`^1.1.2`, `*`) still fails: a release tool has to resolve to one
known version on every machine, so a range is a failure of this test
rather than an input to it.

Verified by probing the pin across versions — 1.0.15 and 1.1.1 fail,
`^1.1.2` fails, 1.1.2 / 1.2.0 / 2.0.0 pass. format-check, lint and
typecheck all exit 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLxewpuWR1ZeGdt3XHvVDh
The suite asserted that package.json contains the values package.json
contains. Eleven assertions, and the ones that were not tautological were
the ones that misfired: an exact `bunset` pin turned main red for five
days on a routine forward bump, and the gate-list assertion blesses a
`release-checks` that never runs the test suite — so the one thing it
looked like it was protecting, it was rubber-stamping.

A test that can only fail when someone edits the manifest cannot tell a
mistaken edit from an intended one, which is the whole of what it was
being asked to do.

Two assertions did carry real intent and are worth restating somewhere
that can actually enforce them, rather than in a test that reads the
same file it guards:

  - no better-sqlite3 in any dependency map or trustedDependencies, so a
    stale copy-paste cannot reintroduce a native driver and its install
    scripts
  - binary-only distribution: the two bin entries and no exports/main/types

Neither is lost silently — both are noted on the pull request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLxewpuWR1ZeGdt3XHvVDh

Copy link
Copy Markdown
Contributor Author

Changed direction on the maintainer's call: the suite is deleted rather than repaired. The net diff against main is now a single 121-line deletion; the intermediate floor-fix commit is kept so the reasoning is on the record.

The case for deleting it is stronger than the case for fixing it, and this month supplied the evidence. Of eleven assertions, most restate a value that lives one file away — they can only fail when someone edits package.json, and they cannot tell a mistaken edit from an intended one, which is the entire job they were being asked to do. Both of this month's failures were the tautological ones misfiring:

What is genuinely lost

Two assertions encoded real intent rather than restating the file, and they deserve to be said out loud rather than to disappear in a diff:

  1. No better-sqlite3 in any dependency map or trustedDependencies. Nothing loads a native SQLite driver since @workglow/sqlite moved to node:sqlite, so a reappearance would be a stale copy-paste — and the trustedDependencies entry would run that package's install scripts. This is a supply-chain guard, and it is the one I would most want to keep in some form.
  2. Binary-only distribution — exactly the two bin entries, and no exports / main / types. Guards against accidentally publishing a library surface the re-founding deliberately removed.

Neither belongs in a test that reads the same manifest it guards. If they are worth keeping, the natural homes are a dependency policy or a prepack check that runs against the packed tarball rather than the source manifest — which would also catch what a manifest assertion structurally cannot. Happy to add either; say which, and I will keep it out of this PR.

Verification

format-check, lint and typecheck all exit 0 on the branch. This also closes #375 — by removing the assertion rather than correcting it.


Generated by Claude Code

`exampleCoverage.test.ts` stats every `src/…` path the README names, so
removing the test file turned it red — which is the guard working, and a
fair illustration of the difference between the two: one asserts that a
file it reads says what it says, the other catches a claim that stopped
being true.

The paragraph's point stands without it, so it now states the decision
directly rather than deferring to a test for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLxewpuWR1ZeGdt3XHvVDh
@sroussey sroussey changed the title Make bunset version floor assertion more flexible Remove packageManifest.test.ts Sep 21, 2026
@sroussey
sroussey merged commit ddffdbb into main Sep 21, 2026
1 check passed
@sroussey
sroussey deleted the claude/admiring-lovelace-at0l56 branch September 21, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants