Repository navigation
test(harness): cover the npm-disabled cargo-only version path - #567
Merged
Merged
Conversation
The multi-registry harness only ran with npm version handling enabled, so the "detection enables, config opts out" path (version.npm.enabled: false) — where several sync-strategy bugs previously skipped or abandoned the Cargo.toml write — had no e2e coverage. Parameterize the multi fixture with npmEnabled and add a release-multi-npm-disabled mode asserting package.json stays at its original version, Cargo.toml is still bumped, and the run does not early-return as "No packages were updated" (the abandonment guard: the cargo write lands before the sync strategy's nothing-updated return, so a manifest check alone can't catch a regression). Wire both the baseline and npm-disabled multi variants into the CI action-test-harness job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011i1KvoyxATU3bz5V5Sf1Xu
Contributor
|
Standing release PR: #555 · v0.41.0 queued (4 packages) · open 3h 58m · ✅ ready to merge Release Preview — v0.40.0 → v0.40.1
These changes will be added to the release PR (#555) when merged: Changelogmonorepo 0.40.0 → 0.40.1
After merge — predicted release
Updated automatically by ReleaseKit |
This was referenced Jul 19, 2026
This was referenced Jul 19, 2026
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds e2e coverage for the
version.npm.enabled: falsepath in the multi-registry (npm + cargo) harness — the "detection enables, config opts out" model from #554.Why
The multi-registry harness only exercised npm version handling enabled. The npm-disabled cargo-only path is exactly where the three sync-strategy P1s surfaced during #554 review (root Cargo.toml skipped, hybrid package abandoned, single-package
'root'not tracked). Those were only unit-covered; nothing ran them end-to-end through the built action.What it asserts
release-multi-npm-disabledruns the multi fixture withversion.npm.enabled: falseand checks:package.jsonstays at1.0.0(npm handling opted out)Cargo.tomlbumps to1.0.1(cargo still versioned)"No packages were updated"— the abandonment guard. The Cargo.toml write lands before the sync strategy's nothing-updated return, so a manifest check alone can't catch a regression; the stdout assertion closes that gap.Changes
test-project.mjs: parameterize the multi fixture withnpmEnabled(addsversion.npm.enabled: falseto the generated config when disabled).index.mjs:release-multinow handles both modes vianpmEnabled; adds the abandonment-guard stdout check and npm-aware expectedpackage.jsonversion.package.json:test:harness:multi-npm-disabledscript.ci.yml: run both the baselinemultiand newmulti-npm-disabledvariants in theaction-test-harnessjob (the baselinemultiwasn't in CI before).Both modes pass locally (
pnpm test:harness:multiandpnpm test:harness:multi-npm-disabled).🤖 Generated with Claude Code
Greptile Summary
This PR adds an end-to-end harness test for the
version.npm.enabled: falsepath in the multi-registry (npm + cargo) fixture, targeting the sync-strategy bugs from #554 where cargo-only versioning could be abandoned after Cargo.toml was already written. The key insight is that a Cargo.toml manifest check alone cannot catch the abandonment regression because the write precedes the sync-strategy's early return — only an explicit stdout assertion on "No packages were updated" closes that gap.test-project.mjsparameterisescreateMultiRegistryTestProjectandcreateMultiRegistryMonorepoStructurewithnpmEnabled, conditionally injectingnpm: { enabled: false }into the generated config.index.mjshandles the newrelease-multi-npm-disabledmode, with a targeted abandonment guard (stdout check) that fires only when npm is disabled, since for npm-enabled mode thepackage.jsonmanifest assertion already serves as an implicit abandonment guard.ci.ymlpromotes bothmultiandmulti-npm-disabledto theaction-test-harnessCI job; themultibaseline had not been run in CI before this PR.Confidence Score: 5/5
Safe to merge — the changes are purely additive test harness code with no modifications to production logic.
All four changed files are test infrastructure. The abandonment guard is correctly conditional on !npmEnabled because the npm-enabled mode has an implicit guard via the package.json manifest check, while the npm-disabled mode genuinely needs the stdout assertion to distinguish a successful cargo-only run from one abandoned mid-flight.
No files require special attention.
Important Files Changed
Reviews (1): Last reviewed commit: "test(harness): cover the npm-disabled ca..." | Re-trigger Greptile