Skip to content

Hold the Upstream-Dependency Watcher While Its PR Carries a Maintainer Commit - #410

Merged
ptr727 merged 3 commits into
developfrom
fix/watcher-hold-on-maintainer-commit
Nov 9, 2026
Merged

ptr727 merged 3 commits into
developfrom
fix/watcher-hold-on-maintainer-commit

Conversation

@ptr727

@ptr727 ptr727 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

peter-evans/create-pull-request rebuilds upstream-dependency-develop from develop plus one regenerated commit, then force-updates the branch whenever the remote differs. So a Dockerfile or WORKFLOW.md commit a maintainer added to the open watcher PR was lost at the next daily run. That also blocked the rule in "The Upstream-Dependency Watcher" that such changes belong in the same PR. A second form: if upstream reverted while the PR was open, delete-branch: true deleted the branch and closed the PR with the maintainer's commits on it.

  • The watcher now has a held step after the App token. It skips checkout, resolve, and create-pull-request while an open, same-repository PR on upstream-dependency-develop into develop carries a commit not authored by <app-slug>[bot]. A PR holding only the bot's commit keeps rolling forward as before.
  • The hold reads the open PR rather than the branch, because delete_branch_on_merge is off and a merged head branch would otherwise hold every later run. Fork PRs on a same-named branch are ignored, so an outsider cannot switch the watcher off.
  • WORKFLOW.md section 7 records the hold in the watcher section, D10.6, its audit bullet, and trace S25.

Fixes #408

Verification

  • Ran the guard's gh pr list | jq locally against merged Review upstream base image packages added: libssl-dev #385 with --state all. It selects Review upstream base image packages added: libssl-dev #385, which carries maintainer commits. It selects nothing for a bot-only commit list or an empty list. The bot login reads ptr727-codegen[bot], matching ${app-slug}[bot].
  • Ran actionlint, markdownlint, editorconfig-checker, cspell, shellcheck, shfmt, the prose gate, and the repo gate. All clean.
  • Two local strict-review passes. The first found the fork-PR case, fixed in 5bfc4f0, and the second found nothing.
  • Not yet run on GitHub. A dispatch after merge confirms hold=false on the no-PR path.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Workflow
    • Upstream dependency updates now pause when the open update pull request contains commits authored by someone other than the app. Checkout, dependency resolution, and pull request creation wait until the hold ends.
    • The workflow emits a notice when it pauses, and leaves the pull request branch unchanged during the hold.
  • Documentation
    • Updated guidance to describe hold conditions, resumption after merge, and the expected outcome of a held run.

ptr727 and others added 2 commits November 9, 2026 12:22
…r Commit

create-pull-request rebuilds upstream-dependency-develop from develop and
force-updates it, so a Dockerfile commit a maintainer added to the open
review PR was lost at the next daily run. The watcher now skips its
checkout, resolve, and PR steps while the open PR carries a commit the App
did not author. The check reads the open PR rather than the branch, since
merged head branches are not auto-deleted here.

WORKFLOW.md records the hold in the watcher section, D10.6, and trace S25.

Fixes #408

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gh pr list --head matches the branch name only, so a fork's pull request
on a branch named upstream-dependency-develop would have held the watcher
for as long as it stayed open. The hold now skips cross-repository pull
requests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 9, 2026 20:27
@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The upstream dependency workflow now checks commit authors on its open PR. It skips checkout, dependency resolution, and PR creation when the PR contains a commit not authored by the app bot. The workflow documentation describes the hold behavior and adds an audit checklist and scenario.

Changes: Upstream dependency PR hold

Layer / File(s) Summary
Detect held PRs and gate workflow steps
.github/workflows/check-upstream-dependency.yml, WORKFLOW.md
The workflow checks the open same-repository PR for commits not authored by the app bot. If one is found, it emits a notice and skips checkout, dependency resolution, and PR creation. The documentation describes this behavior, the audit checks, and scenario S25.

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

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: Minimal · up to 5bfc4

The watcher holds PRs with maintainer commits. A narrow pre-existing race remains if a commit is pushed during a run.

- [ ] 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

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.

🟡 Changes recommended

A critical active finding remains because unlinked commit authors can be misclassified as the App, allowing potentially destructive branch updates contrary to the documented safety rule.

1 open issue
What changed in this PR

This pull request prevents the upstream-dependency watcher from overwriting maintainer changes on its open rolling pull request.

Changes:

  • Adds a hold check for open, same-repository watcher PRs containing non-App commits.
  • Skips checkout, dependency resolution, and PR creation while the PR is held.
  • Documents the behavior in WORKFLOW.md, including D10.6, audit evidence, and trace scenario S25.
  • A critical issue remains: commits with unlinked authors are not currently treated as held.

This pull request requires changes.

File Summary
WORKFLOW.md Documents the watcher hold behavior, guarantees, audit coverage, and trace scenario.
.github/​workflows/​check-upstream-dependency.yml Adds held-PR detection and conditional watcher steps; unlinked commit authors require correction.

Review effort: Lite

A commit whose author email links to no GitHub account can come back from
gh pr list with an empty authors array, which the earlier filter skipped,
so the hold cleared. A commit with no listed author now counts as not the
App's, alongside one listed with an empty login.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit f8def00 into develop Nov 9, 2026
11 checks passed
@ptr727
ptr727 deleted the fix/watcher-hold-on-maintainer-commit branch November 9, 2026 20:33
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