mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-05 23:06:17 +01:00
Merge commit 'd16c06308d6e4eaad91f251b4de258f17ec23784' into codex/private-dot-15b-source-union
* commit 'd16c06308d6e4eaad91f251b4de258f17ec23784': perf(release): number canaries by master position and confirm them outside the release lock (#21917) fix(wake-queue): keep the child-completion reason when a person's comment merges into its held wake (#21918) fix(dispatch): start work on a task tree a person created in the person tier (#21916) fix(heartbeat): keep saved sessions across config edits the provider thread cannot see (#21862) fix(wake-queue): reopen a finished task for a person's comment merged into a system wake (#21914) fix(runner-e2e): keep the supervisor off the heartbeat graph and ship the plugin SDK build (#21860)
This commit is contained in:
commit
d900d37bce
42 files changed
+1896
-234
No files matched your search
@@ -0,0 +1,151 @@
|
||||
name: Canary finalize
|
||||
run-name: Canary finalize ${{ inputs.version }}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Canary version that publish_canary published
|
||||
required: true
|
||||
type: string
|
||||
source_sha:
|
||||
description: Full source commit SHA of that canary
|
||||
required: true
|
||||
type: string
|
||||
release_run_id:
|
||||
description: Release workflow run that published it
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: canary-finalize-${{ inputs.version }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
NPM_PUBLISH_VERIFY_ATTEMPTS: "180"
|
||||
NPM_PUBLISH_VERIFY_DELAY_SECONDS: "10"
|
||||
|
||||
jobs:
|
||||
confirm_canary:
|
||||
name: Confirm canary on npm and tag it
|
||||
if: github.repository == 'paperclipai/paperclip' && github.repository_id == '1170821064' && github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
outputs:
|
||||
version: ${{ steps.inputs.outputs.version }}
|
||||
source_sha: ${{ steps.inputs.outputs.source_sha }}
|
||||
release_run_id: ${{ steps.inputs.outputs.release_run_id }}
|
||||
steps:
|
||||
- name: Validate inputs
|
||||
id: inputs
|
||||
env:
|
||||
VERSION: ${{ inputs.version }}
|
||||
SOURCE_SHA: ${{ inputs.source_sha }}
|
||||
RELEASE_RUN_ID: ${{ inputs.release_run_id }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-canary\.[0-9]+$ ]] || { echo "Error: not a canary version" >&2; exit 1; }
|
||||
[[ "$SOURCE_SHA" =~ ^[0-9a-f]{40}$ ]] || { echo "Error: not a full commit SHA" >&2; exit 1; }
|
||||
[[ "$RELEASE_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { echo "Error: not a run id" >&2; exit 1; }
|
||||
{
|
||||
echo "version=$VERSION"
|
||||
echo "source_sha=$SOURCE_SHA"
|
||||
echo "release_run_id=$RELEASE_RUN_ID"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
ref: ${{ steps.inputs.outputs.source_sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Configure git author
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Confirm the canary and push its tag
|
||||
env:
|
||||
VERSION: ${{ steps.inputs.outputs.version }}
|
||||
SOURCE_SHA: ${{ steps.inputs.outputs.source_sha }}
|
||||
PUBLISH_REMOTE: origin
|
||||
run: ./scripts/confirm-canary-publication.sh "$VERSION" "$SOURCE_SHA"
|
||||
|
||||
- name: Build Docker images for the canary tag
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ steps.inputs.outputs.version }}
|
||||
RELEASE_RUN_ID: ${{ steps.inputs.outputs.release_run_id }}
|
||||
run: |
|
||||
{
|
||||
echo "## Canary published"
|
||||
echo ""
|
||||
echo "- Published canary: \`$VERSION\` ([release run](https://github.com/$GITHUB_REPOSITORY/actions/runs/$RELEASE_RUN_ID))"
|
||||
echo "- Docker build dispatched at \`canary/v$VERSION\`"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
gh workflow run docker.yml --ref "refs/tags/canary/v$VERSION" --repo "$GITHUB_REPOSITORY"
|
||||
|
||||
smoke_canary_onboarding:
|
||||
needs: confirm_canary
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
env:
|
||||
PAPERCLIPAI_VERSION: ${{ needs.confirm_canary.outputs.version }}
|
||||
PAPERCLIP_PLAYWRIGHT_CHANNEL: chrome
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
ref: ${{ needs.confirm_canary.outputs.source_sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
|
||||
with:
|
||||
version: 9.15.4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
- name: Restore canary smoke lockfile
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
with:
|
||||
name: canary-smoke-lockfile-${{ needs.confirm_canary.outputs.source_sha }}
|
||||
run-id: ${{ needs.confirm_canary.outputs.release_run_id }}
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- name: Install test dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Show browser version
|
||||
run: google-chrome --version
|
||||
|
||||
- name: Smoke exact published canary through onboarding
|
||||
env:
|
||||
PAPERCLIP_CANARY_SMOKE_SERVER_LOG: ${{ runner.temp }}/canary-onboarding-server.log
|
||||
run: pnpm run test:canary-onboarding-smoke
|
||||
|
||||
- name: Upload failed canary onboarding diagnostics
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: canary-onboarding-smoke-${{ needs.confirm_canary.outputs.version }}
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
path: |
|
||||
${{ runner.temp }}/canary-onboarding-server.log
|
||||
tests/canary-onboarding/playwright-report/
|
||||
tests/canary-onboarding/test-results/
|
||||
@@ -9,8 +9,8 @@ on:
|
||||
- "nightly/v*"
|
||||
- "beta/v*"
|
||||
# Release workflows push lane tags with GITHUB_TOKEN, and GitHub suppresses
|
||||
# push-triggered runs for those, so release.yml dispatches this workflow at
|
||||
# the new tag ref instead. The tag mapping below keys off github.ref either
|
||||
# push-triggered runs for those, so release.yml (canary-finalize.yml for a
|
||||
# canary) dispatches this workflow at the new tag ref instead. The tag mapping below keys off github.ref either
|
||||
# way.
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
@@ -249,7 +249,10 @@ jobs:
|
||||
run: node "$CI_NODE_TEST" ./scripts/__tests__/e2e-shard.test.mjs
|
||||
|
||||
- name: Test release verify workflow wiring
|
||||
run: node "$CI_NODE_TEST" ./scripts/__tests__/release-verify-workflow.test.mjs ./scripts/__tests__/eval-schedule-monitor.test.mjs ./scripts/__tests__/prepare-runner-release-image.test.mjs ./scripts/cloud-source-verification.test.mjs ./scripts/cloud-readiness-runner-loss.test.mjs ./scripts/standard-image-contract.test.mjs ./scripts/reuse-canary-image.test.mjs
|
||||
run: |
|
||||
tests=(./scripts/__tests__/release-verify-workflow.test.mjs ./scripts/__tests__/eval-schedule-monitor.test.mjs ./scripts/__tests__/prepare-runner-release-image.test.mjs ./scripts/cloud-source-verification.test.mjs ./scripts/cloud-readiness-runner-loss.test.mjs ./scripts/standard-image-contract.test.mjs ./scripts/reuse-canary-image.test.mjs)
|
||||
if [[ -f ./scripts/verify-canary-provenance.test.mjs ]]; then tests+=(./scripts/verify-canary-provenance.test.mjs); fi
|
||||
node "$CI_NODE_TEST" "${tests[@]}"
|
||||
|
||||
- name: Test merge-queue workflow wiring
|
||||
# This workflow loads from master and tests the caller's checkout. A
|
||||
|
||||
@@ -396,9 +396,9 @@ jobs:
|
||||
outputs:
|
||||
canary_version: ${{ steps.canary_tag.outputs.version }}
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
id-token: write
|
||||
# For the explicit docker.yml dispatch below.
|
||||
# For the canary-finalize.yml dispatch below.
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
@@ -488,7 +488,8 @@ jobs:
|
||||
- name: Publish canary
|
||||
env:
|
||||
GITHUB_ACTIONS: "true"
|
||||
run: ./scripts/release.sh canary --skip-verify
|
||||
PAPERCLIP_RELEASE_VERSION_FILE: ${{ runner.temp }}/canary-version
|
||||
run: ./scripts/release.sh canary --skip-verify --defer-registry-confirmation
|
||||
|
||||
- name: Dump npm debug logs
|
||||
if: failure()
|
||||
@@ -500,100 +501,25 @@ jobs:
|
||||
-e 's#((authorization|_authToken|_auth|node_auth_token|npm_token)"?[[:space:]]*[:=][[:space:]]*"?)(Bearer[[:space:]]+)?[^",[:space:]]+#\1***REDACTED***#Ig'
|
||||
done
|
||||
|
||||
- name: Push canary tag
|
||||
- name: Hand off npm confirmation, the tag and the image to canary-finalize
|
||||
id: canary_tag
|
||||
run: |
|
||||
tag="$(git tag --points-at HEAD | grep '^canary/v' | head -1)"
|
||||
if [ -z "$tag" ]; then
|
||||
echo "Error: no canary tag points at HEAD after release." >&2
|
||||
exit 1
|
||||
fi
|
||||
git push origin "refs/tags/${tag}"
|
||||
echo "version=${tag#canary/v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Canary images previously relied on the master-push docker.yml run,
|
||||
# whose single pending concurrency slot gets superseded by every
|
||||
# newer push — on a busy day no canary image publishes at all (five
|
||||
# consecutive canaries shipped npm packages with no cloud image on
|
||||
# 2026-09-06, starving downstream managed deploys for ~18 hours).
|
||||
# Tag pushes made with GITHUB_TOKEN do not fire docker.yml's
|
||||
# triggers, so dispatch the image build at the canary tag
|
||||
# explicitly, exactly like the nightly and beta lanes: the run keys
|
||||
# its concurrency off the tag ref, so no master push can supersede
|
||||
# it, and docker.yml's `type=sha` mapping publishes the
|
||||
# standard sha-<short> images either way.
|
||||
- name: Build Docker images for the canary tag
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION_FILE: ${{ runner.temp }}/canary-version
|
||||
SOURCE_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version="$(cat "$VERSION_FILE")"
|
||||
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+-canary\.[0-9]+$ ]] || { echo "Error: release.sh wrote no canary version" >&2; exit 1; }
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
gh workflow run canary-finalize.yml --ref master --repo "$GITHUB_REPOSITORY" \
|
||||
-f version="$version" -f source_sha="$SOURCE_SHA" -f release_run_id="$GITHUB_RUN_ID"
|
||||
{
|
||||
echo "## Canary published"
|
||||
echo "## Canary published to npm"
|
||||
echo ""
|
||||
echo "- Published canary: \`${{ steps.canary_tag.outputs.version }}\`"
|
||||
echo "- Docker build dispatched at \`canary/v${{ steps.canary_tag.outputs.version }}\`"
|
||||
echo "- Version: \`$version\`"
|
||||
echo "- npm confirmation, \`canary/v$version\`, the Docker build and the onboarding smoke run in Canary finalize."
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
gh workflow run docker.yml --ref "refs/tags/canary/v${{ steps.canary_tag.outputs.version }}" --repo "$GITHUB_REPOSITORY"
|
||||
|
||||
# The package is already public when this gate runs. A red result leaves the
|
||||
# immutable canary in npm, but makes the release workflow visibly fail before
|
||||
# anyone mistakes an installable package for an onboardable one.
|
||||
smoke_canary_onboarding:
|
||||
needs: publish_canary
|
||||
if: ${{ !cancelled() && needs.publish_canary.result == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
PAPERCLIPAI_VERSION: ${{ needs.publish_canary.outputs.canary_version }}
|
||||
PAPERCLIP_PLAYWRIGHT_CHANNEL: chrome
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6
|
||||
with:
|
||||
version: 9.15.4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
# Default download scope is this workflow run, including job reruns.
|
||||
# A missing artifact fails instead of resolving a different dependency set.
|
||||
- name: Restore canary smoke lockfile
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
with:
|
||||
name: canary-smoke-lockfile-${{ github.sha }}
|
||||
|
||||
- name: Install test dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Show browser version
|
||||
run: google-chrome --version
|
||||
|
||||
- name: Smoke exact published canary through onboarding
|
||||
env:
|
||||
PAPERCLIP_CANARY_SMOKE_SERVER_LOG: ${{ runner.temp }}/canary-onboarding-server.log
|
||||
run: pnpm run test:canary-onboarding-smoke
|
||||
|
||||
- name: Upload failed canary onboarding diagnostics
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
||||
with:
|
||||
name: canary-onboarding-smoke-${{ needs.publish_canary.outputs.canary_version }}
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
path: |
|
||||
${{ runner.temp }}/canary-onboarding-server.log
|
||||
tests/canary-onboarding/playwright-report/
|
||||
tests/canary-onboarding/test-results/
|
||||
|
||||
# ----- Nightly lane -----------------------------------------------------
|
||||
# Once a night (or on a forced nightly dispatch), promote the newest master
|
||||
|
||||
@@ -797,6 +797,16 @@ jobs:
|
||||
if [ "$NEEDS_NATIVE_BINARIES" = true ]; then
|
||||
pnpm --filter @paperclipai/paperclip-runner build:runner-binaries
|
||||
fi
|
||||
# The source server imports the plugin SDK from its generated dist.
|
||||
# Build it once here, with the same certified helper the cell uses,
|
||||
# instead of in every paid cell.
|
||||
node scripts/ensure-plugin-build-deps.mjs
|
||||
for entry in packages/shared/dist/index.js packages/plugins/sdk/dist/index.js; do
|
||||
if [ ! -f "$entry" ] || [ ! -f "$(dirname "$entry")/.paperclip-build-complete" ]; then
|
||||
echo "::error::Workspace build output $entry is missing; paid cells would fail before any test runs."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Package immutable campaign outputs
|
||||
env:
|
||||
@@ -814,6 +824,8 @@ jobs:
|
||||
)
|
||||
archive_paths=(
|
||||
packages/paperclip-eval-kernel/dist
|
||||
packages/shared/dist
|
||||
packages/plugins/sdk/dist
|
||||
)
|
||||
if [ "$NEEDS_RUNNER_TYPESCRIPT" = true ]; then
|
||||
test -d packages/paperclip-runner/dist
|
||||
@@ -1235,6 +1247,12 @@ jobs:
|
||||
--file runner-e2e-build/runner-e2e-build-bundle.tar.gz \
|
||||
--directory "$GITHUB_WORKSPACE"
|
||||
test -d packages/paperclip-eval-kernel/dist
|
||||
for entry in packages/shared/dist/index.js packages/plugins/sdk/dist/index.js; do
|
||||
if [ ! -f "$entry" ]; then
|
||||
echo "::error::Campaign outputs lack $entry; the source server cannot start without it."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [ "$NEEDS_RUNNER_TYPESCRIPT" = true ]; then
|
||||
test -d packages/paperclip-runner/dist
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user