Skip to content

Commit 0c14df3

Browse files
committed
Merge remote-tracking branch 'origin/main' into claude/tool-call-audit-log
# Conflicts: # apps/cloud/drizzle/meta/0016_snapshot.json # apps/cloud/drizzle/meta/_journal.json
2 parents 1350345 + b5271a6 commit 0c14df3

38 files changed

Lines changed: 3600 additions & 557 deletions

.changeset/oauth-client-basic.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"executor": patch
3+
---
4+
5+
Allow manually registered OAuth apps to use HTTP Basic client authentication for token exchange and refresh.

.changeset/raw-oauth-basic.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@executor-js/sdk": patch
3+
---
4+
5+
Add a raw HTTP Basic compatibility mode for OAuth providers that reject form-encoded client credentials.

.github/workflows/graph-slices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions:
1919

2020
jobs:
2121
slices:
22-
runs-on: ubuntu-latest
22+
runs-on: blacksmith-4vcpu-ubuntu-2404
2323
timeout-minutes: 20
2424
steps:
2525
- uses: actions/checkout@v4

.github/workflows/pkg-pr-new.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
include:
3737
- runner: blacksmith-4vcpu-ubuntu-2404
3838
target: executor-linux-x64
39-
- runner: macos-14
39+
- runner: blacksmith-6vcpu-macos-latest
4040
target: executor-darwin-arm64
4141
runs-on: ${{ matrix.runner }}
4242
steps:

.github/workflows/publish-desktop.yml

Lines changed: 79 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ on:
1313
description: Git tag to publish (e.g. v1.4.1)
1414
required: true
1515
type: string
16+
dry_run:
17+
description: Build all distributables but do not touch the GitHub release
18+
required: false
19+
default: false
20+
type: boolean
21+
executor_run_id:
22+
description: >-
23+
Publish Executor run id for this tag. Set by the automatic trigger;
24+
the promote gate waits for exactly this run. Leave empty for manual
25+
dispatches.
26+
required: false
27+
default: ""
28+
type: string
1629

1730
permissions:
1831
contents: read
@@ -44,22 +57,22 @@ jobs:
4457
# smoke: run the compiled-sidecar smoke test on legs whose target
4558
# matches the runner (the mac x64 leg cross-compiles on an arm64
4659
# runner, so its binary can't be executed natively there).
47-
- os: macos-latest
60+
- os: blacksmith-6vcpu-macos-latest
4861
arch: arm64
4962
platform: mac
5063
bun-target: bun-darwin-arm64
5164
smoke: true
52-
- os: macos-latest
65+
- os: blacksmith-6vcpu-macos-latest
5366
arch: x64
5467
platform: mac
5568
bun-target: bun-darwin-x64
5669
smoke: false
57-
- os: ubuntu-latest
70+
- os: blacksmith-4vcpu-ubuntu-2404
5871
arch: x64
5972
platform: linux
6073
bun-target: bun-linux-x64
6174
smoke: true
62-
- os: windows-latest
75+
- os: blacksmith-8vcpu-windows-2025
6376
arch: x64
6477
platform: win
6578
bun-target: bun-windows-x64
@@ -103,6 +116,11 @@ jobs:
103116
with:
104117
node-version: 24
105118

119+
# No package/electron caches here on purpose: on Blacksmith's NVMe
120+
# runners a cold `bun install` (8-55s) is as fast as a cache
121+
# restore + warm install, and bun.lock changes on every release
122+
# (Version Packages), so each publish would pay the cache-save tail
123+
# (~45s on the mac critical path) for nothing.
106124
- name: Install dependencies
107125
run: bun install --frozen-lockfile
108126

@@ -215,9 +233,14 @@ jobs:
215233

216234
release:
217235
needs: build
236+
# dry_run builds and uploads workflow artifacts but never touches the
237+
# GitHub release — used to rehearse workflow changes against a real tag.
238+
if: ${{ !inputs.dry_run }}
218239
runs-on: blacksmith-4vcpu-ubuntu-2404
219240
permissions:
220241
contents: write
242+
# Read Publish Executor run state for the promote gate below.
243+
actions: read
221244

222245
steps:
223246
- name: Checkout validation script
@@ -255,14 +278,61 @@ jobs:
255278
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
256279
run: |
257280
set -euo pipefail
258-
while IFS= read -r file; do
259-
echo "Uploading: $file"
260-
gh release upload "$RELEASE_TAG" "$file" --repo "$GITHUB_REPOSITORY" --clobber
261-
done < <(find artifacts -type f \
281+
# Parallel uploads; xargs exits non-zero if any single upload fails,
282+
# which keeps the promote step below from running on a partial set.
283+
find artifacts -type f \
262284
\( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" \
263285
-o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" \
264286
-o -name "*.blockmap" \
265-
-o -name "latest*.yml" \))
287+
-o -name "latest*.yml" \) -print0 \
288+
| xargs -0 -n1 -P8 -I{} sh -c \
289+
'echo "Uploading: $1"; exec gh release upload "$RELEASE_TAG" "$1" --repo "$GITHUB_REPOSITORY" --clobber' _ {}
290+
291+
# A published release must imply the npm packages for this tag exist.
292+
# Publish Executor triggers this workflow before its npm publishes (to
293+
# overlap them with the desktop build) and hands over its own run id,
294+
# so wait for exactly that run to conclude successfully before going
295+
# public. A run-name search would fail open whenever the run fell
296+
# outside the listing window, so only an explicitly empty run id (a
297+
# manual dispatch) skips the gate — the operator owns the invariant
298+
# then.
299+
- name: Wait for executor package publish
300+
env:
301+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
302+
EXECUTOR_RUN_ID: ${{ inputs.executor_run_id }}
303+
run: |
304+
set -euo pipefail
305+
if [ -z "$EXECUTOR_RUN_ID" ]; then
306+
echo "No executor_run_id given (manual dispatch); skipping the publish gate."
307+
exit 0
308+
fi
309+
deadline=$((SECONDS + 1200))
310+
while :; do
311+
run=$(gh run view "$EXECUTOR_RUN_ID" --repo "$GITHUB_REPOSITORY" \
312+
--json status,conclusion,url,displayTitle)
313+
title=$(echo "$run" | jq -r .displayTitle)
314+
if [ "$title" != "publish executor $RELEASE_TAG" ]; then
315+
echo "Run $EXECUTOR_RUN_ID is '$title', not 'publish executor $RELEASE_TAG' — refusing to promote."
316+
exit 1
317+
fi
318+
status=$(echo "$run" | jq -r .status)
319+
if [ "$status" = "completed" ]; then
320+
conclusion=$(echo "$run" | jq -r .conclusion)
321+
if [ "$conclusion" = "success" ]; then
322+
echo "Publish Executor succeeded."
323+
break
324+
fi
325+
echo "Publish Executor concluded '$conclusion' — leaving the release in draft."
326+
echo "$run" | jq -r .url
327+
exit 1
328+
fi
329+
if [ "$SECONDS" -ge "$deadline" ]; then
330+
echo "Timed out waiting for Publish Executor — leaving the release in draft."
331+
exit 1
332+
fi
333+
echo "Publish Executor status: $status; waiting..."
334+
sleep 15
335+
done
266336
267337
# Flip draft → published only after every desktop asset is uploaded —
268338
# this is the atomic point where the new tag becomes "latest".

.github/workflows/publish-executor-package.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,34 @@ jobs:
8383
- name: Run release checks
8484
run: bun run release:check
8585

86-
- name: Publish package and create release
86+
# --skip-build reuses the artifacts release:check's dry-run just built
87+
# in this same tree (validated against the release version) instead of
88+
# rebuilding everything a second time.
89+
- name: Stage release artifacts and draft GitHub release
8790
env:
8891
GH_TOKEN: ${{ github.token }}
8992
run: |
9093
export GITHUB_REF_TYPE=tag
9194
export GITHUB_REF_NAME="$RELEASE_TAG"
9295
export GITHUB_REF="refs/tags/$RELEASE_TAG"
93-
bun run release:publish
96+
bun run --cwd apps/cli src/release.ts --stage-only --skip-build
9497
98+
# Desktop needs only the tag and the draft release staged above — it
99+
# compiles its own sidecar from the tag's source. Triggering it before
100+
# the npm publishes overlaps its build with them; its release job waits
101+
# for THIS run (by the id passed here) to succeed before promoting the
102+
# release, so a failed npm publish still leaves the release in draft.
95103
- name: Trigger desktop build
96104
env:
97105
GH_TOKEN: ${{ github.token }}
98-
run: gh workflow run publish-desktop.yml -f tag="$RELEASE_TAG"
106+
run: gh workflow run publish-desktop.yml -f tag="$RELEASE_TAG" -f executor_run_id="$GITHUB_RUN_ID"
107+
108+
- name: Publish executor to npm
109+
run: |
110+
export GITHUB_REF_TYPE=tag
111+
export GITHUB_REF_NAME="$RELEASE_TAG"
112+
export GITHUB_REF="refs/tags/$RELEASE_TAG"
113+
bun run --cwd apps/cli src/release.ts --publish-only
99114
100115
- name: Trigger self-host Docker publish
101116
env:

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
# triggers publish-executor-package.yml. A second workflow_dispatch path
148148
# races a duplicate publish for the same release.
149149

150-
# Desktop build downloads CLI binaries from the release, so it must
151-
# run after CLI publish completes. Trigger it from the CLI workflow
152-
# or manually via: gh workflow run publish-desktop.yml -f tag=vX.Y.Z
150+
# Desktop compiles its own sidecar from the tag's source; it needs only
151+
# the tag and the staged draft release, so publish-executor-package.yml
152+
# triggers it as soon as those exist. Manual repair:
153+
# gh workflow run publish-desktop.yml -f tag=vX.Y.Z

0 commit comments

Comments
 (0)