fix(ci): preserve optional platform brokers in lockfile
Summary
- declare the existing @agent-relay/harness-driver 17.2.1 test/dev peer explicitly at the root
- regenerate package-lock.json with the release resolver, Node 22.14.0 plus npm 11.19.1
- keep all five 17.2.1 platform brokers optional so Linux npm 10 does not attempt Darwin installation
This is intentionally a two-file manifest/lock repair. It does not change workflows, gates, package versions, or dependency versions. It unblocks the Linux install failure affecting core-bridge PR #2133. No changelog entry: this corrects internal installation metadata without a user-visible Relay behavior change.
Root cause
The v18.0.0 release fresh resolution selected @agent-relay/harness-driver 17.2.1 for the optional @relayflows/sdk peer through the existing override, but npm 11 wrote that peer and its platform brokers as extraneous. npm 10.9.2 therefore treated every broker as mandatory and failed on Linux when it reached broker-darwin-arm64. Making the already-selected dev peer explicit gives npm 11 the dependency edge it needs; the regenerated lock records the harness as devOptional and each broker as optional.
Exact base failure
$ git rev-parse HEAD
1db553041261a60283d06d0b9e72298e9ab47ca4
$ mise exec node@22.14.0 -- node --version
v22.14.0
$ mise exec node@22.14.0 -- npm --version
10.9.2
$ mise exec node@22.14.0 -- npm ci --ignore-scripts --no-audit --no-fund
npm error code EBADPLATFORM
npm error notsup Unsupported platform for @agent-relay/broker-darwin-arm64@17.2.1: wanted {"os":"darwin","cpu":"arm64"} (current: {"os":"linux","cpu":"x64"})
npm error notsup Valid os: darwin
npm error notsup Actual os: linux
npm error notsup Valid cpu: arm64
npm error notsup Actual cpu: x64
# exit 1
Exact repaired-head verification
$ git rev-parse HEAD
475940ce5a1f239ebe2cca21f40d7132b9e836a9
$ mise exec node@22.14.0 -- node --version
v22.14.0
$ mise exec node@22.14.0 -- npm --version
10.9.2
$ mise exec node@22.14.0 -- npm ci --ignore-scripts --no-audit --no-fund
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: posthog-node@5.64.0,
npm warn EBADENGINE required: { node: ^20.20.0 || >=22.22.0 },
npm warn EBADENGINE current: { node: v22.14.0, npm: 10.9.2 }
npm warn EBADENGINE }
npm warn deprecated whatwg-encoding@3.1.1: Use @exodus/bytes instead for a more spec-conformant and faster implementation
npm warn deprecated @opentelemetry/sdk-trace-base@2.2.0: Use @opentelemetry/sdk-trace package
npm warn deprecated @opentelemetry/sdk-trace-base@2.2.0: Use @opentelemetry/sdk-trace package
added 539 packages in 7s
# exit 0
Release-resolver reproducibility:
$ mv package-lock.json /home/khaliqgant/relay-v18-lock-release-resolution-proof.saved.json
$ mise exec node@22.14.0 -- npx -y npm@11.19.1 install --package-lock-only --ignore-scripts --no-audit --no-fund
up to date in 5s
$ cmp package-lock.json /home/khaliqgant/relay-v18-lock-release-resolution-proof.saved.json
# exit 0
Lock closure after regeneration:
@agent-relay/harness-driver {"version":"17.2.1","devOptional":true}
@agent-relay/broker-darwin-arm64 {"version":"17.2.1","optional":true,"os":["darwin"],"cpu":["arm64"]}
@agent-relay/broker-darwin-x64 {"version":"17.2.1","optional":true,"os":["darwin"],"cpu":["x64"]}
@agent-relay/broker-linux-arm64 {"version":"17.2.1","optional":true,"os":["linux"],"cpu":["arm64"]}
@agent-relay/broker-linux-x64 {"version":"17.2.1","optional":true,"os":["linux"],"cpu":["x64"]}
@agent-relay/broker-win32-x64 {"version":"17.2.1","optional":true,"os":["win32"],"cpu":["x64"]}
Additional checks:
$ mise exec node@22.14.0 -- npx -y npm@11.19.1 ci --ignore-scripts --no-audit --no-fund
added 535 packages in 5s
# exit 0
$ mise exec node@22.14.0 -- npm run format:check
Checking formatting...
All matched files use Prettier code style!
# exit 0
$ mise exec node@22.14.0 -- npm run lint
✖ 95 problems (0 errors, 95 warnings)
# exit 0
$ git diff --check 1db553041261a60283d06d0b9e72298e9ab47ca4...HEAD
# exit 0, no output
Known unrelated validation: npm run syncpack still exits nonzero on the exact base and repaired head for existing @types/node, tar, and typescript version-group drift. This PR does not alter those packages.
Test Plan
- Exact Linux CI Node/npm base failure captured
- Exact Linux CI Node/npm repaired-head install passes
- Release npm 11.19.1 regenerates the committed lock byte-for-byte
- Optional platform closure inspected
- npm 11 install, formatting, lint, and diff checks pass
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.