From b8af45ee66a05463bac2459ade65b878ba7d10f6 Mon Sep 17 00:00:00 2001 From: Miya Date: Sat, 23 May 2026 10:25:38 +0200 Subject: [PATCH 1/2] fix(ci): fail clearly when publish artifacts are missing --- .github/workflows/publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9659ef7..0fe422f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -297,6 +297,17 @@ jobs: set -euo pipefail mkdir -p /tmp/publish-artifacts for pkg in $(echo '${{ needs.resolve-packages.outputs.matrix }}' | jq -r '.[]'); do + if [ ! -f "packages/$pkg/package.json" ]; then + echo "ERROR: packages/$pkg/package.json is missing" >&2 + exit 1 + fi + + if [ ! -d "packages/$pkg/dist" ]; then + echo "ERROR: packages/$pkg/dist is missing after build. The publish matrix includes a package that did not produce build artifacts." >&2 + echo "Package: $pkg" >&2 + exit 1 + fi + cp -R "packages/$pkg/dist" "/tmp/publish-artifacts/dist-$pkg" cp "packages/$pkg/package.json" "/tmp/publish-artifacts/manifest-$pkg.json" done From 937e0a54334563653599d1aebc1b9a85894a193e Mon Sep 17 00:00:00 2001 From: Miya Date: Sat, 23 May 2026 10:28:53 +0200 Subject: [PATCH 2/2] fix(ci): validate publish matrix against repo and build order --- .github/workflows/publish.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0fe422f..2eded3f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -135,6 +135,17 @@ jobs: echo "Publishing Agent Assistant package group: ${{ github.event.inputs.package_group }}" echo "Packages: ${{ needs.resolve-packages.outputs.package_list }}" + - name: Validate publish matrix packages exist + shell: bash + run: | + set -euo pipefail + for pkg in $(echo '${{ needs.resolve-packages.outputs.matrix }}' | jq -r '.[]'); do + if [ ! -f "packages/$pkg/package.json" ]; then + echo "ERROR: publish matrix references missing package directory packages/$pkg" >&2 + exit 1 + fi + done + # Tests import from @agent-assistant/* siblings whose package.json # exports point at dist/. dist/ is not committed, so every dep that # any test in the matrix imports must be built before vitest runs. @@ -186,6 +197,12 @@ jobs: # Topological build order. dist/ is no longer committed, so each # package's tsc needs its workspace deps' dist on disk first. ORDER=(traits persona dispatch connectivity memory vfs core coordination surfaces sessions policy harness turn-context proactive inbox continuation telemetry specialists sdk webhook-runtime cloudflare-runtime) + for pkg in $(echo '${{ needs.resolve-packages.outputs.matrix }}' | jq -r '.[]'); do + if ! printf '%s\n' "${ORDER[@]}" | grep -qx "$pkg"; then + echo "ERROR: package '$pkg' is in publish matrix but missing from dependency-aware build order" >&2 + exit 1 + fi + done for pkg in "${ORDER[@]}"; do if echo '${{ needs.resolve-packages.outputs.matrix }}' | jq -e --arg pkg "$pkg" '.[] | select(. == $pkg)' >/dev/null; then echo "==> Building $pkg"