Skip to content

Land pull requests with GitHub's squash merge - #877

Merged
kiwidream merged 1 commit into
mainfrom
kiwidream/squash-landing
Nov 17, 2026
Merged

kiwidream merged 1 commit into
mainfrom
kiwidream/squash-landing

Conversation

@kiwidream

@kiwidream kiwidream commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

What changes

  • .github/rulesets/public-main-minimal.json, .github/rulesets/required-checks-version-lines.json: allowed_merge_methods goes from ["merge"] to ["merge", "squash"]. Nothing else in these files changes.
  • .github/repository-settings.json: squash merges on, merge commits stay on, rebase merges off.
  • The documents that say how a pull request lands: .github/rulesets/README.md and docs/releasing.md: a promotion now lands with GitHub's squash merge, and the commit to tag is GitHub's squash commit. The section on synchronizations, which land as they are with a merge commit, is unchanged.
  • .github/workflows/signed-landing.yml: the check now judges the branches that merge as they are (see the section on the check, below).

After this, a maintainer still squashes a pull request into one commit, signs it and pushes it, and signed-landing then passes. The pull request is then squash-merged: GitHub makes one commit on the target branch, carrying the signed commit's message, and signs it itself, so the branch gains that one commit and no merge commit. The commit the maintainer signed stays as the pull request's head, which GitHub keeps as refs/pull/<number>/head.

A pull request from a branch named in AS_IS_HEADS (sync-*) still lands as it is, with a merge commit, when the check passes it (below), and its commits must already be signed, so both methods stay allowed: squash for an ordinary pull request, a merge commit for one that lands as it is.

The signed-landing check

.github/workflows/signed-landing.yml changes with this pull request, the same change in every Qbit-Org repository. A branch that merges as it is used to pass the check by its name. With squash merges allowed that is not enough: GitHub signs a squash merge whatever the pull request's commits were, and anyone with write access can create a branch of any name at any commit already in the repository. So the check now judges such a pull request itself: one from a branch matching AS_IS_HEADS passes only when a person signed its head commit with an OpenPGP key on their own GitHub account, and one from a branch named exactly in the new AS_IS_LINES passes when GitHub's rules for that branch require this check and a pull request and forbid creating, deleting and force-pushing it. A fork's branch never merges as it is. Ordinary pull requests are judged as before.

Here that means: a pull request from a sync- branch still merges as it is, but passes only when a person signed its head commit, so its last commit has to be the merge a maintainer makes and signs. The rulesets README and docs/releasing.md say so.

Why

The operator decided on 16 November to land pull requests with GitHub's squash merge instead of a merge commit, so the branch gains one commit per pull request and no merge commit. GitHub's signature on that commit satisfies the signature rule; what requires a person's signature is the signed-landing check, which a ruleset nobody can bypass requires, and it passes only on the commit the maintainer signed.

What does not change

The signed-commit rule, the required checks, approvals and bypass actors. No other workflow changes.

After it merges

The operator applies the changed ruleset files and the merge-method setting, as .github/rulesets/README.md describes. Until then this repository still lands pull requests with a merge commit, this one included.

Checks

  • jq . on every changed JSON file: all parse.
  • python3 -m unittest over the 20 tests/test_*.py modules that mention .github or docs/, with ~/.cargo/bin on PATH: 495 tests pass.
  • .github/workflows/signed-landing.yml is the generated file, byte for byte. The check's own suite (117 tests) and its mutation runs pass; they live outside this repository.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@kiwidream
kiwidream marked this pull request as ready for review November 16, 2026 20:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T15:04:38.648511Z 1829dbe New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qbit-reviewer qbit-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 finding posted inline.

Not posted: 2 nits. Reviews post bugs and security points only; the rest stay in Sixth Man's ledger.

Reviewed by Claude Opus 5.5.

@qbit-reviewer qbit-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 findings posted inline.

Still open from earlier reviews

  • [low] 'Never squash' a synchronization PR is no longer enforced, so a mistaken squash breaks shared ancestry: docs/releasing.md:120, first reported at 28da2b6

Not posted: 1 nit. Reviews post bugs and security points only; the rest stay in Sixth Man's ledger.

Reviewed by Claude Opus 5.5. Red team: deepseek-v4.1-flash-abliterated, checked by Claude Opus 5.5 (nothing it found held up).

Comment thread .github/workflows/signed-landing.yml Resolved

@qbit-reviewer qbit-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still open from earlier reviews

  • [medium · security] Allowing squash lets a spoofed signed-landing check land unsigned commits on version lines: .github/rulesets/required-checks-version-lines.json:36, first reported at 5eff305
  • [low] 'Never squash' a synchronization PR is no longer enforced, so a mistaken squash breaks shared ancestry: docs/releasing.md:120, first reported at 28da2b6
  • [medium · pre-existing · security] sync-* pass in judge_as_is ignores the base, so a signed head can land into a base its signer never chose: .github/workflows/signed-landing.yml:334, first reported at 5eff305

Not posted: 2 nits. Reviews post bugs and security points only; the rest stay in Sixth Man's ledger.

Reviewed by Claude Opus 5.5.

## What changes

- `.github/rulesets/public-main-minimal.json`, `.github/rulesets/required-checks-version-lines.json`: `allowed_merge_methods` goes from `["merge"]` to `["merge", "squash"]`. Nothing else in these files changes.
- `.github/repository-settings.json`: squash merges on, merge commits stay on, rebase merges off.
- The documents that say how a pull request lands: `.github/rulesets/README.md` and `docs/releasing.md`: a promotion now lands with GitHub's squash merge, and the commit to tag is GitHub's squash commit. The section on synchronizations, which land as they are with a merge commit, is unchanged.
- `.github/workflows/signed-landing.yml`: the check now judges the branches that merge as they are (see the section on the check, below).

After this, a maintainer still squashes a pull request into one commit, signs it and pushes it, and `signed-landing` then passes. The pull request is then squash-merged: GitHub makes one commit on the target branch, carrying the signed commit's message, and signs it itself, so the branch gains that one commit and no merge commit. The commit the maintainer signed stays as the pull request's head, which GitHub keeps as `refs/pull/<number>/head`.

A pull request from a branch named in `AS_IS_HEADS` (`sync-*`) still lands as it is, with a merge commit, when the check passes it (below), and its commits must already be signed, so both methods stay allowed: squash for an ordinary pull request, a merge commit for one that lands as it is.

## The `signed-landing` check

`.github/workflows/signed-landing.yml` changes with this pull request, the same change in every Qbit-Org repository. A branch that merges as it is used to pass the check by its name. With squash merges allowed that is not enough: GitHub signs a squash merge whatever the pull request's commits were, and anyone with write access can create a branch of any name at any commit already in the repository. So the check now judges such a pull request itself: one from a branch matching `AS_IS_HEADS` passes only when a person signed its head commit with an OpenPGP key on their own GitHub account, and one from a branch named exactly in the new `AS_IS_LINES` passes when GitHub's rules for that branch require this check and a pull request and forbid creating, deleting and force-pushing it. A fork's branch never merges as it is. Ordinary pull requests are judged as before.

Here that means: a pull request from a `sync-` branch still merges as it is, but passes only when a person signed its head commit, so its last commit has to be the merge a maintainer makes and signs. The rulesets README and `docs/releasing.md` say so.

## Why

The operator decided on 16 November to land pull requests with GitHub's squash merge instead of a merge commit, so the branch gains one commit per pull request and no merge commit. GitHub's signature on that commit satisfies the signature rule; what requires a person's signature is the `signed-landing` check, which a ruleset nobody can bypass requires, and it passes only on the commit the maintainer signed.

## What does not change

The signed-commit rule, the required checks, approvals and bypass actors. No other workflow changes.

## After it merges

The operator applies the changed ruleset files and the merge-method setting, as `.github/rulesets/README.md` describes. Until then this repository still lands pull requests with a merge commit, this one included.

## Checks

- `jq .` on every changed JSON file: all parse.
- `python3 -m unittest` over the 20 `tests/test_*.py` modules that mention `.github` or `docs/`, with `~/.cargo/bin` on `PATH`: 495 tests pass.
- `.github/workflows/signed-landing.yml` is the generated file, byte for byte. The check's own suite (117 tests) and its mutation runs pass; they live outside this repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Squashed commits:
28da2b6 Land pull requests with GitHub's squash merge
5eff305 signed-landing judges sync- pull requests by their head commit
89f5d9c signed-landing: say when a branch may be named in AS_IS_LINES

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Squashed-from: 89f5d9c
@kiwidream
kiwidream force-pushed the kiwidream/squash-landing branch from 89f5d9c to 1829dbe Compare November 17, 2026 15:03

@qbit-reviewer qbit-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 finding posted inline.

Still open from earlier reviews

  • [low] 'Never squash' a synchronization PR is no longer enforced, so a mistaken squash breaks shared ancestry: docs/releasing.md:120, first reported at 28da2b6
  • [medium · pre-existing · security] sync-* pass in judge_as_is ignores the base, so a signed head can land into a base its signer never chose: .github/workflows/signed-landing.yml:334, first reported at 5eff305

Not posted: 2 nits and 1 lead. Reviews post bugs and security points only; the rest stay in Sixth Man's ledger.

Reviewed by Claude Opus 5.5. Red team: deepseek-v4.1-flash-abliterated, checked by Claude Opus 5.5 (nothing it found held up).

Comment thread docs/releasing.md Resolved
@kiwidream
kiwidream merged commit 68733ef into main Nov 17, 2026
38 of 42 checks passed
kiwidream added a commit that referenced this pull request Nov 18, 2026
Since 3.x.x last took main (30dc9b6, #875), main gained #877, which lands
pull requests with GitHub's squash merge (the merge-method setting, the
allowed merge methods in two rulesets, the signed-landing workflow's
judging of branches that merge as they are, and the rulesets README and
release guide that describe it), and 475605e, the release-tags and
version-lines rulesets.

The merge is clean, and it takes main's changes only: every file under
.github/ now equals main's. docs/releasing.md takes main's edits to its
promotion, publication and synchronization paragraphs and keeps 3.x.x's
guarded release block and its later sections, which still describe
merge-commit landing; the pull request stacked on this one rewrites them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
djh58 added a commit that referenced this pull request Nov 23, 2026
…qlx#4289), squash-merge landing and the release-tags ruleset

Merges main at 8c561dc into 3.x.x at ec677fb.

From main, unchanged: the transact-rs/sqlx#4289 backport in
vendor/sqlx-core/src/pool/inner.rs (#917), and the landing and ruleset
changes of #877 and #879 (.github/repository-settings.json,
.github/rulesets/, .github/workflows/signed-landing.yml, docs/releasing.md).

One conflict, vendor/sqlx-core/README.md: both branches changed the
paragraph on how the diffs apply and the line that introduces the CI
check. The merge keeps 3.x.x's text on the recorded patches and main's on
#4289.

Three edits that are not from main, which 3.x.x's source check needs:

- vendor/sqlx-core.patches/0004-sqlx-4289-pool-num-idle-cannot-underflow.patch
  records the change, as scripts/check_vendored_sqlx_core.py
  --unrecorded-diff printed it;
- vendor/sqlx-core/README.md names that patch, and says that CI runs no
  test of #4289's change;
- tests/test_check_vendored_sqlx_core.py expects 4 patches and 5 patched
  files.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
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