Skip to content

test(harness): cover the npm-disabled cargo-only version path - #567

Merged
goosewobbler merged 1 commit into
mainfrom
test/e2e-npm-disabled-cargo
Jul 19, 2026
Merged

goosewobbler merged 1 commit into
mainfrom
test/e2e-npm-disabled-cargo

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Jul 19, 2026 •

Copy link
Copy Markdown
Owner

What

Adds e2e coverage for the version.npm.enabled: false path 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-disabled runs the multi fixture with version.npm.enabled: false and checks:

  • each package's package.json stays at 1.0.0 (npm handling opted out)
  • each package's Cargo.toml bumps to 1.0.1 (cargo still versioned)
  • the run does not early-return as "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 with npmEnabled (adds version.npm.enabled: false to the generated config when disabled).
  • index.mjs: release-multi now handles both modes via npmEnabled; adds the abandonment-guard stdout check and npm-aware expected package.json version.
  • package.json: test:harness:multi-npm-disabled script.
  • ci.yml: run both the baseline multi and new multi-npm-disabled variants in the action-test-harness job (the baseline multi wasn't in CI before).

Both modes pass locally (pnpm test:harness:multi and pnpm 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: false path 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.mjs parameterises createMultiRegistryTestProject and createMultiRegistryMonorepoStructure with npmEnabled, conditionally injecting npm: { enabled: false } into the generated config.
  • index.mjs handles the new release-multi-npm-disabled mode, with a targeted abandonment guard (stdout check) that fires only when npm is disabled, since for npm-enabled mode the package.json manifest assertion already serves as an implicit abandonment guard.
  • ci.yml promotes both multi and multi-npm-disabled to the action-test-harness CI job; the multi baseline 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

Filename Overview
scripts/test-harness/index.mjs Adds release-multi-npm-disabled mode and a stdout-based abandonment guard correctly gated on !npmEnabled; manifest assertions and abandonment guard together provide complete coverage of the cargo-only regression scenario.
scripts/test-harness/test-project.mjs Parameterises createMultiRegistryTestProject / createMultiRegistryMonorepoStructure with npmEnabled; spreads npm: { enabled: false } into the fixture config when disabled. Change is backward-compatible (default true).
.github/workflows/ci.yml Adds both multi and multi-npm-disabled harness steps to action-test-harness job; the baseline multi was previously only runnable locally.
package.json Adds test:harness:multi-npm-disabled script; no issues.

Reviews (1): Last reviewed commit: "test(harness): cover the npm-disabled ca..." | Re-trigger Greptile

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
@github-actions

Copy link
Copy Markdown
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

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#555) when merged:

Changelog

monorepo 0.40.0 → 0.40.1

Changed

  • Update version to 0.40.1

All packages → 0.40.1 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.41.0 0.40.1 0.41.0

Updated automatically by ReleaseKit

@goosewobbler
goosewobbler merged commit f4b7d15 into main Jul 19, 2026
24 checks passed
@goosewobbler
goosewobbler deleted the test/e2e-npm-disabled-cargo branch July 19, 2026 18:36
This was referenced Jul 19, 2026
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.

1 participant