Skip to content

Commit 1e27c4e

Browse files
committed
Merge pull request #62 from Forward-Future/codex/continuous-coordinator-20260623
2 parents b36d3e8 + 59f84f2 commit 1e27c4e

20 files changed

Lines changed: 567 additions & 49 deletions

File tree

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Install the reviewed `v0.2.25` source commit directly from GitHub:
1515

1616
```bash
1717
python3 -m pip install \
18-
'deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@12c6c03aa76a553fa4068279baa29e90a30bbeb1'
18+
'deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@3fb42e2e3cf3a6f21cddf43e3d06deaa24a3ac80'
1919
deploybot init
2020
```
2121

@@ -87,18 +87,19 @@ the user does not repeat `deploy`. No polling timer is involved.
8787
Install `examples/github-workflow.yml` on the default branch. It reacts to
8888
deploy labels, ready/synchronize events, reviews, named CI `workflow_run`
8989
completions, and completed external check suites. Keep its `workflows` list
90-
aligned with `pipeline.ci_workflows`. A five-minute scheduled reconciliation
91-
rereads all durable state in case GitHub concurrency coalesces the last pending
92-
event in a burst. The privileged worker never checks out or executes
93-
pull-request code. The Action advances releases to the configured admission
94-
gate. In the default `merged` mode it returns after each healthy observation,
95-
leaving completion to later release events and keeping the serialized merge
96-
worker free. It can still dispatch deployment when GitHub suppresses the
97-
`workflow_run` event for token-dispatched CI. Pin the Action to the full reviewed
98-
release commit:
90+
aligned with `pipeline.ci_workflows`. Each wake runs two independently
91+
serialized jobs: the queue reactor can admit more ready work immediately, while
92+
the release-only follower owns cumulative exact `main` through CI, deployment,
93+
and verification. The follower exits immediately when no release needs work and
94+
dispatches deployment when GitHub suppresses the `workflow_run` handoff for
95+
token-dispatched CI, avoiding a wait for the five-minute scheduled
96+
reconciliation. The schedule still rereads all durable state if GitHub
97+
concurrency coalesces the last event in a burst. Neither privileged job checks
98+
out or executes pull-request code. Pin the Action to the full reviewed release
99+
commit:
99100

100101
```yaml
101-
- uses: Forward-Future/DeployBot@12c6c03aa76a553fa4068279baa29e90a30bbeb1
102+
- uses: Forward-Future/DeployBot@3fb42e2e3cf3a6f21cddf43e3d06deaa24a3ac80
102103
```
103104
104105
The Action uses GitHub's built-in workflow token. GitHub intentionally does not

action.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: DeployBot
22
description: Promote, batch, merge, and follow agent-authored pull requests
33
inputs:
4+
mode:
5+
description: Run queue reaction or release-only follow
6+
required: false
7+
default: react
48
config:
59
description: Repository-relative merge queue policy path
610
required: false
@@ -32,16 +36,28 @@ runs:
3236
- shell: bash
3337
env:
3438
DEPLOYBOT_CONFIG: ${{ inputs.config }}
39+
DEPLOYBOT_MODE: ${{ inputs.mode }}
3540
GH_TOKEN: ${{ inputs.token || github.token }}
3641
DEPLOYBOT_FOLLOW: ${{ inputs.follow }}
3742
DEPLOYBOT_DISPATCH_CI: ${{ inputs.dispatch_ci }}
3843
DEPLOYBOT_TIMEOUT: ${{ inputs.timeout }}
3944
run: |
40-
args=(react --timeout "$DEPLOYBOT_TIMEOUT")
41-
if [[ "$DEPLOYBOT_DISPATCH_CI" == "true" ]]; then
42-
args+=(--dispatch-ci)
43-
fi
44-
if [[ "$DEPLOYBOT_FOLLOW" == "true" ]]; then
45-
args+=(--follow)
46-
fi
45+
case "$DEPLOYBOT_MODE" in
46+
react)
47+
args=(react --timeout "$DEPLOYBOT_TIMEOUT")
48+
if [[ "$DEPLOYBOT_DISPATCH_CI" == "true" ]]; then
49+
args+=(--dispatch-ci)
50+
fi
51+
if [[ "$DEPLOYBOT_FOLLOW" == "true" ]]; then
52+
args+=(--follow)
53+
fi
54+
;;
55+
follow)
56+
args=(follow --timeout "$DEPLOYBOT_TIMEOUT" --if-needed)
57+
;;
58+
*)
59+
echo "mode must be react or follow" >&2
60+
exit 2
61+
;;
62+
esac
4763
deploybot --config "$DEPLOYBOT_CONFIG" "${args[@]}"

adapters/claude-code/.mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"command": "uvx",
55
"args": [
66
"--from",
7-
"deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@12c6c03aa76a553fa4068279baa29e90a30bbeb1",
7+
"deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@3fb42e2e3cf3a6f21cddf43e3d06deaa24a3ac80",
88
"deploybot-mcp"
99
]
1010
}

adapters/claude-code/skills/deploybot/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ commands. Re-read GitHub, honor a pipeline pause, freeze one exact batch,
8383
preserve first-in order unless dependencies require otherwise, and skip blocked
8484
items that do not block independent work.
8585

86+
Use `react_to_delivery_event` (or `deploybot react --follow --dispatch-ci`) for
87+
queue-changing coordination. `follow_release` / `deploybot follow` is
88+
release-only: it follows the current base revision but never promotes or drains
89+
queued pull requests. Do not substitute it for a reaction when work is queued.
90+
In GitHub Actions, keep queue reaction and release-only follow in separate
91+
concurrency groups so `release_admission = "merged"` can admit more work while
92+
one follower owns cumulative exact-main CI and deployment.
93+
8694
Merge independent ready pull requests back-to-back. Route source-overlap groups
8795
through `create_integration_pull_request`; when policy mode is `all`, validate
8896
the entire frozen batch through that cumulative PR. Never invent a conflict
@@ -92,6 +100,13 @@ after its new exact head passes. Keep release tracking event-driven: in
92100
after a healthy merge while later events continue CI, deployment, and health
93101
tracking. Scheduled reconciliation is a fallback, not the normal promotion path.
94102

103+
For queue-wide requests such as "all open PRs," treat the target set as live,
104+
not as the first snapshot. After each verified cumulative release, refresh
105+
pipeline status, the queue plan, and the provider's open-PR list once more.
106+
Admit newly opened authorized work and react again. Stop only when the queue,
107+
unbound list, and provider open-PR list are all empty at the same fresh
108+
boundary; do not leave a tight idle polling loop behind.
109+
95110
Genuine repair blocks may hold overlapping ready work for the configured bounded
96111
repair window, but they remain merge-ineligible until the trusted source agent
97112
resumes the freshly reviewed exact head. If `main` advances while a repair is

adapters/claude-code/skills/manage-merge-queue/SKILL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ and use `resume_pull_request` after fresh review. In `release_admission =
3030
"merged"` mode, admit independent ready work immediately after merge while
3131
later events track CI and deployment; a later failure pauses the pipeline.
3232

33+
Use the reaction path for queue work. `follow_release` / `deploybot follow` is
34+
release-only and never promotes or drains queued pull requests. For an
35+
"all open PRs" request, refresh status, the plan, and the provider's open list
36+
after the verified release; react again for newly opened authorized work and
37+
stop only when all three are empty at the same fresh boundary.
38+
In GitHub Actions, keep queue reaction and release-only follow in separate
39+
concurrency groups so release ownership never holds up merged-mode admission.
40+
3341
A genuine repair remains merge-ineligible, but DeployBot may temporarily hold
3442
overlapping ready work for the configured bounded repair window so concurrent
3543
merges do not repeatedly invalidate the replacement head.

adapters/codex/agent-merge-queue/skills/deploybot/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ Only the designated coordinator may run `deploybot promote`, `deploybot react`,
7777
pause, freeze one exact batch, preserve first-in order unless dependencies
7878
require otherwise, and skip blocked items that do not block independent work.
7979

80+
Use `deploybot react --follow --dispatch-ci` for queue-changing coordination.
81+
`deploybot follow` is release-only: it follows the current `main` revision but
82+
never promotes or drains queued pull requests. Do not substitute it for
83+
`react` when work is queued.
84+
In GitHub Actions, keep queue reaction and release-only follow in separate
85+
concurrency groups so `release_admission = "merged"` can admit more work while
86+
one follower owns cumulative exact-main CI and deployment.
87+
8088
Merge independent ready pull requests back-to-back. Route source-overlap groups
8189
through `deploybot integrate`; when policy mode is `all`, validate the entire
8290
frozen batch through that cumulative PR. Never invent a conflict resolution.
@@ -86,6 +94,13 @@ its new exact head passes. Keep release tracking event-driven: in
8694
after a healthy merge while later events continue CI, deployment, and health
8795
tracking. Scheduled reconciliation is a fallback, not the normal promotion path.
8896

97+
For queue-wide requests such as "all open PRs," treat the target set as live,
98+
not as the first snapshot. After each verified cumulative release, refresh
99+
`deploybot status --json`, `deploybot plan --json`, and the provider's open-PR
100+
list once more. Admit newly opened authorized work and react again. Stop only
101+
when the queue, unbound list, and provider open-PR list are all empty at the
102+
same fresh boundary; do not leave a tight idle polling loop behind.
103+
89104
Genuine repair blocks may hold overlapping ready work for the configured bounded
90105
repair window, but they remain merge-ineligible until the trusted source agent
91106
resumes the freshly reviewed exact head. If `main` advances while a repair is

adapters/codex/agent-merge-queue/skills/manage-merge-queue/SKILL.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ after fresh review. In `release_admission = "merged"` mode, admit independent
3131
ready work immediately after merge while later events track CI and deployment;
3232
a later failure pauses the pipeline.
3333

34+
Use `deploybot react --follow --dispatch-ci` for queue work. `deploybot follow`
35+
is release-only and never promotes or drains queued pull requests. For an
36+
"all open PRs" request, refresh status, the plan, and the provider's open list
37+
after the verified release; react again for newly opened authorized work and
38+
stop only when all three are empty at the same fresh boundary.
39+
In GitHub Actions, keep queue reaction and release-only follow in separate
40+
concurrency groups so release ownership never holds up merged-mode admission.
41+
3442
A genuine repair remains merge-ineligible, but DeployBot may temporarily hold
3543
overlapping ready work for the configured bounded repair window so concurrent
3644
merges do not repeatedly invalidate the replacement head.

adapters/cursor/.cursor/mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"command": "uvx",
55
"args": [
66
"--from",
7-
"deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@12c6c03aa76a553fa4068279baa29e90a30bbeb1",
7+
"deploybot-merge-queue[mcp] @ git+https://github.com/Forward-Future/DeployBot.git@3fb42e2e3cf3a6f21cddf43e3d06deaa24a3ac80",
88
"deploybot-mcp"
99
]
1010
}

adapters/cursor/.cursor/rules/deploybot.mdc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ the stable Cursor thread ID, never prompts or transcripts. Refresh intent only
1515
after replacement-head review. Only the coordinator may react, integrate,
1616
drain, follow, pause, or resume repaired work.
1717

18+
Use the reaction path for queue-changing coordination. `follow_release` is
19+
release-only: it observes the current base revision and never promotes or
20+
drains queued pull requests. For a queue-wide request such as "all open PRs,"
21+
refresh `pipeline_status`, `queue_plan`, and the provider's open pull-request
22+
list after the verified release. Stop only when the queue, unbound PRs, and
23+
provider list are all empty at that same fresh boundary.
24+
In GitHub Actions, keep queue reaction and release-only follow in separate
25+
concurrency groups so release ownership never holds up merged-mode admission.
26+
1827
Honor `pipeline.release_admission`. In `merged` mode, admit the next independent
1928
ready PR immediately after a healthy merge while release events continue CI,
2029
deployment, and health tracking. A later failure pauses future merges normally.

adapters/cursor/AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ fresh review, and follow cumulative `main` through verified deployment. When
3131
`release_admission = "merged"`, admit independent ready work immediately after
3232
merge while release events continue asynchronously; later failures still pause.
3333

34+
Use the reaction path for queue-changing coordination. `follow_release` is
35+
release-only: it observes the current base revision and never promotes or
36+
drains queued pull requests. For a queue-wide request such as "all open PRs,"
37+
refresh `pipeline_status`, `queue_plan`, and the provider's open pull-request
38+
list after the verified release. Stop only when the queue, unbound PRs, and
39+
provider list are all empty at that same fresh boundary.
40+
In GitHub Actions, keep queue reaction and release-only follow in separate
41+
concurrency groups so release ownership never holds up merged-mode admission.
42+
3443
For each verified `thread_notifications` entry, post its message back to the
3544
native PR-opening thread and only then call `acknowledge_thread_deployment`. Leave
3645
failed notifications `pending` for a later retry, and pass the matching

0 commit comments

Comments
 (0)