mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 06:50:43 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The merge-queue Docker workflow (`.github/workflows/docker-merge-group.yml`) pre-builds the production image on `merge_group` so `docker.yml` can promote it on `master` > - #22993 routed `amd64` merge-queue builds to `cloud-release-32`, which does not admit `docker-merge-group.yml`, leaving every merge-queue build queued forever > - While those builds sat queued, `docker.yml` waited 3 minutes in `Find the merge-queue build of this commit` before falling back to its fast AWS release runner > - This pull request moves `docker-merge-group.yml` back to standard GitHub-hosted `matrix.runner` runners and sets `MERGE_GROUP_FIND_WAIT_MS=0` when `CORE_RELEASE_AWS_ENABLED=true` > - The benefit is that merge-queue builds actually execute and promote when ready, while fast AWS `master` builds never lose 3 minutes waiting behind slower GitHub-hosted merge-queue legs ## Linked Issues or Issue Description Refs #22993, Refs #23000 **Describe the bug** Every `docker-merge-group.yml` run stayed queued forever on `build (linux/amd64)` because the `cloud-release-32` runner group does not admit that workflow. In addition, `docker.yml` waited 3 minutes polling unfinished merge-queue runs even when running on the faster AWS release fleet (`CORE_RELEASE_AWS_ENABLED=true`). **Steps to reproduce** 1. Merge a PR through the GitHub Merge Queue on `master`. 2. Inspect the triggered `Docker merge-queue build` run and see `build (linux/amd64)` queued indefinitely. 3. Inspect the subsequent `Docker` run on `master` and see `Find the merge-queue build of this commit` spend 3 minutes waiting before falling back to a source build. **Expected behavior** `docker-merge-group.yml` starts on standard GitHub-hosted runners (`ubuntu-latest` / `ubuntu-24.04-arm`), and `docker.yml` promotes an already-completed merge-queue build immediately without stalling 3 minutes when running on the AWS release fleet. ## What Changed - `.github/workflows/docker-merge-group.yml`: restore `runs-on: ${{ matrix.runner }}` for `build` so `amd64` runs on `ubuntu-latest` instead of queueing on `cloud-release-32`. - `.github/workflows/docker.yml`: pass `MERGE_GROUP_FIND_WAIT_MS: ${{ vars.CORE_RELEASE_AWS_ENABLED == 'true' && '0' || '180000' }}` to `Find the merge-queue build of this commit`. - `scripts/merge-group-image.mjs`: add `resolveFindWaitMs(env)` (clamped to `[0, 180000]`, defaulting to `180000`) and use it in `find`. - `server/src/__tests__/docker-runner-workflows.test.ts` & `scripts/merge-group-image.test.mjs`: add guard tests for standard runner placement and `resolveFindWaitMs` / `MERGE_GROUP_FIND_WAIT_MS`. ## Verification - `vitest run server/src/__tests__/docker-runner-workflows.test.ts`: 15/15 passed. - `node --test scripts/merge-group-image.test.mjs`: 10/10 passed. ## Risks - Low risk. Restores standard runner placement (matching #23000) and keeps the exact promotion verification contract unchanged; fail-open fallback to source build is preserved. ## Model Used - Google Antigravity agent (Gemini / Antigravity coding harness with shell execution and tool use). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge