Skip to content

fix(release): verify draft ancestry using remote branch history - #149

Merged
vitormattos merged 3 commits into
mainfrom
fix/release-draft-remote-ancestry-race
Nov 4, 2026
Merged

vitormattos merged 3 commits into
mainfrom
fix/release-draft-remote-ancestry-race

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Context

When stable35 advanced after the release preparation PR was merged but before its draft was created, the live branch HEAD referred to a commit unavailable in the workflow's earlier checkout. release:draft then failed with fatal: Not a valid commit name ... during local git merge-base --is-ancestor.

Change

  • Verify a finalized release's ancestry against the current GitHub branch HEAD using the existing compare/base...head API pattern; retain strict rejection of divergent and unavailable histories.
  • Add focused tests for a remote-only branch advancement, valid ancestry, divergence and invalid/unavailable comparisons.
  • Do not change tagged releases, release metadata, publishing, or GitHub Actions permissions.

Validation

The original LibreSign/libresign finalization run #41893312671 was recovered by rerunning the failed jobs and completed successfully. The v15.0.12 draft was generated. This PR prevents recurrence; the source commit is cryptographically signed and DCO-compliant. CI remains the acceptance gate for the proposed release-tool change.

No security advisory contents or private-fork details are included.

The release branch can advance between workflow checkout and draft creation.
Use the GitHub compare API to validate containment against the live branch
without requiring its new head to be fetched locally. Reject divergent or
unverifiable histories and cover the race with focused regression tests.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit 617e122 into main Nov 4, 2026
17 checks passed
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