Skip to content

Re-Arm a Disabled Auto-Merge and Stop Persisting Checkout Credentials - #1296

Merged
ptr727 merged 4 commits into
developfrom
interface-workflows
Nov 26, 2026
Merged

ptr727 merged 4 commits into
developfrom
interface-workflows

Conversation

@ptr727

@ptr727 ptr727 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

This is the interface-workflow step of the hub resync (RESYNC.md section 3 step 4), after #1294 and #1295. The audit reported both of the first two findings (audit run 2026-11-26T03:13:33Z | hub 5c06f173), and #1294's local review deferred the third here.

  • Merge-bot re-arm: the audit reported merge-bot-pull-request.yml 'on:' missing required event type 'auto_merge_disabled'. The caller now triggers on it. So the hub task's rearm-auto-merge job re-arms an auto-merge GitHub disabled with every check green, once per head.
  • Hub task pins: each *-task.yml pin moves from 2.0.1528 (fb08376e) to 2.0.1595 (de513317), the latest release. The rearm-auto-merge job already existed at the old pin, and the caller never triggered it. Of the callees, only merge-bot-task (a create-github-app-token bump) and validate-task (a setup-uv bump and a promotion-history check in lint) changed between the pins. Each caller's with: inputs and secrets: match the callee at both pins, and no callee added or removed an input.
  • Checkout credentials: all three actions/checkout steps set persist-credentials: false, per GOVERNANCE.md "Workflow YAML Conventions". No later step in those jobs runs an authenticated git command. dorny/paths-filter reads the API on a pull request, and the integration-coverage composite runs no git command.
  • WORKFLOW.md: states both changes in section 2, the automation paragraph and flowchart, D8.1, D8.3 (the jobs that act here), the new D9.7, and the 5A audit line.

Verification

  • The prose gate at the old pin and at the new pin both report nothing on the diff.
  • actionlint reports nothing.
  • Local strict review: three frontier passes. The first found D8.1 and the flowchart claiming a re-arm of the maintainer-push disable, which the task leaves in place. The second found the corrected edge label missing the App condition. The third found nothing.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements

    • Merge automation can retry enabling auto-merge after a temporary disable once the base branch settles, while preserving maintainer-initiated disables. Repeated disables or refused merges are reported as failures.
    • Checkout steps no longer retain Git credentials, and release and validation automation has been updated.
  • Documentation

    • Clarified merge automation behavior and checkout credential requirements.

ptr727 and others added 3 commits November 25, 2026 20:18
The merge-bot caller triggers on auto_merge_disabled, so the hub task
re-arms an auto-merge GitHub disabled with every check green. Every hub
task pin moves to 2.0.1595, whose merge-bot task carries that re-arm job;
each caller's inputs and secrets match the new callee. Every checkout sets
persist-credentials false, since no later step runs an authenticated git
command. WORKFLOW.md states both in D8.1, D8.3, D9.7, section 2, the
automation flowchart, and the 5A audit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 26, 2026 04:24
@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 04443a09adfd38cfe0f4f59fdedf7d49abea46d4, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The PR adds auto_merge_disabled to the merge-bot trigger, updates reusable workflow references to version 2.0.1595, disables persisted checkout credentials in specified workflows, and documents these workflow rules in WORKFLOW.md.

Changes: Workflow updates

Layer / File(s) Summary
Merge-bot trigger and behavior
.github/workflows/merge-bot-pull-request.yml, WORKFLOW.md
The merge-bot caller adds the auto_merge_disabled trigger. WORKFLOW.md documents the re-arm rules, active jobs, and related audit checks.
Reusable workflow revisions
.github/workflows/merge-bot-pull-request.yml, .github/workflows/publish-release.yml, .github/workflows/test-pull-request.yml
The callers update reusable workflow references to version 2.0.1595.
Checkout credential settings
.github/workflows/publish-release.yml, .github/workflows/test-pull-request.yml, WORKFLOW.md
Specified checkout steps set persist-credentials: false. WORKFLOW.md adds this requirement to its conventions and audit checklist.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · previous review 04443

This updates the merge-bot trigger and reusable workflow pins, and stops checkout from persisting credentials. The changes are small, reversible, and reported as passing CI. No concrete merge-blocking risk remains in this repository.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names two changes that appear in the changeset: re-arming a disabled auto-merge (adding the auto_merge_disabled trigger so the pinned hub task's rearm-auto-merge job runs, plus the WORKFLOW.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names two changes that appear in the changeset: re-arming a disabled auto-merge (adding the auto_merge_disabled trigger so the pinned hub task's rearm-auto-merge job runs, plus the WORKFLOW.md documentation of that re-arm contract) and disabling persisted checkout credentials (persist-credentials: false on the actions/checkout steps across the workflow files). The title is specific and matches the main changes. It does not cover the version pin bumps from 2.0.1528 to 2.0.1595, which is expected for a title.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e3a1103 and 04443a0.

Files selected for processing: 4

  • .github/workflows/merge-bot-pull-request.yml
  • .github/workflows/publish-release.yml
  • .github/workflows/test-pull-request.yml
  • WORKFLOW.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Re-arm eligible auto-merges and avoid persisted checkout credentials

✨ Enhancement ⚙️ Configuration changes 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Trigger the pinned hub merge-bot task when GitHub disables an eligible auto-merge.
• Disable credential persistence in all three checkouts to avoid exposing tokens to later steps.
• Update workflow contracts and documentation to reflect both behaviors.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 3 capabilities

  • 3 affected capabilities span independent functional scopes: Project release publication, Pull-request lifecycle automation, Pull-request validation.
  • The changed trigger and reusable-task call jointly control whether eligible pull requests are automatically merged; no separate storage or downstream user capability is introduced.
  • The changed plan, validation, integration, build/publish, and readme jobs form one end-to-end release outcome: publishing the validated branch artifacts and associated Docker metadata.
  • The changed validation reusable task, conditional smoke build, and checkout steps jointly determine whether pull requests receive the repository's required validation and build checks.
  • They are one CI outcome rather than separate capabilities for each job.
Sources

.github/workflows/merge-bot-pull-request.yml[5-7]

on:
  pull_request_target:
    types: [opened, reopened, synchronize, closed, auto_merge_disabled]

.github/workflows/publish-release.yml[36-50]

  plan:
    name: Plan release job
    uses: ptr727/ProjectTemplate/.github/workflows/publish-plan-task.yml@de513317022bb94c49116c01cc26a177ee9fdf35 # 2.0.1595
    with:
      event_name: ${{ github.event_name }}
      actor: ${{ github.actor }}
      ref_name: ${{ github.ref_name }}

  # The same reusable gate the PR runs, on the branch tip, running only when a publish will happen.
  validate:
    name: Validate job
    needs: [plan]
    if: ${{ needs.plan.outputs.publish == 'true' }}
    uses: ptr727/ProjectTemplate/.github/workflows/validate-task.yml@de513317022bb94c49116c01cc26a177ee9fdf35 # 2.0.1595
    permissions:
Behavioral complexity 🔴 High 🧩 State transitions

  • Before: the caller handled the existing pull-request event set.
  • After: it also dispatches auto_merge_disabled to a newer reusable task.
  • New correctness condition: the task must distinguish bot-originated disables from maintainer or user disables, preserve the head identity, and avoid repeated rearming.
  • The caller change creates an event/state interaction, although the task's internal implementation is external.
Sources

.github/workflows/merge-bot-pull-request.yml[5-7]

on:
  pull_request_target:
    types: [opened, reopened, synchronize, closed, auto_merge_disabled]
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the changed event routing or reusable-task interface regresses, eligible automated merges may stop or remain disabled.
  • A rollback or corrected workflow can restore operation; missed merges require rerunning or rearming the affected pull requests.
  • Rollback restores the workflow, but pull requests that were not merged may require a subsequent event or manual rearm.
Sources

.github/workflows/merge-bot-pull-request.yml[5-7]

on:
  pull_request_target:
    types: [opened, reopened, synchronize, closed, auto_merge_disabled]
Assessed commit f7118fc
Diagram

graph TD
    E["GitHub disables auto-merge"] --> C["Merge-bot caller"] --> H["Pinned hub task"] --> G{"App disable and bot head?"} -->|yes| R["Re-arm once"]
    G -->|no| K["Keep disabled"]
Loading
High-Level Assessment

Keep the event-driven, thin-caller approach: it uses the hub's existing re-arm logic without duplicating privileged merge code locally. Polling for disabled auto-merges would add complexity without improving this workflow.

Files changed (4) +35 / -19

Enhancement (1) +2 / -2
merge-bot-pull-request.ymlForward auto-merge disable events to the updated hub task +2/-2

Forward auto-merge disable events to the updated hub task

• Adds auto_merge_disabled to the pull_request_target events and pins the merge-bot task to release 2.0.1595, which includes the re-arm job. The caller's permissions and secrets remain unchanged.

.github/workflows/merge-bot-pull-request.yml

Documentation (1) +22 / -11
WORKFLOW.mdDocument re-arm boundaries and checkout credential policy +22/-11

Document re-arm boundaries and checkout credential policy

• Updates the automation diagram and D8 contract to distinguish eligible GitHub disables from maintainer-push and human disables. Adds the checkout credential rule to the workflow conventions, D9.7, and audit checklist.

WORKFLOW.md

Other (2) +11 / -6
publish-release.ymlAdvance release-task pins and protect integration checkout credentials +5/-4

Advance release-task pins and protect integration checkout credentials

• Moves the release plan, validation, build, and Docker README tasks to the same hub release. Sets persist-credentials to false for the integration job's checkout.

.github/workflows/publish-release.yml

test-pull-request.ymlAdvance CI task pins and stop persisting checkout credentials +6/-2

Advance CI task pins and stop persisting checkout credentials

• Moves validation and smoke-build tasks to hub release 2.0.1595. Disables credential persistence in both the path-filter and integration checkouts.

.github/workflows/test-pull-request.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Copilot AI 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.

🔵 Needs a closer look

The change depends on GitHub event, token, permission, auto-merge payload, and timeline API behavior plus exact remote workflow pins that cannot be validated through static local review.

No open issues 🎉

What changed in this PR

This pull request updates repository workflows to re-arm disabled bot auto-merges, consume the latest hub task release, and prevent checkout credentials from persisting between steps.

Changes:

  • Adds the auto_merge_disabled merge-bot trigger and documents one-time auto-merge re-arming.
  • Updates reusable hub workflow pins to release 2.0.1595.
  • Sets persist-credentials: false on repository checkout steps.
File Description
WORKFLOW.md Documents auto-merge re-arming, checkout credential handling, and related workflow requirements.
.github/​workflows/​test-pull-request.yml Disables persisted checkout credentials and updates validation and build task pins.
.github/​workflows/​publish-release.yml Disables persisted checkout credentials and updates release task pins.
.github/​workflows/​merge-bot-pull-request.yml Adds the auto_merge_disabled trigger and updates the merge-bot task pin.

Review effort: Lite

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Answering Copilot's needs a closer look headline on 04443a0, which names no defect and asks for runtime behavior a static review cannot see. Here is the runtime evidence there is.

  • Pins: this pull request's own CI ran validate-task.yml and build-release-task.yml at the new pin de513317, and all 16 checks pass. Each caller's inputs and secrets were also checked against the callee at both pins. No input changed, and build-release-task, publish-plan-task and publish-docker-readme-task are byte-identical between them.
  • Re-arm: the event handling, App-token use, timeline read and branch-activity read all live in the hub's merge-bot-task.yml, which this repo reaches by pin and does not carry. Its rearm-auto-merge job already existed at the old pin. This change only adds the trigger that lets it run. The caller keeps permissions: {}, since that job uses the App token.
  • Checkout credentials: none of the three jobs runs an authenticated git command after checkout, as the PR body says. The passing smoke-build and integration-coverage jobs on this head exercise two of them.

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Correction to my reply to Copilot above. The smoke-build and integration-coverage jobs were skipped on 04443a0, since the path filter matched no release or integration path. So of the three changed checkouts, this head ran only the changes job's, which then runs dorny/paths-filter and passed. The integration-coverage checkout in test-pull-request.yml and the one in publish-release.yml first run on the next pull request that touches a release path and on the next publish. Neither job runs a git command after checkout, so neither needs the credential.

Dependabot moved the same pins to 2.0.1538 on develop. This branch's
2.0.1595 pins supersede them, so each conflict keeps this branch's side.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f7118fcca3afc5fef94f8e48216ac82ef4a06591, the content this pull request carries at that commit against develop, and it recorded 0 findings.

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.

2 participants