Skip to content

Block unsafe or unevaluated release decisions before merge #112

Open

Description

Outcome

If there is no default bump, the pull request must have one bump label or a valid release:skip decision. If it has neither, the release decision check must report a failure. GitHub must not merge the pull request to main without a pass for its current inputs.

Why this check is necessary

A bump tells the release action which part of the version number to increase. The labels release:patch, release:minor, and release:major set the bump for one pull request. If the pull request has no bump label, the action can use a valid default. release:skip tells the action not to publish a release.

GitHub has no required release decision check on main. Action-Test tests the action. A pass in that workflow is not a release decision for the pull request. Keep that test workflow separate from the required check.

Acceptance criteria

  • The pull request shows one required check for the release decision. The check uses the proposed code, the target branch, and the release workflow for that branch. It uses the release settings, supported workflow inputs that override them, and the current release: labels.
  • If there is no default bump and no bump label or valid skip decision, the check reports a failure. release:prerelease sets the release mode. It does not supply a bump.
  • One valid bump label supplies a bump when there is no default. A valid default supplies a bump when there is no bump label. A valid release:skip decision does not need a bump. The check still runs in all three cases. It does not publish releases or change tags.
  • If the settings are invalid or the release labels conflict, the check reports a failure. A warning does not count as a pass.
  • If the check reports a failure, is still in progress, or has no result, GitHub does not merge the pull request. This applies to manual merge and auto-merge.
  • If any of the inputs change, GitHub does not accept the previous pass. This applies when a release label changes but the commit stays the same.
  • An Action-Test result cannot supply the required result. Neither can a manual or scheduled test that did not use the current inputs for this pull request.
  • A pass does not approve the pull request. Code owner review, approval of the last push, and resolution of review conversations still apply.

Technical decisions and readiness

Use the same code that makes the release decision. Run it in read-only mode for the check. Do not add a second set of release rules.

PSModule/Release-GHRepository#109 uses a shared patch default if the repository and workflow omit DefaultBump. That is a default, not a missing value. The action has no setting to turn that default off. Decide how a release workflow can specify no default before work starts on that case. The check must not choose a default of its own.

Before work starts, record the exact check name, what supplies the result, and the branch rule to use. Also record who may change the rule, what they may change, and who will verify the result independently. Record these choices in the linked design or delivery record.

This issue gives no permission to change live rules, permissions, review requirements, auto-merge, or labels. It gives no permission to change releases or tags. Get separate approval before a change to the live branch rule.

Implementation plan

  • Read the branch rules for main. Identify why the existing test result does not meet the release decision requirement.
  • Record the check name, the source of the result, and the branch rule. Record the permitted change, who may make it, and who will verify it independently.
  • Write tests before you change the workflow or branch rule. Test a missing bump decision, a bump label with no default, and a valid default with no bump label. Include release:prerelease alone with no default and a valid release:skip decision. Also test invalid settings, conflicting labels, missing and pending results, changed inputs, and an unrelated test pass.
  • In a separate pull request, update the pull request workflow to use the shared release decision code. Keep the existing review rules.
  • Get approval for the branch rule change. After approval, make only the approved change. Record what changed, who changed it, and when.
  • Have a reviewer who did not make the change test each acceptance criterion. Make sure the existing review requirements still apply.
  • Update the design and documentation links. Record the result of the pull request separately from the result of the branch rule change. Close this issue only after both records are complete.

Related links

Activity

  1. changed the title [-]Protected merges require a source-bound release-decision check[/-] [+]Block unsafe or unevaluated release decisions before merge[/+] on Oct 31, 2026
  2. MariusStorhaug commented on Oct 31, 2026

    @MariusStorhaug
    MemberAuthor

    Reframed the governance gap as observable merge-confidence scenarios, including stale inputs, missing/pending evidence, unrelated successful runs, and valid skip. Enforcement mechanics and operational steps stay in linked design/delivery evidence; no live governance action is authorized or performed here.

  3. MariusStorhaug commented on Oct 31, 2026

    @MariusStorhaug
    MemberAuthor

    Retained consumer-first scenarios and restored the technical Task plan after the scope clarification. Check identity, authorized governance scope and independent verification must be resolved before this separate Task starts; no live policy or permission was changed.

  4. MariusStorhaug commented on Nov 27, 2026

    @MariusStorhaug
    MemberAuthor

    Clarified which check controls merge. Action-Test tests the action. A separate required check must fail if neither the default nor the release labels supplies a valid decision.

    PSModule/Release-GHRepository#109 still uses patch when the repository and workflow omit DefaultBump. A workflow that must require a bump label needs a way to turn off that default.

  5. MariusStorhaug commented on Nov 27, 2026

    @MariusStorhaug
    MemberAuthor

    The four approved increments are open as dependent drafts. Nothing was merged.

    Draft Change Evidence
    #118 Set the shared DefaultBump to none. A valid bump label, configured default, or skip is necessary. Set DefaultBump: patch to keep automatic patch bumps. 237 local Pester tests; hosted Action-Test and Pester and lint.
    #119 Calculate a candidate without publishing. release:skip passes without a version. 274 local Pester tests; hosted Action-Test and Pester and lint. Read-only API calls calculated a stable version for a default-branch push and a prerelease for an open PR.
    #120 Let Publish reuse an exact version from Calculate, or calculate it when omitted. Reject stale or invalid handoffs before writing. 305 local Pester tests with simulated writes; hosted Action-Test and Pester and lint.
    #121 Add the separate read-only Release decision job for PRs to main. It uses the candidate publisher settings and checks the current labels and revisions. 336 local Pester tests; hosted Action-Test and Pester and lint.

    The Release decision fixtures ran the composite bootstrap and final report for a docs-only fork, including a valid skip. They also checked a label-only change at the same SHA, retargeting, candidate settings, and publisher overrides. A read-only check of the actual GitHub merge ref for #118 confirmed the shallow checkout's parent SHAs. The hosted runs above did not run the new Release decision job against main.

    main, its merge rules, and the production publisher are unchanged. The job is advisory. A label rerun alone does not invalidate a prior pass at the same SHA. Keep this issue open for live acceptance and independently verified enforcement. Coordinate the release-neutral resolver prerequisite with #109 and the publisher rollout with #108 before integration.

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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions