Skip to content

crons: stop enabling auto-merge on cron-opened PRs - #43

Merged
Cubits11 merged 1 commit into
mainfrom
claude/crons-no-automerge-2026-11-03
Nov 3, 2026
Merged

Cubits11 merged 1 commit into
mainfrom
claude/crons-no-automerge-2026-11-03

Conversation

@Cubits11

@Cubits11 Cubits11 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Pull requests opened by the scheduled cycles no longer enable auto-merge. Owner decision, 2026-11-02: cron-opened PRs must never auto-merge, because a merge into main requires a named owner yes.

Where auto-merge was enabled

One place. Both crons reach it:

  • scripts/queue_repository_update.py:57-59 (at 7e5a667): after opening the PR, a GraphQL enablePullRequestAutoMerge(input:{pullRequestId:$id,mergeMethod:MERGE}) request.
  • scripts/cadence_cycle.sh:55 and scripts/distribute_cycle.sh:40 call scripts/queue_repository_update.py. Neither shell script enables auto-merge, and nothing under .github/ does.

The repository setting allow_auto_merge is true. The ruleset "Evidence preservation — main" requires a pull request with 0 approvals and the checks "Claim registry" and "Reproduce bound artifacts". So an enabled auto-merge completed without a human once those checks passed.

The exact change

  • scripts/queue_repository_update.py:

    • the GraphQL request and its comment (lines 57-59) are removed;
    • three strings that described auto-merge now describe what happens:
      • docstring lines 4-5 → "…and it never enables auto-merge: the owner merges after the repository's required checks.";
      • line 37 → "GitHub refused the pull request; the commit remains on its branch";
      • the final log line → "Pull request opened for the owner to merge; returned to main".
  • tests/test_repository_update.py: the test that asserted mergeMethod:MERGE now asserts the opposite:

    • exactly one API request, to /repos/Cubits11/cubits11.github.io/pulls;
    • no enablePullRequestAutoMerge in any call.

    It is renamed to test_queue_opens_pull_request_without_auto_merge_and_returns_to_main.

What does not change

  • Both crons still run on their schedules and still open pull requests.
  • The branch-name guard (claude/cycle-), the push, the PR title, head, base and body, and the return to main are byte-identical.
  • scripts/cadence_cycle.sh, scripts/distribute_cycle.sh and the crontab are untouched.
  • The owner merges.
  • The repository-level allow_auto_merge setting is unchanged.
  • This PR does not touch a trust root listed in security/evidence-policy.json.

Verification on this branch

  • py_compile passes for both files.
  • tests/test_repository_update.py and tests/test_cadence_cycle.py pass.
  • python3 scripts/verification_manifest.py: ok deterministic verification manifest: 90 unique checks, exit 0. Each of the 90 checks was also run individually: 90 exit 0.
  • The removal alone, without the test change, failed check 79 ("scheduled protected-branch publication") at the old assertion. That is why the test changes with it.

Auto-merge is off on this PR. Do not merge until CI is green and the owner has reviewed.

@Cubits11
Cubits11 merged commit a69858e into main Nov 3, 2026
6 checks passed
@Cubits11
Cubits11 deleted the claude/crons-no-automerge-2026-11-03 branch November 3, 2026 05:24
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