Skip to content

test(project): assert the four copies of the version agree - #1193

Merged
Chemaclass merged 1 commit into
mainfrom
test/1192-version-consistency
Aug 14, 2026
Merged

test(project): assert the four copies of the version agree#1193
Chemaclass merged 1 commit into
mainfrom
test/1192-version-consistency

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1192

The version lives in bashunit, action.yml, install.sh and package.json.
release.sh bumps all four, and release_update_test.sh covers those updaters
against mock files — proving the functions work, not that the repo's own
copies agree. Drift from a partially-failed release, a hand-edit or a bad merge
fails quietly and differently per file:

  • action.yml stale → every TypedDevs/bashunit@v0 user installs an old binary
  • install.sh stale → the documented curl-installer pins the wrong release
  • package.json stale → npm publishes under a version that is not this code

💡 Changes

  • Assert the four agree, with the entrypoint as source of truth
  • A guard on the guard: if the extraction stops matching, every assertion would compare "" to "" and pass while checking nothing — so one test asserts the extracted value is a real version string
  • Mutation-verified: desyncing each dependent fails exactly its own test

The version lives in bashunit, action.yml, install.sh and package.json, and
release.sh bumps all four together. release_update_test.sh covers those
updaters against mock files, which proves the functions work -- not that the
repo's own copies currently agree. They drift from a release that failed
partway, a hand-edit, or a merge resolved the wrong way, and each drift fails
quietly and differently:

  action.yml     every TypedDevs/bashunit@v0 user installs an old binary
  install.sh     the documented curl-installer pins the wrong release
  package.json   npm publishes under a version that is not this code

None of it surfaces in a test run.

Includes a guard on the guard: if the version extraction stops matching, every
assertion would compare an empty string against an empty string and pass while
checking nothing, so one test asserts the extracted value is a real version.

Mutation-verified: desyncing each of the three dependents fails exactly its own
test.

Closes #1192
@Chemaclass Chemaclass added the enhancement New feature or request label Aug 14, 2026
@Chemaclass Chemaclass self-assigned this Aug 14, 2026
@Chemaclass
Chemaclass merged commit dfef260 into main Aug 14, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the test/1192-version-consistency branch August 14, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant