Repository navigation
Description
Problem Statement
Split out of #842 (owner decision Q2, 2026-10-01: "#842 keeps steps 3-5, a new dispatch item sits between #754 and #842 in v0.2.27"). Owner order D3 needs the dispatch code merged and verified live (step 3) before required checks are enabled (step 4) and the cleanup/ADR pull request lands (step 5); one pull request cannot contain a change that must already be merged. Folding it into #754 is ruled out by #754's own D3: that item lands before update-prs.yml is given any privilege, and actions: write is that privilege. This item is D3 step 2.
Pushes made with GITHUB_TOKEN are not guaranteed to start workflows. .github/workflows/update-prs.yml has no privileged token to fall back to (the repository holds 0 Actions secrets, #842's finding of 2026-10-01; update-prs.yml:72,80 resolve to GITHUB_TOKEN), so the merge commits devops pr update creates sometimes get no check runs at all (on PR #828, bot commits 8675ec1 and 700385d have 0 check runs while d259b97 got the full set). With required checks on (#842 step 4), such a head would wait on checks that never start.
What exists at HEAD 9c879ae:
ci.ymlalready has aworkflow_dispatchtrigger with no inputs (.github/workflows/ci.yml:16). On that eventStatic AnalysisandTests & Coveragerun (if: github.event_name != 'schedule',ci.yml:27,73) andDevContainer Imagedoes not (ci.yml:103,pull_requestintomainonly). A dispatched run groups byrefs/heads/<branch>withcancel-in-progress: true(ci.yml:18-20).devops pr updatecalls the asynchronousPUT repos/{owner}/{repo}/pulls/{n}/update-branchand returns on the 202 (src/devops_cli/commands/pr.py:1885-1958:_build_update_branch_cmd:1885-1895,_parse_update_error:1898-1911,_execute_update_branch:1914-1920,_update_single_pr:1923-1958). It fetches the pull request first (_fetch_pr_details,pr.py:228-249, called atpr.py:1938), so the pre-update head SHA is already in hand. There is no dispatch, poll or wait logic anywhere insrc/devops_cli(grep -rn 'actions/workflows' src/devops_cli --include='*.py'matches nothing), andpr.pyimports notimemodule (pr.py:5-11).update-prs.ymlholdscontents,pull-requestsandissueswrite (update-prs.yml:45-48). No workflow hasactions: write(grep -n 'actions:' .github/workflows/*.ymlfinds onlycodeql.yml:39 actions: read), and no test guards which workflows may hold it.run_ghtreatsgh api -X POSTas a mutation (src/devops_cli/github/rate_limiter.py:484-509:_is_api_mutationmatches thePOSTmethod argument,_is_mutation_commandroutesapicalls to it), so a dispatch call goes through the same pacing and retry as the update-branch call.tests/test_pr_update.pyalready stubsrun_gh(:60,68),_fetch_pr_details(:115,139,165) and_execute_update_branch(:122,150,172) with CliRunner, so the new behaviour is testable offline in the same module.
Proposed Solution
Owner decisions carried from #842 (2026-10-01), on record because they replace any matching proposed answer:
- D3 step 2, the route. Dispatch: update-prs dispatches
ci.ymlfor each branch it updates. The ADR 0002 machine-account token (classic,repo/project) stays only in the cluster Secret that feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 creates from the keyring (devops-cliin namespacedevops, keyGH_TOKEN, read throughenvFrom) and is not stored as an Actions secret, so the privileged token lives in one place. - D3, the order. fix(ci): only collaborators can trigger pr updates with
/updateor/synccomments #754, then this item, then chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 (live confirmation, required checks, cleanup and ADR 0004).
One pull request:
devops pr update --dispatch-ci. A new boolean option (default off) onupdate_pr(pr.py:2035-2085), passed through_update_all_prsand_process_candidate_pr_row(pr.py:1990-2032) to_update_single_pr(pr.py:1923-1958). With it on, after_execute_update_branchreturns success, a new helper_dispatch_ci_for_head(target_repo, number, pr, pre_sha)(kept separate so_update_single_prstays within the repository's limits: cyclomatic complexity 10 and nesting depth 5,DEFAULT_MAX_COMPLEXITY/DEFAULT_MAX_NESTING_DEPTHatsrc/devops_cli/config/defaults.py:677-678, enforced bydevops scan complexity(src/devops_cli/commands/scan.py:410,440) andtest_no_excessive_nesting_in_src(tests/test_architectural_invariants.py:146); ruff selects no C90 rule,pyproject.toml:93):- polls
_fetch_pr_detailsuntilhead.shadiffers from the pre-update SHA read from the pull request fetched atpr.py:1938, at mostDEFAULT_PR_UPDATE_HEAD_POLL_ATTEMPTS(6) attemptsDEFAULT_PR_UPDATE_HEAD_POLL_INTERVAL_SECONDS(5.0) apart, both new constants insrc/devops_cli/config/defaults.pybesideDEFAULT_PR_MONITOR_*(defaults.py:720-722), sleeping throughtime.sleepwith a module-levelimport timeindevops_cli.commands.prso tests patchdevops_cli.commands.pr.time.sleep(the patterntests/test_ai_gateway_tune.py:348uses); - when the SHA changed, runs
gh api -X POST repos/{owner}/{repo}/actions/workflows/ci.yml/dispatches -f ref=<head ref>built by_build_dispatch_ci_cmd(owner_repo, head_ref)in the shape of_build_update_branch_cmd(pr.py:1885-1895), with the workflow file name asCONST_CI_WORKFLOW_FILE = "ci.yml"insrc/devops_cli/config/constants.py(besideCONST_GH_CLI,constants.py:676); no inputs, becauseci.yml:16declares none; - when the SHA did not change within the bound, or the head branch lives in a fork (
head.repois null orhead.repo.full_namediffers from the target repository, so no ref exists to dispatch on), or the dispatch call fails, dispatches nothing and reports why. --dry-runreturns before any call, as today (pr.py:1942-1947); nothing is polled or dispatched.- Outcome reporting: the single-PR path prints the dispatch result after the existing
update_branch_successline (messages.py:498-500) and exits 1 when--dispatch-ciwas asked for and nothing was dispatched after a successful update, except the fork case, which is reported and exits 0 because no dispatch was ever possible; the--allpath adds the dispatch outcome to the status cell of the summary table and, as today (_update_all_prsreturnsNone,pr.py:2008-2032), never exits non-zero for one row. When--dispatch-ciis off, output and exit codes are byte-for-byte what they are today. An update-branch failure dispatches nothing, as every failure path does today. - New strings live in
src/devops_cli/lang/en/help.py(update_dispatch_ci, besideupdate_expected_head_sha,help.py:730-732) andsrc/devops_cli/lang/en/messages.py(dispatch success, head unchanged, fork head, dispatch failed, besideupdate_branch_*,messages.py:498-510).
- polls
update-prs.yml. Theupdate-pull-requestsjob gainsactions: writeunder its existingpermissions:(update-prs.yml:45-48); the three existing permissions, theGH_TOKENexpressions (:72,80), theon:block and the jobif:(:37-42, as fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 leaves them) are unchanged. Each of the fouruv run devops pr updateinvocations (update-prs.yml:88,98,104,110, line numbers as of HEAD; fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 moves expressions toenv:first) gains--dispatch-ci. No${{ }}enters arun:block, so fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754's contract test keeps passing.- Workflow contract assertions in
tests/test_workflow_contracts.py(created by fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754, parsingupdate-prs.ymlwith PyYAML): theupdate-pull-requestsjob'spermissionsmap equals{contents: write, pull-requests: write, issues: write, actions: write}, and everyrun:value that containsdevops pr updatealso contains--dispatch-ci. - The allowlist invariant in
tests/test_architectural_invariants.py, next to the ci.yml and Dockerfile check (_ci_image_content_pathsandtest_devcontainer_image_path_filter_covers_dockerfile_sources,:416-495, which already parseci.ymlwith PyYAML at:418-420), parsing every.github/workflows/*.yml:- the set of
(workflow file, job id)pairs whosepermissions.actionsiswrite, at workflow or job level, equals the allowlist{("update-prs.yml", "update-pull-requests")}, with the reason recorded beside the allowlist (dispatchingci.ymlis the only reason any workflow may create workflow runs, and the token that may do it is the one fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 gated); ci.ymlkeepsworkflow_dispatchunderon:, and the jobs namedStatic AnalysisandTests & Coverage(pinned by refactor(ci): github ci runs the gate throughdevops cifrom one check table #843) each haveif: github.event_name != 'schedule'or noif:, so a dispatched run still produces both required checks. Any other condition is a deliberate edit of this test with its reason.
- the set of
- Docs and records.
devops docs generaterefreshesdocs/commands/pr.md:276anddocs/CLI_REFERENCE.md:5820for the new option;changelog.d/<issue>.mdunder### Added;docs/agent/tasks/task-<issue>-pr-update-dispatches-ci.mdwritten as Done in the delivering commit (docs/agent/tasks/README.md, rules 3-5).
Scope
- Files changed:
src/devops_cli/commands/pr.py,src/devops_cli/config/constants.py,src/devops_cli/config/defaults.py,src/devops_cli/lang/en/help.py,src/devops_cli/lang/en/messages.py,.github/workflows/update-prs.yml,tests/test_pr_update.py,tests/test_workflow_contracts.py,tests/test_architectural_invariants.py,docs/commands/pr.md,docs/CLI_REFERENCE.md,changelog.d/<issue>.md, the task file. - The MCP tool
pr_update_branch(src/devops_cli/ai/mcp/server.py:2255-2272) is unchanged;test_mcp_pr_update_branch(tests/test_pr_update.py:220-250) still passes as written. - Constraints:
- Lands after fix(ci): only collaborators can trigger pr updates with
/updateor/synccomments #754 (same file,update-prs.yml; D3 order) and after refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 (the invariant reads the job names refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 pins and theci.ymlshape it leaves). Lands before chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842. - No token is stored as an Actions secret;
update-prs.ymlkeepsGITHUB_TOKENas its only effective credential. - Tests run offline:
time.sleepandrun_ghare patched; nothing opens a socket (tests/conftest.py:99network guard stays silent). Each new test runs under 1 s (gate speed is P0). CHANGELOG.mdanddocs/ROADMAP.mdare not edited;changelog.d/<issue>.mdcarries the entry.uv run actionlint(theactionlintrow ofdevops ci,src/devops_cli/commands/ci.py:435-441) passes on the edited workflow.- No new
noqaand no newnosec;uv run devops scan complexity src/devops_cli/commands/pr.pystill reports within limits (it does at HEAD).
- Lands after fix(ci): only collaborators can trigger pr updates with
Key Questions
All answered; the two carried from #842 are decided here with the recommendations its verdict gave.
- Where does the dispatch live:
_update_single_pror a shell loop inupdate-prs.yml? Answered:_update_single_pr, through a helper. It keeps everyupdate-prs.ymlcall a one-lineuv run devops pr update ...(:88,98,104,110), it is testable offline wheretests/test_pr_update.pyalready stubsrun_ghand_fetch_pr_details, and a shell loop would have to re-fetch the head SHA with expressions fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 just removed fromrun:. - How does the dispatch target the new head when update-branch returns 202 before the merge commit exists? Answered: poll the pull request's
head.shauntil it differs from the pre-update SHA, bounded (6 attempts, 5 s apart), then dispatch on the head branch; dispatch nothing when it did not change. Dispatching immediately after the 202 would runci.ymlon the old SHA and report a green that belongs to the previous head. The head branch tip is the merge commit, so aworkflow_dispatchrun onrefs/heads/<branch>attaches its check runs to the pull request's head SHA, which is what a required check reads. - Always dispatch, or behind an option? Answered: behind
--dispatch-ci, default off, whichupdate-prs.ymlpasses. A person runningdevops pr updatewith their own token pushes a merge commit that already startspull_request: synchronizeruns; a dispatch there would double every run (thepull_requestgroup isrefs/pull/<n>/mergeand the dispatch group isrefs/heads/<branch>,ci.yml:19, so neither cancels the other). OnlyGITHUB_TOKENpushes need the dispatch. - What about pull requests from forks? Answered: no dispatch, with a message naming the fork, exit 0.
workflow_dispatchtakes a ref in this repository; a fork head has none. Fork pull requests get their runs from thepull_requestevent when the author pushes, andupdate-branchon a fork needs maintainer edits enabled, so this path is rare and reported rather than hidden. - Does the dispatched run count as the pull request's check? Answered: yes. Check runs attach to a commit SHA; the dispatched run checks out the head branch at the merge commit, which is the pull request head. chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 step 3 confirms this live before step 4 turns the requirement on.
- Why an invariant rather than a comment on the permission? Answered:
actions: writelets a workflow create runs of any workflow in the repository. The allowlist keeps that privilege on the one job fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 gated, and a second workflow cannot gain it without changing the test and its recorded reason. It lands after refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 because it also pins theci.ymlproperties the dispatch relies on (workflow_dispatchpresent, both pinned jobs admitting it). - Which complexity limit does the helper split answer? Answered: not a ruff one.
pyproject.toml:93selects no C90 rule; the limits in force aredevops scan complexity(complexity 10, nesting 5,defaults.py:677-678) and the nesting invariant attests/test_architectural_invariants.py:146. The split keeps_update_single_pra straight line through fetch, dry-run, update and report.
Acceptance Criteria
-
uv run pytest tests/test_pr_update.py -qpasses with these new tests, each withrun_gh,_fetch_pr_details,_execute_update_branchanddevops_cli.commands.pr.time.sleeppatched and no socket opened:_build_dispatch_ci_cmd("owner/repo", "feat/x")returns["gh", "api", "-X", "POST", "repos/owner/repo/actions/workflows/ci.yml/dispatches", "-f", "ref=feat/x"].update 42 --repo owner/repo --dispatch-ci, with_fetch_pr_detailsreturninghead.shaoldon the first call andnewon the second: exactly onerun_ghcall is the dispatch argv above withref=feat/my-branch, the output names the dispatch, exit code 0.- the same invocation without
--dispatch-ci: zero dispatch calls, no sleep, and the output is whattest_update_single_pr_cli_success(tests/test_pr_update.py:110-130) asserts today. head.shanever changes:sleepis called withDEFAULT_PR_UPDATE_HEAD_POLL_INTERVAL_SECONDSat mostDEFAULT_PR_UPDATE_HEAD_POLL_ATTEMPTStimes, no dispatch call, the output says the head did not change, exit code 1.head.repo.full_nameisother/repo: no poll, no dispatch, the output names the fork, exit code 0.- the dispatch
run_ghcall returns non-zero: the output carries the parsed API message (_parse_update_error,pr.py:1898-1911), exit code 1. update 42 --repo owner/repo --dispatch-ci --dry-run: no poll, no sleep, no dispatch;test_update_single_pr_cli_dry_run(:133-157) still passes.update --all --repo owner/repo --dispatch-ci:_update_single_pris called withdispatch_ci=Truefor the non-draft row, the draft row is still skipped, and the status cell of the updated row names the dispatch outcome;test_update_all_prs_cli(:183-206) andtest_process_candidate_pr_row(:78-107) pass unchanged without the option.
-
uv run pytest tests/test_workflow_contracts.py -qpasses with two new assertions: theupdate-pull-requestsjob'spermissionsequals{contents: write, pull-requests: write, issues: write, actions: write}, and everyrun:value containingdevops pr updatealso contains--dispatch-ci. fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754's assertions (jobif:guard, no${{in anyrun:) still pass on the edited file. - The allowlist invariant in
tests/test_architectural_invariants.pypasses on the real workflows, and the builder makes each of these edits locally, watchesuv run pytest tests/test_architectural_invariants.py -k <new test name>fail, reverts it and notes the result in the pull request:actions: writeadded to therelease.ymljob;actions: writeremoved fromupdate-prs.yml;workflow_dispatchremoved fromci.yml'son:; theStatic Analysisjob'sif:changed togithub.event_name == 'pull_request'. The test runs under 1 s (uv run pytest --durations=5 tests/test_architectural_invariants.py). -
grep -n 'actions:' .github/workflows/*.ymlprints exactlycodeql.ymlactions: readandupdate-prs.ymlactions: write;grep -c -- '--dispatch-ci' .github/workflows/update-prs.ymlprints 4;grep -n '\${{' .github/workflows/update-prs.ymlmatches onlyconcurrency.groupandenv:value lines, as fix(ci): only collaborators can trigger pr updates with/updateor/synccomments #754 leaves it. -
uv run actionlintexits 0. -
uv run devops pr update --helplists--dispatch-ciwith its help text;uv run devops docs checkpasses (thedocsrow ofuv run devops ci,src/devops_cli/commands/ci.py:442-448) afterdocs/commands/pr.mdanddocs/CLI_REFERENCE.mdare regenerated. -
grep -rn '"ci.yml"' src/devops_cli --include='*.py'matches onlyCONST_CI_WORKFLOW_FILEinsrc/devops_cli/config/constants.py(it matches nothing today);rg -n 'DEFAULT_PR_UPDATE_HEAD_POLL' src/devops_cli/config/defaults.pyprints the two constants;grep -n '^import time' src/devops_cli/commands/pr.pyprints one line. -
uv run devops scan complexity src/devops_cli/commands/pr.pyreports within limits, as at HEAD;git diff main...HEAD -- src | grep -c 'noqa\|nosec'prints 0. -
uv run devops cipasses offline;uv run pytest --durations=10 tests/test_pr_update.py tests/test_workflow_contracts.pyshows every test under 1 s. -
changelog.d/<issue>.mdexists under### Added,docs/agent/tasks/task-<issue>-pr-update-dispatches-ci.mdpassestests/test_agent_task_files.py, anduv run devops pr check-readinesspasses with noCHANGELOG.mdordocs/ROADMAP.mdchange.
Out of Scope
- Confirming live that a bot-updated pull request gets fresh
Static AnalysisandTests & Coverageruns (chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 step 3), requiring the checks on both rulesets (chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 step 4), deleting.github/branch-protection.yml, ADR 0004 and the CONTEXT.md terms (chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 step 5). - Storing any token as an Actions secret, or changing the
GH_TOKENexpressions atupdate-prs.yml:72,80. - Adding
--dispatch-cito the MCP toolpr_update_branch(server.py:2255-2272); the service and MCP paths run with a real token and getpull_requestruns from their own pushes. - Waiting for the dispatched run to finish or reporting its result;
devops pr waitandcheck-readinessalready read check runs. - Using the unused
update_branch_already_up_to_dateandupdate_branch_conflictmessages (messages.py:503-509) or changing how update-branch failures are classified. - Renaming the pinned jobs or editing
ci.ymlat all (refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 owns its shape;workflow_dispatchis already there). - zizmor's
excessive-permissionsrule and the general workflow contract test across all workflows (fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861,docs/ROADMAP.md:1206, v0.2.28).
Dependencies
- Depends on fix(ci): only collaborators can trigger pr updates with
/updateor/synccomments #754 (v0.2.27, D3 step 1): restricts who can triggerupdate-prs.ymland moves itsrun:expressions intoenv:; it must merge before this item addsactions: writeto the same job, and it createstests/test_workflow_contracts.py, which this item extends. - Depends on refactor(ci): github ci runs the gate through
devops cifrom one check table #843 (v0.2.26): pins the job namesStatic AnalysisandTests & Coverageand rewrites thestaticandteststeps ofci.yml; the allowlist invariant reads the file as refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 leaves it. - Lands before chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 (v0.2.27): chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842's step 3 verifies this item live, and its ADR 0004 records the route this item implements. chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 lists this item as a dependency.
- Shares
tests/test_architectural_invariants.pywith refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832 (v0.2.26, adds the runner-change invariant beside the same ci.yml check) and feat(release): production service image for scheduled jobs and webhook handlers #753 (v0.2.26, parametrizes:428over both images); different hunks, rebase on whichever lands first. - Overlaps feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (v0.2.26): the machine-account token lives only in the Secret it pushes, which is why this item needs no secret.
- Design: ADR 0002 (
docs/adr/0002-roadmap-jobs-act-as-a-machine-account.md).
Readiness check (2026-10-04)
Re-checked at b61e5a0 (release/v0.2.26). #843 and #741 are merged. #754 is open and earlier in v0.2.27, so tests/test_workflow_contracts.py does not exist yet, as planned. update-prs.yml is unchanged (its cited lines hold).
Corrected locations (under src/devops_cli/):
commands/pr.py:_fetch_pr_detailsis at:231, called at:2007; the dry-run branch is at:2012-2017._build_update_branch_cmd:1955-1965,_parse_update_error:1968-1981,_execute_update_branch:1984-1990,_update_single_pr:1993-2027._process_candidate_pr_row:2060-2075,_update_all_prs:2078-2103,update_pr:2105-2155.- Imports are at
:5-11, still withouttime.
- Write pacing (fix(github): GraphQL mutations and implicit-POST
gh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125):_is_api_mutationand_is_mutation_command(rate_limiter.py:484-509) are gone.run_ghclassifies throughis_write_gh_command(github/request_classifier.py:79, called atgithub/rate_limiter.py:1932). It parsesgh api's own flags (:162-182), so the dispatchPOSTis still a paced write. - Config:
DEFAULT_MAX_COMPLEXITYconfig/defaults.py:695,DEFAULT_MAX_NESTING_DEPTH:699,DEFAULT_PR_MONITOR_*:741-743;CONST_GH_CLIconfig/constants.py:884. - Complexity: ruff now selects C901 with
max-complexity = 10(pyproject.toml:94-97,:109-110, feat(cli): enforce the complexity cap with ruff C901 and an inline baseline that only shrinks #586). The last key question's "not a ruff one" is stale: the helper split answers ruff C901 as well asdevops scan complexityand the nesting invariant (nowtests/test_architectural_invariants.py:170). The no-noqacriterion coversC901. tests/test_architectural_invariants.py:_ci_image_content_pathsis at:434and takes ajob_name(feat(release): production service image for scheduled jobs and webhook handlers #753).- Its test is
test_image_path_filter_covers_dockerfile_sources(:453), parametrised over both images. - refactor(ci): ci installs nothing on the runner, and live bubblewrap tests skip where bwrap is missing #832's runner invariant is at
:513. The allowlist invariant goes beside these.
ci.ymlas refactor(ci): github ci runs the gate throughdevops cifrom one check table #843 left it:Static Analysisis at:26andTests & Coverageat:46; both haveif: github.event_name != 'schedule'(:27,:47).- The
DevContainer Imageif:is at:71;workflow_dispatchis at:16, concurrency at:18-20.
- The
actionlintanddocsrows are inget_check_specs()atcommands/ci.py:438-444and:445-452. - Strings:
help.pyupdate_expected_head_shais at:788.messages.pyupdate_branch_*is at:575-586; the unusedalready_up_to_dateandconflictare at:580and:584.
- Other moved lines:
ai/mcp/server.pypr_update_branchis at:2349. It shells out to the CLI, so its test is unaffected.- The
tests/conftest.pynetwork guard is at:100. - Generated docs:
docs/commands/pr.md:297anddocs/CLI_REFERENCE.md:6055and:7117.
Rule alignment. The owner's dry-run rule (2026-10-04, #412; #886 amendment): no external request, reads included; return the ordered PlannedRequests (dry_run/requests.py).
"--dry-run returns before any call, as today" does not hold at HEAD. _update_single_pr reads the PR (_fetch_pr_details, :2007) before its dry-run return (:2012), and --all lists PRs (_fetch_open_prs, gh pr list) under a dry run. This item edits these functions, so its dry run follows the rule. The criterion that output stays byte-for-byte with --dispatch-ci off applies to real runs.
-
update 42 --repo owner/repo [--dispatch-ci] --dry-runmakes no request:run_gh,_fetch_pr_detailsandtime.sleeprecord zero calls, and it exits 0. It prints withrender_request_plan, in order:- the PR read;
- the update-branch
PUT; - with
--dispatch-ci, the head poll (repeat: up toDEFAULT_PR_UPDATE_HEAD_POLL_ATTEMPTS,DEFAULT_PR_UPDATE_HEAD_POLL_INTERVAL_SECONDSapart); - with
--dispatch-ci, the dispatchPOST(condition: the head changed and lives in this repository).
Values a read would supply appear as
<placeholders>.test_update_single_pr_cli_dry_run(tests/test_pr_update.py:133-157) also asserts zero_fetch_pr_detailscalls. -
update --all --repo owner/repo [--dispatch-ci] --dry-runmakes no request. It plans thegh pr listread, then the per-PR requests withrepeat"each open non-draft PR". The localgit branch -ain_detect_active_release_branch(pr.py:76-94) may still run.
Ready: no open question, #843 merged and #754 earlier in v0.2.27, one PR, effort Medium.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
The Secret is now
devops-cliin namespacedevops, keyGH_TOKEN(#741, 2026-10-03).feat(ci): devops pr update --dispatch-ci starts ci.yml on each branch…
dan-petty-bot commentedon Oct 5, 2026
What changed
#1194, merged into
release/v0.2.27as 4fb18bf.14 file(s) changed.
How it was verified
Check runs at 4578eb1:
Acceptance Criteria of
docs/agent/tasks/task-984-pr-update-dispatches-ci.md:--dispatch-ciflag added todevops pr updateCLI options and help text.ci.yml..github/workflows/update-prs.ymlinclude--dispatch-ci.update-prs.ymlholdsactions: writepermission forupdate-pull-requests.update-prs.ymlholdsactions: writeandci.ymladmitsworkflow_dispatch.changelog.d/984.mdis present.uv run devops cipasses with 100% green status across all quality gates..github/workflows/update-prs.ymltriggersci.ymlon updated pull requests.feat(release): v0.2.27 (#1257)