From 1bfb8893758083208c8f46cf2394f24419f89299 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Sun, 3 May 2026 06:08:18 -0400 Subject: [PATCH 1/3] fix(ci): pre-install @adcp/client + bump readiness window for v3 storyboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v3 reference seller storyboard CI job was failing with "Upstream mock failed to start within 30s". Root cause: ``npx -y -p @adcp/client@latest`` runs a fresh npm install on every CI run (~50MB of deps + metadata build), eating most of the 30s readiness budget before the JS process even starts. Two changes: 1. Pre-install ``@adcp/client@latest`` in a separate step BEFORE the readiness loop. The npm cache (now enabled on actions/setup-node) makes subsequent runs fast. 2. Bump readiness from 30s (60×0.5s) to 60s (120×0.5s). Even with the pre-install, GHA-hosted runner cold starts can be variable. This unblocks the path to promoting the v3 ref seller storyboard job to required. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b500e912b..ce832e418 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -484,31 +484,45 @@ jobs: uses: actions/setup-node@v4 with: node-version: "22" + # Cache npm so subsequent runs don't refetch @adcp/client. + cache: "npm" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -e ".[dev,pg]" + - name: Pre-install @adcp/client (separate from boot) + # Pull the package + its deps into the npm cache up-front so the + # boot step doesn't have to do an install in its 60s readiness + # window. ``npx --yes`` fetches into the cache; the + # ``--package=...`` form leaves an installed copy that subsequent + # ``npx`` invocations resolve instantly. ``adcp --version`` is a + # cheap smoke that the binary is wired correctly. + run: | + npm install -g @adcp/client@latest + adcp --version + - name: Start JS mock-server upstream run: | - npx -y -p @adcp/client@latest \ - adcp mock-server sales-guaranteed --port 4503 --api-key test-key & + # Cached install above means this is a hot-start (~2-3s on + # GHA-hosted runners) — no npm install delay. + adcp mock-server sales-guaranteed --port 4503 --api-key test-key & MOCK_PID=$! echo "MOCK_PID=$MOCK_PID" >> "$GITHUB_ENV" # Health-check via /_debug/traffic — non-network-scoped and # no-auth, so it doesn't break when the JS mock's seed-data # renames or removes a specific network. The endpoint is # always present on the harness-side mock. - for i in $(seq 1 60); do + for i in $(seq 1 120); do HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 1 \ http://127.0.0.1:4503/_debug/traffic 2>/dev/null || echo "000") if [ "$HTTP_CODE" = "200" ]; then - echo "Upstream mock ready (HTTP 200, pid $MOCK_PID)" + echo "Upstream mock ready (HTTP 200, pid $MOCK_PID, $i polls)" break fi - if [ "$i" -eq 60 ]; then - echo "Upstream mock failed to start within 30s" + if [ "$i" -eq 120 ]; then + echo "Upstream mock failed to start within 60s" kill "$MOCK_PID" 2>/dev/null || true exit 1 fi From 3b597f573980df399bde84c8139f5ef492bf1339 Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Sun, 3 May 2026 06:13:40 -0400 Subject: [PATCH 2/3] fix(ci): drop npm cache (requires lockfile we don't ship) --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce832e418..2adcf1128 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -484,8 +484,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: "22" - # Cache npm so subsequent runs don't refetch @adcp/client. - cache: "npm" + # No cache: requires a package-lock.json which this Python + # repo doesn't ship. The pre-install step below uses + # ``npm install -g`` which is fast on the runner anyway + # (~3-5s with warm tarball mirrors). - name: Install dependencies run: | From 9557aea095a6885a93b003cca7a9bb2a99e8fcfe Mon Sep 17 00:00:00 2001 From: Brian O'Kelley Date: Sun, 3 May 2026 06:20:05 -0400 Subject: [PATCH 3/3] fix(ci): use @adcp/sdk@latest (renamed from @adcp/client) + capture mock-server log --- .github/workflows/ci.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2adcf1128..e8eaa4cd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -388,11 +388,11 @@ jobs: - name: Run storyboard suite timeout-minutes: 5 - # @adcp/client@latest is intentionally unpinned — this is AdCP's own CI + # @adcp/sdk@latest is intentionally unpinned — this is AdCP's own CI # running AdCP's own canonical runner. Tracking latest surfaces protocol # drift as soon as it ships, which is the point of this job. run: | - npx -y -p @adcp/client@latest adcp storyboard run \ + npx -y -p @adcp/sdk@latest adcp storyboard run \ http://127.0.0.1:3001/mcp media_buy_seller \ --json --allow-http \ > storyboard-result.json @@ -502,14 +502,17 @@ jobs: # ``npx`` invocations resolve instantly. ``adcp --version`` is a # cheap smoke that the binary is wired correctly. run: | - npm install -g @adcp/client@latest + npm install -g @adcp/sdk@latest adcp --version - name: Start JS mock-server upstream run: | # Cached install above means this is a hot-start (~2-3s on - # GHA-hosted runners) — no npm install delay. - adcp mock-server sales-guaranteed --port 4503 --api-key test-key & + # GHA-hosted runners) — no npm install delay. Tee output to + # /tmp/mock-server.log so failures surface their stack traces + # (otherwise the readiness loop just times out silently). + adcp mock-server sales-guaranteed --port 4503 --api-key test-key \ + > /tmp/mock-server.log 2>&1 & MOCK_PID=$! echo "MOCK_PID=$MOCK_PID" >> "$GITHUB_ENV" # Health-check via /_debug/traffic — non-network-scoped and @@ -525,6 +528,8 @@ jobs: fi if [ "$i" -eq 120 ]; then echo "Upstream mock failed to start within 60s" + echo "--- mock-server.log ---" + cat /tmp/mock-server.log || echo "(log unavailable)" kill "$MOCK_PID" 2>/dev/null || true exit 1 fi @@ -587,7 +592,7 @@ jobs: # /etc/hosts override so the buyer can reach acme.localhost # (the seeded tenant subdomain). echo "127.0.0.1 acme.localhost" | sudo tee -a /etc/hosts - npx -y -p @adcp/client@latest adcp storyboard run \ + npx -y -p @adcp/sdk@latest adcp storyboard run \ http://acme.localhost:3001/mcp media_buy_seller \ --json --allow-http \ > v3-storyboard-result.json || true