Skip to content

fix(agentcore): collapse the duplicate @copilotkit/shared in the lambda lock (refs OSS-1029) - #6813

Merged
maxkorp merged 1 commit into
agent/intelligence-starter-templatesfrom
ben1/oss-1029-lambda-lock-dedupe
Sep 1, 2026
Merged

maxkorp merged 1 commit into
agent/intelligence-starter-templatesfrom
ben1/oss-1029-lambda-lock-dedupe

Conversation

@BenTaylorDev

Copy link
Copy Markdown
Contributor

Stacked on #6188 — base is agent/intelligence-starter-templates, one commit on top of 56c2378ff5. Fold it in or merge it; it is not meaningful against main.

Follow-up to my comment on #6188. One file, 10 insertions / 48 deletions.

The problem

064c5ed910 chore(examples): update CLI starters to CopilotKit 1.70.0 leaves the AgentCore lambda lock with two copies of @copilotkit/shared, plus a stale @copilotkit/core:

node_modules/@copilotkit/runtime/node_modules/@copilotkit/shared   1.70.0
node_modules/@copilotkit/shared                                    1.68.1   <-- hoisted
node_modules/@copilotkit/core                                      1.68.1   <-- stale

The frontend lock is clean; this is only the lambda.

Why it happens

[email protected] pins @copilotkit/shared to exactly 1.70.0. The transitive @copilotkit/channels-*@0.9.0 packages ask for ^1.68.0, which the pre-existing 1.68.1 resolution already satisfies. A --package-lock-only bump has no reason to move a range that is already satisfied, so npm hoists 1.68.1 for the channels packages and nests 1.70.0 under runtime.

npm dedupe --package-lock-only does not collapse it. What does:

npm update @copilotkit/shared @copilotkit/core --package-lock-only

That is the entire change.

The alternative worth not taking

Deleting the lock and regenerating also produces one clean copy — and sweeps 89 unrelated packages along with it, including @graphql-tools/executor 1.5.1 → 2.0.0, @graphql-tools/utils 10 → 11, debug 2 → 4, and a @types/express 5 → 4 downgrade, on a Lambda that ships to AWS. Recording it here so the next person doesn't reach for it.

Validation

On top of 56c2378ff5:

  • exactly one copy of every @copilotkit/* and @ag-ui/* package in the lock afterwards, none left on a 1.6x line
  • npm install + tsc -p tsconfig.json → exit 0, dist/ emitted
  • nothing else in the lock moves — the diff is confined to the three @copilotkit entries and the hoisting that follows

Unrelated, still flagging

[email protected] declares @ag-ui/* at 0.0.59; the lambda's overrides block holds them at 0.0.58. Left alone — it was already overriding the declared version before this bump, and it builds — but it may have a shelf life.

Refs OSS-1029.

🤖 Generated with Claude Code

…da lock (refs OSS-1029)

The 1.70.0 repin left two copies of @copilotkit/shared in the AgentCore lambda: 1.70.0
nested under runtime, and 1.68.1 still hoisted at the top level, alongside a stale
@copilotkit/core 1.68.1.

[email protected] pins shared to exactly 1.70.0, but the transitive @copilotkit/channels-*
0.9.0 packages ask for ^1.68.0, which the existing 1.68.1 resolution already satisfies.
A --package-lock-only bump has no reason to move a range that is already satisfied, so
npm hoists 1.68.1 for the channels packages and nests 1.70.0 under runtime. npm dedupe
does not collapse it; npm update on shared and core does.

Regenerating the lock from scratch also yields one clean copy, but sweeps 89 unrelated
packages with it -- @graphql-tools/executor 1.5.1 -> 2.0.0, @graphql-tools/utils 10 -> 11,
debug 2 -> 4, and a @types/express 5 -> 4 downgrade -- so it was rejected.

Verified: one copy of every @CopilotKit and @Ag-ui package in the lock afterwards, none
left on a 1.6x line, and npm install + tsc -p tsconfig.json exits 0.

Refs OSS-1029.
@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

OSS-1029

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 796c8c7b-a05f-45d3-9e3a-639a7768dfbb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

@maxkorp
maxkorp merged commit 1ecd280 into agent/intelligence-starter-templates Sep 1, 2026
22 checks passed
@maxkorp
maxkorp deleted the ben1/oss-1029-lambda-lock-dedupe branch September 1, 2026 03:04
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