Skip to content

Standing PR: an unticked dependency can ship its dependents against an unreleased version #1100

Backlog

Description

@goosewobbler

Problem

In standing-PR mode, an internal dependency that a selected package needs can be unticked on its own. The dependent then publishes against a version of the dependency that was never released, and nothing warns.

The pieces that combine to cause it:

  • Prerequisites are only resolved when there are explicit targets: resolvePrerequisites (packages/core/src/prerequisites.ts) runs from the targeted set. standing-pr.ts:834 notes that release:with-prerequisites has no effect without a target. On an ordinary standing-PR run no update gets role: 'prerequisite', so a changed dependency renders as its own orphan row instead of nesting under the unit that needs it.
  • An orphan untick is honoured as-is. The held-back package is passed to the write step as exclude (standing-pr.ts:1375), so it isn't bumped at all.
  • Dependent requirements are only raised when the dependency bumps, so an excluded dependency leaves its dependents' requirement where it was.
  • selectionWarnings (selection-region.ts:653-658) has exactly the right message ("unticking it publishes it against an unreleased dependency"), but it keys off update.prerequisiteOf, which is only set on the targeted path. So it never fires here.

Concrete cases

From goosewobbler/zubridge (releasekit.config.jsonc): primary @zubridge/tauri in a fixed group with tauri-plugin-zubridge (cargo), where the plugin has a versioned path dependency on zubridge-core, an ungrouped crate.

  1. Cargo. Core and the plugin both have changes. Untick core and leave Tauri ticked. The plugin is published still requiring the old core. CI is green because the workspace build resolves core by path, but downstream builds get the old crate from crates.io and fail to compile if the plugin uses anything new. If core has never been published, crates.io rejects the plugin outright, after the rest of the release may already have gone out.
  2. npm. @zubridge/tauri has @zubridge/types and @zubridge/utils as runtime dependencies (workspace:*). Untick types and leave Tauri ticked. Tauri publishes with workspace:* rewritten to the old types version.

The realistic way to hit this is holding back a shared dependency's unfinished work (say, a second consumer of the crate is mid-development) while shipping a fix to one of its existing dependents.

Expected

In standing-PR mode with primaryPackages, a changed internal dependency of a releasing unit can't be held back while that unit releases. That should hold for npm (dependencies + peerDependencies, matching workspaceGraph.ts) and for Cargo path dependencies.

Proposed fix

Resolve prerequisites for standing-PR runs too, using each releasing primary unit's members as the targets. Changed dependencies then nest under the unit as read-only ↳ prerequisite rows through the existing computeHierarchy / cascadeDeselection path:

  • Shared dependencies are already reference-counted: a child releases while any owner does, and is held back only when every owner is. So a crate shared by two units works without new logic.
  • Unticking the owning primary still cascades to the dependency, which is the coherent way to hold it back.

Things to check while doing it:

  • Group members. prerequisiteOf records the group-expanded target that pulls the dependency in (here tauri-plugin-zubridge, not the primary @zubridge/tauri), while childrenOf matches prerequisiteOf.includes(p) against the primary. Match against the unit's members, or a dependency of a non-primary group member stays an orphan.
  • Dependencies that are themselves primaries. A dependency that is a declared primary stays a top-level peer (computeHierarchy already excludes declared primaries from children). Unticking it while a dependent unit releases is the same bug, so it either needs the selectionWarnings warning to fire or the untick to be refused.
  • Behaviour change. Packages that today get their own orphan row (in zubridge, types and utils) start nesting under the unit that depends on them at runtime, and release only when that unit does. That's correct, but it should go in the changelog. A package that only lists them in devDependencies (zubridge's Electron bundles them) isn't an owner, which is what we want.
  • Warning as backstop. If any path can still leave a dependency held back while a dependent releases, selectionWarnings should catch it. That means computing dependents from the graph rather than from prerequisiteOf.

Tests: Cargo path dependency of a group member, npm runtime dependency of a primary, a dependency shared by two primaries (one ticked, one not), and the dependency-is-a-primary case.

Alternatives considered

  • Leaving it as a documented rule ("don't untick X while Y releases"). That's what zubridge does today, and it depends on whoever edits the standing PR knowing the rule.
  • A per-repo pre-publish guard in the release workflow. It works, but every consumer would have to write their own, and releasekit already has the graph and the hierarchy.

Related: #657 (lockstep groups split under streamlined selection). It's the same class of problem: a selection that ships an incoherent set.

Activity

  1. added this to the 0.48.0 milestone on Nov 24, 2026
  2. added
    type:bug
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions