Skip to content

fix(ci): preserve optional platform brokers in lockfile - #2134

Merged
AgentRelayBot merged 1 commit into
mainfrom
fix/v18-lock-platform-optionals-durable
Nov 10, 2026
Merged

AgentRelayBot merged 1 commit into
mainfrom
fix/v18-lock-platform-optionals-durable

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The root package.json adds @agent-relay/harness-driver version 17.2.1 as a development dependency.

Changes: Harness driver dependency

Layer / File(s) Summary
Add harness driver development dependency
package.json
The root development dependencies add @agent-relay/harness-driver version 17.2.1.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

  • AgentWorkforce/relay#1994: Changes harness-driver broker resolution and installs optional-dependency broker binaries into the canonical bin directory.
Merge Risk: Minimal · up to 47594

The lockfile repair addresses the reported Linux install failure. No merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: preserving optional platform brokers in the lockfile to fix CI installation.
Description check Passed The description includes a detailed Summary and a completed Test Plan with verification results. The Screenshots section is omitted, but screenshots are not applicable to this manifest and lockfile re…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes a detailed Summary and a completed Test Plan with verification results. The Screenshots section is omitted, but screenshots are not applicable to this manifest and lockfile repair.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the package list,
A harness driver joins the set.
One version finds its place in dev,
The root records the change in text.
Then off I hop, with ears held high!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cdbcbba0-df70-484c-8528-d683c5e64bb1
Commits

Reviewing files that changed from the base of the PR and between 1db5530 and 475940c.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 1

  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@khaliqgant

Copy link
Copy Markdown
Member Author

Independent exact-head review signoff for 475940ce5a1f239ebe2cca21f40d7132b9e836a9: clean, no findings.

Base reproduction under exact CI Node/npm:

node v22.14.0
npm 10.9.2
$ npm ci --ignore-scripts --no-audit --no-fund
exit 1
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"}

At the reviewed head:

npm 10.9.2: added 539 packages in 5s; exit 0
npm 11.19.1: added 535 packages in 10s; exit 0

Both clean installs contain only broker-linux-x64 plus the root harness. @relayflows/sdk@2.0.66 dedupes the same @agent-relay/harness-driver@17.2.1.

Release-style npm 11.19.1 resolution regenerates the intended durable classifications:

harness-driver 17.2.1: devOptional=true
broker-darwin-arm64: optional=true
broker-darwin-x64: optional=true
broker-linux-arm64: optional=true
broker-linux-x64: optional=true
broker-win32-x64: optional=true

Relevant tests and scope:

$ npx vitest run packages/cli/src/cli/publish-workflow.test.ts packages/cli/src/cli/relayflows-peer-compat.test.ts --reporter=verbose
 Test Files  2 passed (2)
      Tests  66 passed (66)

$ git diff --check 1db55304..HEAD
# exit 0
$ git diff --name-only 1db55304..HEAD
package-lock.json
package.json

The root is private; no published package manifest changes. Existing release logic keeps the harness/broker compatibility closure frozen at 17.2.1 and does not publish those packages. This repairs npm 10/11 lock interpretation without reviving broker runtime/publication work or changing any gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T23:56:45.813528Z 475940c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Makes the existing @agent-relay/harness-driver dependency explicit and repairs its install flags in package-lock.json.

  • Root installs can skip brokers for other platforms.

Reviews (1) · Last reviewed commit: "fix(ci): preserve optional platform brok..." · Reviewed by Greptile

@AgentRelayBot AgentRelayBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent exact-head approval for 475940c. Base npm 10.9.2 clean install reproduces EBADPLATFORM; this head passes npm 10.9.2 and 11.19.1 clean installs. Most importantly, after removing package-lock.json, a release-style npm 11.19.1 Linux/x64 package-lock-only resolution is byte-for-byte identical to the committed lock: harness-driver 17.2.1 is devOptional and all five brokers are optional, with no extraneous records. Focused publish/peer tests are 66/66, full hosted matrix is terminal green/neutral/skipped, diff check is clean, and unresolved review threads are zero. This is the durable repair; competing PR 2135 must remain held/superseded.

@AgentRelayBot
AgentRelayBot merged commit f86ebb6 into main Nov 10, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants