Skip to content

Commit e389db1

Browse files
authored
ci(adcp-sdk): pin @adcp/sdk to 7.9.0 (last known-green), salt cache key (closes #779 Track B) (#784)
* ci(adcp-sdk): pin @adcp/sdk to 7.10.1, salt cache key with version @adcp/sdk@latest was floating, and the npm cache key ``${{ runner.os }}-npm-adcp-sdk`` was OS-only — so a runner that cached an older release served stale SDK to every subsequent CI run on that runner, while a fresh runner pulled the current @latest. Same commit flipped red/green depending on which runner picked it up (see 2026-05-21 storyboard incident, adcp#4907). - ADCP_SDK_VERSION env var pinned at workflow header (7.10.1). - All 4 ``npm install -g @adcp/sdk@latest`` sites use the pin. - All 4 cache keys salted with ${{ env.ADCP_SDK_VERSION }} so a bump invalidates deterministically. - Stale comments rationalizing @latest removed. Bumping the SDK version now happens via PR — silent-upgrade footgun closed. Tracks adcp-client-python#779 Track B and adcp#4907 Phase 1. * ci: retrigger CI on 7.9.0 pin (force-push didn't fire pull_request) * ci: drop duplicated fixture-vendoring block (review fix on #784)
1 parent 35f581d commit e389db1

1 file changed

Lines changed: 20 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
pull_request:
77
branches: [main]
88

9+
# Pinned @adcp/sdk version. Bump deliberately; cache invalidates when this moves.
10+
# Background: adcontextprotocol/adcp-client-python#779 (Track B), adcontextprotocol/adcp#4907.
11+
env:
12+
ADCP_SDK_VERSION: "7.9.0"
13+
914
concurrency:
1015
group: ci-${{ github.ref }}
1116
cancel-in-progress: true
@@ -369,28 +374,23 @@ jobs:
369374

370375
# Cache the npm tarball + extracted package directory so the
371376
# storyboard runner install isn't a cold network fetch every run.
372-
# Key by OS only (not by version) so the cache survives across
373-
# ``@adcp/sdk`` releases — npm install reuses tarballs that are
374-
# already in the cache and only fetches the delta. ``@latest`` is
375-
# intentional for drift detection (see "Run storyboard suite"
376-
# below); the cache amortizes the 5-15 s of fetch+extract that
377-
# would otherwise repeat on every CI run.
377+
# Cache key is salted with the pinned ``@adcp/sdk`` version so
378+
# bumping ADCP_SDK_VERSION invalidates the cache deterministically.
378379
- name: Cache ~/.npm
379380
uses: actions/cache@v4
380381
with:
381382
path: ~/.npm
382-
key: ${{ runner.os }}-npm-adcp-sdk
383+
key: ${{ runner.os }}-npm-adcp-sdk-${{ env.ADCP_SDK_VERSION }}
383384
restore-keys: |
384385
${{ runner.os }}-npm-
385386
386387
- name: Pre-install @adcp/sdk (once, then call binary directly)
387388
# Single install step at the top of the job; subsequent runner
388389
# calls invoke the already-installed binary instead of paying
389390
# the ``npx -y -p ...`` per-invocation extract+link tax.
390-
# ``@adcp/sdk@latest`` is intentionally unpinned: this is AdCP's
391-
# own CI running AdCP's own canonical runner — tracking latest
392-
# surfaces protocol drift as soon as it ships, which is the
393-
# point of this job.
391+
# Pinned to ADCP_SDK_VERSION (see workflow header) — bump via PR
392+
# so reference-impl breakage from a new SDK release shows up as
393+
# a labelled change set, not silent CI flake.
394394
#
395395
# Vendor missing fixtures into the SDK install:
396396
# ``@adcp/sdk`` does not ship two fixtures its storyboard runner
@@ -403,7 +403,7 @@ jobs:
403403
# into the SDK's expected locations post-install; idempotent if
404404
# upstream later ships them in the npm tarball.
405405
run: |
406-
npm install -g @adcp/sdk@latest
406+
npm install -g @adcp/sdk@${ADCP_SDK_VERSION}
407407
adcp --version
408408
SDK_ROOT="$(npm root -g)/@adcp/sdk"
409409
mkdir -p "${SDK_ROOT}/test/lib/v2-projection-fixtures"
@@ -541,15 +541,13 @@ jobs:
541541
with:
542542
node-version: "22"
543543

544-
# Cache ~/.npm by OS only so subsequent runs hit the tarball
545-
# cache; npm install reuses what's there and only fetches the
546-
# delta on a new ``@latest`` release. See the storyboard job
547-
# above for the same pattern + rationale.
544+
# Same cache pattern as the storyboard job: keyed by
545+
# ADCP_SDK_VERSION so a bump invalidates deterministically.
548546
- name: Cache ~/.npm
549547
uses: actions/cache@v4
550548
with:
551549
path: ~/.npm
552-
key: ${{ runner.os }}-npm-adcp-sdk
550+
key: ${{ runner.os }}-npm-adcp-sdk-${{ env.ADCP_SDK_VERSION }}
553551
restore-keys: |
554552
${{ runner.os }}-npm-
555553
@@ -567,7 +565,7 @@ jobs:
567565
# See the comment on the storyboard job's install step for the
568566
# AAO reference-formats fixture rationale (upstream adcp#3307).
569567
run: |
570-
npm install -g @adcp/sdk@latest
568+
npm install -g @adcp/sdk@${ADCP_SDK_VERSION}
571569
adcp --version
572570
SDK_ROOT="$(npm root -g)/@adcp/sdk"
573571
mkdir -p "${SDK_ROOT}/test/lib/v2-projection-fixtures"
@@ -775,15 +773,15 @@ jobs:
775773
uses: actions/cache@v4
776774
with:
777775
path: ~/.npm
778-
key: ${{ runner.os }}-npm-adcp-sdk
776+
key: ${{ runner.os }}-npm-adcp-sdk-${{ env.ADCP_SDK_VERSION }}
779777
restore-keys: |
780778
${{ runner.os }}-npm-
781779
782780
- name: Pre-install @adcp/sdk
783781
# See the comment on the storyboard job's install step for the
784782
# AAO reference-formats fixture rationale (upstream adcp#3307).
785783
run: |
786-
npm install -g @adcp/sdk@latest
784+
npm install -g @adcp/sdk@${ADCP_SDK_VERSION}
787785
adcp --version
788786
SDK_ROOT="$(npm root -g)/@adcp/sdk"
789787
mkdir -p "${SDK_ROOT}/test/lib/v2-projection-fixtures"
@@ -883,15 +881,15 @@ jobs:
883881
uses: actions/cache@v4
884882
with:
885883
path: ~/.npm
886-
key: ${{ runner.os }}-npm-adcp-sdk
884+
key: ${{ runner.os }}-npm-adcp-sdk-${{ env.ADCP_SDK_VERSION }}
887885
restore-keys: |
888886
${{ runner.os }}-npm-
889887
890888
- name: Pre-install @adcp/sdk
891889
# See the comment on the storyboard job's install step for the
892890
# AAO reference-formats fixture rationale (upstream adcp#3307).
893891
run: |
894-
npm install -g @adcp/sdk@latest
892+
npm install -g @adcp/sdk@${ADCP_SDK_VERSION}
895893
adcp --version
896894
SDK_ROOT="$(npm root -g)/@adcp/sdk"
897895
mkdir -p "${SDK_ROOT}/test/lib/v2-projection-fixtures"

0 commit comments

Comments
 (0)