mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-23 04:54:00 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The Runner is the part that executes agent work. The application image contains it > - Today the application image compiles the Runner in its own stages, with a cargo-chef dependency layer > - A pull-request job proves that a fresh builder reuses that layer. The job runs a script that appends to the `Dockerfile` and names those stages > - The next pull request removes those stages. The application image then takes its Runner from the `runner-artifacts` stages. The job cannot run against that `Dockerfile` > - This pull request removes the job and its script > - The benefit is that the next pull request changes only the image build, and its checks stay green ## Linked Issues or Issue Description Refs #21204, #21229, #21230, #21306 and #21307 (the Runner image and the preparation for this change). No issue exists for this change. **Problem or motivation** `.github/workflows/docker-runner-check.yml` has a pull-request job, `Compile isolated native Runner`. It runs `scripts/check-docker-runner-cache.sh`. The script adds stages to a copy of the `Dockerfile` that start from `runner-build` and copy from `runner-plan`. It reads the build log for the `runner-deps` step. The job runs on every pull request that changes the `Dockerfile`. The pull request that removes those stages would fail this job. **Proposed solution** Remove the job, its trigger and its script first, in a pull request of its own. **Alternatives considered** - Remove the job in the same pull request as the stages. That pull request is already large. - Rewrite the script for the `runner-artifacts` stages. Those stages have no dependency layer, so the property does not exist. `runner-image.yml` already builds them on a pull request. This is the first of three pull requests that move the application image onto the `runner-artifacts` stages. It has to merge first: the removed job runs on every `Dockerfile` change and builds stages that the second pull request deletes. The other two follow on top of it. ## What Changed - Delete `scripts/check-docker-runner-cache.sh`. - Remove the `runner` job and the `pull_request` trigger from `docker-runner-check.yml`. Only the manual jobs remain. The concurrency group no longer reads a pull request number. - Remove `Docker Runner check` from the workflow list of `pr-merge-review.yml`. That notifier acts only on pull-request runs, and the workflow has none now. - Remove the paragraph of `doc/DOCKER.md` that describes the check. ## Verification - `node --test .github/scripts/tests/notify-pr-merge-review.test.mjs`: 22 pass. - `vitest run server/src/__tests__/runner-image-workflow.test.ts`: pass (1 test is skipped on macOS, where bash is 3.2). - `vitest run --config tests/runner-e2e/vitest.config.ts tests/runner-e2e/workflow-security.test.ts tests/runner-e2e/workflow-target.test.ts`: 28 pass on macOS. These files read `docker-runner-check.yml`. - The same commands in a `node:24.22.3-bookworm` container: all pass, except one test of `workflow-target.test.ts`. It fails with `jq: command not found`. It reads another workflow, and the container has no `jq`. - Not run: the full test suite, and the workflows themselves. Only CI can run the workflows. ## Risks - Until the next pull request merges, a pull request that changes only the native inputs of the Runner (`packages/paperclip-runner/runner/**`, `protocol/**`, `rust-toolchain.toml`) does not build the `runner-build` stage of the application image. `runner-image.yml` builds the daemon from the same files in the `runner-artifacts` stages on such a pull request. `docker-app-check.yml` builds `runner-build` when the `Dockerfile` or `.dockerignore` changes. - No check proves the cargo-chef layer reuse after this change. The next pull request removes that layer. - The job was not a required check. > For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and discuss it in `#dev` before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See `CONTRIBUTING.md`. ## Model Used - Claude Fable 5.2 (`claude-fable-5-2`), from Anthropic, through Claude Code. The model used tools: it edited files, ran the tests and ran the Docker builds that this description reports. ## 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 - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
81 lines
4.1 KiB
YAML
81 lines
4.1 KiB
YAML
name: PR merge review notification
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- PR
|
|
- Runner Windows
|
|
- Sentry SDK contract
|
|
- Runner image
|
|
- commitperclip PR Review
|
|
- Storybook Visual
|
|
- Storybook Deploy
|
|
- CI work benchmark
|
|
- Incremental CI qualification
|
|
- Backup checkpoint qualification
|
|
- PR review API access
|
|
types: [completed]
|
|
# External check providers and legacy commit statuses can finish after CI.
|
|
# GitHub has no trigger-level filter for these events, so the job condition
|
|
# below skips them before a runner is allocated. GitHub Actions check runs
|
|
# are covered by the workflow_run list above.
|
|
check_run:
|
|
types: [completed]
|
|
status:
|
|
|
|
permissions:
|
|
actions: read
|
|
checks: read
|
|
contents: read
|
|
pull-requests: read
|
|
statuses: read
|
|
|
|
jobs:
|
|
notify:
|
|
# A skipped job does not take a runner. Only events that can complete a
|
|
# green PR state schedule the job: successful, skipped, or neutral PR
|
|
# workflow runs, the same results from non-Actions check providers (GitHub
|
|
# Actions app 15368 checks arrive through workflow_run), and successful
|
|
# commit statuses. One PR push previously queued about 60 runner jobs.
|
|
if: >-
|
|
github.repository == 'paperclipai/paperclip' &&
|
|
((github.event_name == 'workflow_run' &&
|
|
(github.event.workflow_run.event == 'pull_request' ||
|
|
github.event.workflow_run.event == 'pull_request_target') &&
|
|
contains(fromJSON('["success","skipped","neutral"]'), github.event.workflow_run.conclusion)) ||
|
|
(github.event_name == 'check_run' &&
|
|
github.event.check_run.app.id != 15368 &&
|
|
contains(fromJSON('["success","skipped","neutral"]'), github.event.check_run.conclusion)) ||
|
|
(github.event_name == 'status' && github.event.state == 'success'))
|
|
# Collapse bursts for one PR head to the latest event. The notifier reads
|
|
# the current PR state, so the newest event subsumes older ones. Job-level
|
|
# concurrency keeps skipped events from cancelling a scheduled notifier.
|
|
concurrency:
|
|
group: pr-merge-review-${{ github.event.workflow_run.head_sha || github.event.check_run.head_sha || github.event.sha }}
|
|
cancel-in-progress: true
|
|
# Community PR CI shares the GitHub-hosted queue. A CODEOWNER's own PR run
|
|
# is notified from the reserved AWS metadata fleet so it never waits there.
|
|
# This job runs only the master checkout below, never PR code. Check-run
|
|
# and status events carry no verifiable author and stay GitHub-hosted.
|
|
runs-on: ${{ vars.AWS_CI_SHORT_JOBS_ENABLED == 'true' && vars.AWS_CI_ENABLED == 'true' && vars.AWS_CI_ROUTING_USER_IDS_SOURCE != '' && vars.AWS_CI_TRUSTED_USER_IDS == vars.AWS_CI_ROUTING_USER_IDS_SOURCE && github.repository == 'paperclipai/paperclip' && github.repository_id == '1170821064' && github.event_name == 'workflow_run' && github.event.workflow_run.head_repository.id == 1170821064 && contains(vars.AWS_CI_ROUTING_USER_IDS, format('|{0}|', github.event.workflow_run.actor.id)) && contains(vars.AWS_CI_ROUTING_USER_IDS, format('|{0}|', github.event.workflow_run.triggering_actor.id)) && 'runs-on/fleet=paperclip-ci-routing-x64/env=public-ci' || 'ubuntu-latest' }}
|
|
timeout-minutes: 5
|
|
# Restrict this environment to master. Repository secrets would also be
|
|
# available to workflows changed by an in-repository PR.
|
|
environment: pr-merge-review
|
|
continue-on-error: true
|
|
steps:
|
|
# Only the trusted default-branch commit. Never use the PR SHA, caches,
|
|
# artifacts, dependencies, or executable files from a pull request.
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
ref: ${{ github.sha }}
|
|
persist-credentials: false
|
|
sparse-checkout: .github/scripts
|
|
- name: Notify the advisory review routine
|
|
continue-on-error: true
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
PAPERCLIP_PR_REVIEW_WEBHOOK_URL: ${{ secrets.PAPERCLIP_PR_REVIEW_WEBHOOK_URL }}
|
|
PAPERCLIP_PR_REVIEW_WEBHOOK_TOKEN: ${{ secrets.PAPERCLIP_PR_REVIEW_WEBHOOK_TOKEN }}
|
|
run: node .github/scripts/notify-pr-merge-review.mjs
|