Repository navigation
Remove packageManifest.test.ts - #379
Conversation
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
|
Changed direction on the maintainer's call: the suite is deleted rather than repaired. The net diff against 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
What is genuinely lostTwo assertions encoded real intent rather than restating the file, and they deserve to be said out loud rather than to disappear in a diff:
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 Verification
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
Summary
Deletes
src/packageManifest.test.ts— +2 / −123 across 2 files.The PR started as a repair of the
bunsetassertion (#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:bunsetpin turnedmainred for five days on a routine forward bump to a version that was never wrong;release-checksthat never runs the test suite (release-checksnever runs the test suite and runsformatin write mode, sobun run releasewould publish from today's red tree — andpackageManifest.test.tspins that gate list as correct #376) — so the one assertion that looked like it protected the release path was rubber-stamping a gap in it.What is genuinely lost
Two assertions encoded real intent rather than restating the file, and are recorded here rather than disappearing in a diff:
better-sqlite3in any dependency map ortrustedDependencies. Nothing loads a native SQLite driver since@workglow/sqlitemoved tonode:sqlite, so a reappearance would be a stale copy-paste — and thetrustedDependenciesentry would run that package's install scripts. This is the one I would most want kept in some form.binentries, and noexports/main/types.Neither belongs in a test that reads the same manifest it guards. The natural homes are a dependency policy or a
prepackcheck against the packed tarball, which would also catch what a manifest assertion structurally cannot. Happy to add either as separate work.Commits
97ba4a85— the floor fix, superseded. Kept for the reasoning.85313224— the deletion.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.tsstats everysrc/…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,typecheckandexampleCoverage.test.ts(4/4) all pass locally on48f2c909.Closes #375.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BLxewpuWR1ZeGdt3XHvVDh