Skip to content

refactor(pr): devops pr update acts only on a failed check - #4990

Merged
dan-petty merged 2 commits into
mainfrom
refactor/4674-pr-update-failed-check
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
refactor/4674-pr-update-failed-check

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops pr update --all sent update-branch for each open pull request of the account, with no check for a conflict or a failed check. In the week from 2026-11-04, update-branch merges of main with no conflict started 28 runs (about 1,208 runner-minutes). docs/SDLC.md allows an update only for a conflict or for a failed required check whose fix is on main, and GitHub cannot update a branch that has a conflict.

--all and --base are gone. For a conflict, devops pr update <number> prints the local rebase steps and sends no other request. Else it reads the required checks of the base branch and the check runs of the head. It sends update-branch, locked to that head, only when a required check failed. The skill devops-pr-ci gets the start, rebase and push lines.

Closes #4674

Change: openspec/changes/archive/2026-11-12-4674-devops-pr-update-acts-only-on/

`devops pr update --all` sent update-branch for each open pull request of
the account, with no check for a conflict or a failed check. These
catch-up merges started CI runs that the merge does not need
(docs/SDLC.md, No Catch-Up Updates).

- Delete --all, --base and the bulk loop with their helpers, constant,
  messages and tests.
- For a conflict, the command prints the local rebase steps and sends no
  other request.
- With no conflict, it reads the required checks of the base branch and
  the check runs of the head. It sends update-branch, locked to that head,
  only when a required check failed. Else it prints the reason.
- read_required_check_names is the one reader of required checks for the
  command and the release pick.
- The skill devops-pr-ci gets the start, rebase and push lines.
@dan-petty dan-petty added type/refactor Type refactor: a new structure, same behavior scope/pr The devops pr commands labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Source of the 13 pure-rebase runs (acceptance of #4674)

The CI audit of 2026-11-11 listed 13 topic pull request runs whose base moved and whose zero-context patch-id did not change.

Who pushed them. For each run I read devops gh api repos/dan-petty/devops-cli/actions/runs/<id>:

  • All 13 have the event pull_request. The actor and the triggering actor are the owner account (a user token), not the roadmap App.
  • Each head is a local commit. Its committer is the git name of the workstation, not GitHub. update-branch makes a merge commit whose committer is GitHub. The roadmap jobs set user.name to the login of their session (roadmap/run.py).
  • Each head is the OpenSpec archive commit of its branch.

Thus agent sessions on the workstation pushed all 13 after a local rebase. devops pr update and the cluster jobs did not push them.

Which pushes were needed. For each run I ran git merge-tree --write-tree --name-only <new base> <previous head>:

Runs Previous head against the new base Meaning
8 conflict in an openspec/specs/*/spec.md file (archive append) a rebase that ADR 0014 asks for. git patch-id ignores line numbers, so the fix of an append conflict keeps the patch-id.
5 no conflict, the same commits, main moved by 1 or 2 commits a catch-up push

The 5 catch-up pushes: runs 42949240200, 42960826460, 42969329069, 42978060929 and 42982676964. The rule "rebase right before each push", with a second push of the same commits, makes such a push. This PR adds the line "Push only a new change or the fix of a conflict. Never push or update a pull request only to catch up with main" to the skill devops-pr-ci.

Thus the audit number 13 counts 8 needed rebases. A census that wants only catch-up pushes must also check the previous head for a conflict with the new base.

Pre-push hook message (hooks plan, P06)

The hooks plan asked that the refusal message of the push gate name devops pr update <n>. The merged hook branch-current (#4879) refuses only a branch that does not hold origin/main, and its fix is a rebase. It has no catch-up check. So its message stays, and the command prints the same rebase words (git fetch origin && git rebase origin/main) for a conflict.

Steps after the merge

  • One week after the merge, count the merges of main with the committer GitHub on topic branches: at most 5, and no group of 2 or more within 10 minutes.
  • Over one day, count the topic pull request runs with a moved base and the same patch-id whose previous head had no conflict with the new base: 0.

No live cluster, ConfigMap, Secret or repository setting changes.

Test evidence

  • Test first: on the old code, the 7 new tests of tests/commands/test_pr_update.py failed and the 15 adapted tests passed. With the change, all 22 pass.
  • Covering tests (tests/commands/test_pr*.py, tests/release, tests/ai/mcp, tests/github, tests/lang, tests/invariants, tests/roadmap/test_roadmap_draft_readiness.py): 2,813 passed.
  • mypy --strict on the 8 changed source files: no issues. devops openspec check: passed.
  • After the rebase onto the current origin/main: the MCP listing, dry-run ratchet, skills and update tests pass (44), and devops docs generate --sync-readme changes no file.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 09:09
@dan-petty
dan-petty merged commit aa4fa1a into main Nov 12, 2026
24 checks passed
@dan-petty
dan-petty deleted the refactor/4674-pr-update-failed-check branch November 12, 2026 12:07
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.118.0](v0.117.2...v0.118.0)
(2026-11-12)


### Features

* **ci:** devops ci stops its rows when timeout ends it
([#5031](#5031))
([1fa4e9c](1fa4e9c))
* **roadmap:** keep the stage gate problems as a list with a code
([#5022](#5022))
([5819627](5819627))
* **roadmap:** log one result line for each roadmap job attempt
([#4966](#4966))
([2b6fe3f](2b6fe3f))
* **telemetry:** record each CLI usage error by name and kind
([#4973](#4973))
([a179fd9](a179fd9))


### Bug Fixes

* **ai:** chat loads each persona prompt and challenger gets tools
([#5037](#5037))
([c40b0ad](c40b0ad))
* **ai:** keep the HTTP status of a Claude reply after retries
([#4976](#4976))
([5bf9466](5bf9466))
* **deps:** keep Renovate uv bumps green and groups on Monday
([#4987](#4987))
([b19e153](b19e153))
* **k8s:** raise the limits that 7 d of use shows are too low
([#5030](#5030))
([028c62b](028c62b))
* **roadmap:** a job posts no comment that repeats a recent one
([#4978](#4978))
([fff903a](fff903a))
* **service:** alert when GitHub cannot deliver a webhook
([#5045](#5045))
([2bfbfcb](2bfbfcb))
* **service:** delete the stream route that sends canned verified text
([#5038](#5038))
([e9d51b5](e9d51b5))
* **telemetry:** keep one upstream status series per service
([#4986](#4986))
([3e4ca56](3e4ca56))
* **tests:** remove the runner variable in the test floor
([#4988](#4988))
([093aa61](093aa61))


### Performance Improvements

* **ai:** make the ast graph walk and call search faster
([#5039](#5039))
([3b25cc6](3b25cc6)),
closes [#4662](#4662)
* **ci:** build the devcontainer only on its own inputs
([#4977](#4977))
([c5b15ac](c5b15ac))
* **ci:** test each merge once, on the push to main
([#5043](#5043))
([c6992b1](c6992b1))
* **tests:** remove fixed waste in six slow tests
([#4995](#4995))
([1c7044e](1c7044e))


### Code Refactoring

* **ai:** delete devops ai pipeline and persona leftovers
([#5044](#5044))
([d5fefde](d5fefde)),
closes [#4827](#4827)
* **openspec:** split big capabilities into nested ones
([#4981](#4981))
([dfb09bd](dfb09bd))
* **pr:** devops pr update acts only on a failed check
([#4990](#4990))
([aa4fa1a](aa4fa1a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
@devops-cli-service devops-cli-service Bot mentioned this pull request Nov 15, 2026
1 of 21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/pr The devops pr commands type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(pr): devops pr update acts only on a failed check

1 participant