Skip to content

build(deps): bump ws from 8.20.0 to 8.21.1 in the npm_and_yarn group across 1 directory - #31

Merged
AojdevStudio merged 2 commits into
mainfrom
dependabot/npm_and_yarn/npm_and_yarn-b448f38fe0
Jul 18, 2026
Merged

AojdevStudio merged 2 commits into
mainfrom
dependabot/npm_and_yarn/npm_and_yarn-b448f38fe0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Bumps the npm_and_yarn group with 1 update in the / directory: ws.

Updates ws from 8.20.0 to 8.21.1

Release notes

Sourced from ws's releases.

8.21.1

Bug fixes

  • Empty fragments are now counted toward the limit (a2f4e7c0).
  • The default values of the maxBufferedChunks and maxFragments options have been reduced (f197ac65).

8.21.0

Features

  • Introduced the maxBufferedChunks and maxFragments options (2b2abd45).

Bug fixes

  • Fixed a remote memory exhaustion DoS vulnerability (2b2abd45).

A high volume of tiny fragments and data chunks could be sent by a peer, using modest network traffic, to crash a ws server or client due to OOM.

import { WebSocket, WebSocketServer } from 'ws';
const wss = new WebSocketServer({ port: 0 }, function () {
const data = Buffer.alloc(1);
const options = { fin: false };
const { port } = wss.address();
const ws = new WebSocket(ws://localhost:${port});
ws.on('open', function () {
(function send() {
ws.send(data, options, function (err) {
if (err) return;
send();
});
})();
});
ws.on('error', console.error);
ws.on('close', function (code, reason) {
console.log(client close - code: ${code} reason: ${reason.toString()});
});
});
wss.on('connection', function (ws) {
ws.on('error', console.error);
ws.on('close', function (code, reason) {
console.log(server close - code: ${code} reason: ${reason.toString()});
});
});

... (truncated)

Commits
  • ae1de54 [dist] 8.21.1
  • 8e9511b [ci] Trust Coveralls Homebrew tap
  • f197ac6 [fix] Lower default values of maxBufferedChunks and maxFragments
  • 8df8265 [ci] Update actions/checkout action to v7
  • a2f4e7c [fix] Count empty fragments toward the limit (#2329)
  • e79f912 [pkg] Approve install scripts for bufferutil and utf-8-validate
  • 4ea355d [doc] Document 32-bit signed integer coercion for option values
  • 2120f4c [example] Remove uuid dependency
  • 4c534a6 [security] Add latest vulnerability to SECURITY.md
  • bca91ad [dist] 8.21.0
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 18, 2026
@changeset-bot

changeset-bot Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 57669f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Bumps the npm_and_yarn group with 1 update in the / directory: [ws](https://github.com/websockets/ws).


Updates `ws` from 8.20.0 to 8.21.1
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@8.20.0...8.21.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-version: 8.21.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/npm_and_yarn-b448f38fe0 branch from 395f29d to 3ae0604 Compare July 18, 2026 21:10
@AojdevStudio

Copy link
Copy Markdown
Owner

Reviewer verdict

The assigned head 395f29db22af1de5062059ed934d096784dcea86 was superseded by a Dependabot rebase during review. This verdict is pinned to the new live head 3ae06040c7b8231c042130d050756f0a2ffa6ae6.

Blocking finding

The rebase expanded the diff from the intended 3 additions / 3 deletions to 9 additions / 9 deletions. Besides the valid ws triplet, package-lock.json#packages[""] now changes six root devDependency specifiers from latest to *:

  • @mariozechner/pi-ai
  • @mariozechner/pi-coding-agent
  • @mariozechner/pi-tui
  • @types/node
  • typebox
  • typescript

package.json at both base and head still declares latest, and the base lockfile also declares latest. Green npm ci does not catch this because both specifiers admit the resolved versions, but the unrelated lock metadata drift violates the stated ws-only scope.

Narrow fix: recreate/regenerate the Dependabot change against current main, or restore exactly those six root lock entries to latest, leaving only the ws version, registry URL, and integrity changed. Then rerun exact-head CI and record the repository-required Pi package-load gate.

The intended dependency update otherwise checks out:

  • ws@8.21.1 satisfies the existing ^8.18.0 consumers; engine >=10.0.0, MIT license, and optional peers are unchanged.
  • npm registry URL and SRI exactly match the lock entry.
  • GHSA-96hv-2xvq-fx4p confirms the high-severity remote memory-exhaustion issue affects 8.20.0 and is patched in 8.21.0; the 8.21.1 release adds follow-up empty-fragment and lower-default-limit hardening. GitHub reports no advisory affecting 8.21.1.
  • Exact-head PR CI run 29661118936 passed secret scan, npm ci, npm run check, and npm run pack:dry; GitGuardian passed. The no-changeset bot note is non-blocking because the packed artifact excludes this lockfile-only dev-resolution change.
VERDICT: NEEDS_WORK
HEAD_SHA: 3ae06040c7b8231c042130d050756f0a2ffa6ae6
ASSIGNED_SHA: 395f29db22af1de5062059ed934d096784dcea86 — SUPERSEDED
DIFF_SCOPE: FAIL — six unrelated root lock specifiers changed latest to *
DEPENDENCY_RESOLUTION: PASS — all existing ws consumers accept 8.21.1
ADVISORY_RELEASE: PASS — 8.20.0 affected; 8.21.1 patched and hardened
COMPATIBILITY: PASS — engine, license, and optional peers unchanged
LOCKFILE_PACKAGE_EFFECTS: FAIL — root lock metadata no longer mirrors package.json/base
CI: PASS — exact-head install, checks, pack dry-run, secret scan, and GitGuardian
CHANGESET: NOT_REQUIRED — package-lock-only transitive dev resolution is not packed
PI_PACKAGE_LOAD: NOT_EVIDENCED — required gate is absent from CI
REQUIRED_FIXES:
1. Restore the six root lock specifiers to latest; retain only the intended ws triplet.
2. Rerun CI and provide exact-new-head pi -e . evidence.

Dependabot rebase incidentally changed six unrelated root
devDependency lockfile specifiers from 'latest' to '*'
(@mariozechner/pi-ai, @mariozechner/pi-coding-agent,
@mariozechner/pi-tui, @types/node, typebox, typescript),
diverging from package.json and the base lockfile. Restore
those six entries to 'latest' and retain only the intended
ws 8.20.0 -> 8.21.1 version/resolved/integrity update
(GHSA-96hv-2xvq-fx4p).
@AojdevStudio

Copy link
Copy Markdown
Owner

Fix re-review

The prior lockfile blocker is resolved at 57669f6f6453df77ef4c1799ee3293221f8b031c.

  • Exact diff: PASS — one file, package-lock.json, exactly 3 additions / 3 deletions; only ws version, registry URL, and integrity change from 8.20.0 to 8.21.1.
  • Root specifiers: PASS — all six previously affected entries are restored to latest in both base and head and match package.json.
  • No dependency drift: PASS — base/head lock metadata is otherwise identical; the same three consumers remain on ^8.18.0.
  • Resolution/integrity: PASS — npm registry URL and SRI exactly match ws@8.21.1; engine, MIT license, and optional peer metadata are unchanged.
  • Security: PASS — GHSA-96hv-2xvq-fx4p affects ws 8.x below 8.21.0; GitHub reports no advisory affecting 8.21.1, whose release adds follow-up fragment-limit hardening.
  • Fresh CI: PASS — exact-head PR run 29661424776 passed gitleaks, npm ci, npm run check, and npm run pack:dry; GitGuardian passed.

One validation-only gate remains. rules/package-resources.md requires pi -e . before shipping package changes, but that command is absent from CI and no exact-head manual result is posted. No file change is required: run the Pi package-load check at this SHA and attach its successful output.

VERDICT: NEEDS_WORK
HEAD_SHA: 57669f6f6453df77ef4c1799ee3293221f8b031c
DIFF_SCOPE: PASS — package-lock.json only, exactly 3 additions / 3 deletions
ROOT_SPECIFIERS: PASS — all six entries restored to latest
DEPENDENCY_DRIFT: PASS — none beyond ws version, URL, and integrity
DEPENDENCY_RESOLUTION: PASS — existing ^8.18.0 consumers accept 8.21.1
INTEGRITY: PASS — npm registry URL and SRI match
ADVISORY_RELEASE: PASS — vulnerable 8.20.0 replaced by patched/hardened 8.21.1
COMPATIBILITY: PASS — engine, license, and optional peers unchanged
CI: PASS — fresh exact-head install, checks, pack dry-run, secret scan, and GitGuardian
PI_PACKAGE_LOAD: NOT_EVIDENCED — required exact-head pi -e . result is absent
REQUIRED_FIX: Run pi -e . at this exact SHA and post successful evidence; no source change.

@AojdevStudio

Copy link
Copy Markdown
Owner

Pi package-load gate: environment isolation follow-up

Exact head: 57669f6f6453df77ef4c1799ee3293221f8b031c

Normal-home pi -e . result: FAILED (exit 1)

Running the literal required command on this operator's normal machine $HOME fails with 13 duplicate tool/flag registration errors, because ~/.pi/agent/extensions/ on this machine already holds global daily-use copies of this same package's extensions (some are symlinks straight back to this repo's canonical extensions/ path, e.g. autopilot, bash-guard; others are separately-maintained standalone copies with matching tool names, e.g. adversarial-review.ts, question.ts, todos.ts, web-tools.ts, interactive-artifacts). pi -e . loads the repo-local extensions/ in addition to its normal global-discovery pass, so both copies register identical tool/flag names and pi's duplicate-registration guard rejects the load:

Error: Failed to load extension ".../.pi/agent/extensions/adversarial-review.ts": Tool "adversarial_review" conflicts with .../extensions/adversarial-review.ts
Error: Failed to load extension ".../.pi/agent/extensions/autopilot/index.ts": Tool "autopilot_transition" conflicts with .../extensions/autopilot/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/bash-guard/index.ts": Flag "--bash-guard-auto-allow" conflicts with .../extensions/bash-guard/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/bash-guard/index.ts": Flag "--bash-guard-headless-allow-catastrophic" conflicts with .../extensions/bash-guard/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/interactive-artifacts/index.ts": Tool "artifact_publish" conflicts with .../extensions/interactive-artifacts/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/interactive-artifacts/index.ts": Tool "artifact_get" conflicts with .../extensions/interactive-artifacts/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/question.ts": Tool "AskUserQuestion" conflicts with .../extensions/question/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/question.ts": Tool "AskBatchQuestions" conflicts with .../extensions/question/index.ts
Error: Failed to load extension ".../.pi/agent/extensions/todos.ts": Tool "todo" conflicts with .../extensions/todos.ts
Error: Failed to load extension ".../.pi/agent/extensions/web-tools.ts": Tool "web_search" conflicts with .../extensions/web-tools.ts
Error: Failed to load extension ".../.pi/agent/extensions/web-tools.ts": Tool "tavily_search" conflicts with .../extensions/web-tools.ts
Error: Failed to load extension ".../.pi/agent/extensions/web-tools.ts": Tool "tavily_map" conflicts with .../extensions/web-tools.ts
Error: Failed to load extension ".../.pi/agent/extensions/web-tools.ts": Tool "tavily_crawl" conflicts with .../extensions/web-tools.ts

Clean-HOME pi -e . result: PASSED (exit 0, zero errors)

To isolate whether the failure originates in this repo's package contents versus this machine's pre-existing global install, the same exact-head worktree was re-run with an empty, freshly-created $HOME (no pre-existing ~/.pi/agent/extensions/ to collide with) while preserving $PATH so the real installed pi binary still resolves:

EMPTY_HOME=$(mktemp -d)
PI_CLI=$(readlink -f ~/.npm-global/bin/pi)   # resolves the actual pi-coding-agent cli.js, independent of $HOME
env -i HOME="$EMPTY_HOME" PATH="$PATH" node "$PI_CLI" -e .

Note: the ~/.local/bin/pi launcher shim on this machine hardcodes exec "$HOME/.npm-global/bin/pi" ..., so blanking $HOME entirely breaks the shim's own binary resolution (unrelated to extension discovery, since npm installs the binary under $HOME/.npm-global). Invoking the resolved cli.js directly via node is the same underlying process pi -e . launches on a normal invocation once the shim resolves it: it is not a substitute for -e ., it is the identical extension-loading code path with only the shim's own path lookup bypassed.

Result:

$ env -i HOME="$EMPTY_HOME" PATH="$PATH" node "$PI_CLI" -e .
GUARD:PI_EXIT_CODE:0

Zero output, zero "Tool ... conflicts" errors: all 10 repo extensions (adversarial-review.ts, anti-hedging.ts, autopilot/index.ts, bash-guard/index.ts, conditional-hooks/index.ts, hello/index.ts, interactive-artifacts/index.ts, question/index.ts, todos.ts, web-tools.ts) loaded and registered without collision.

Corroborating evidence: the same clean-HOME invocation with -p "list loaded extensions" proceeds past extension loading (no collision errors) and only stops at an unrelated, expected wall: no model credentials exist under the fresh $HOME:

$ env -i HOME="$EMPTY_HOME" PATH="$PATH" node "$PI_CLI" -e . -p "list loaded extensions"
No API key found for the selected model.

Use /login to log into a provider via OAuth or API key. See:
  .../pi-coding-agent/docs/providers.md
  .../pi-coding-agent/docs/models.md
GUARD:PI_EXIT_CODE:1

Since pi loads and registers extensions before ever touching model auth, reaching the auth wall (instead of a collision error) is itself proof the extension-load step succeeded cleanly.

Isolation was confirmed genuine: $EMPTY_HOME/.pi/agent/extensions/ never existed after the run (only .pi/agent/sessions/ and a stub auth.json were auto-created), while the real ~/.pi/agent/extensions/ on this machine still holds its original 13 entries, untouched.

Why this isolates environment from the PR diff

This PR's diff is package-lock.json only (ws version/resolved/integrity, 3+3 lines): it cannot affect extension discovery or tool registration in any way. The normal-home failure reproduces identically on origin/main or any other commit of this repo on this machine, because the collision is rooted entirely in this operator's global ~/.pi/agent/extensions/ install layout, not in the code under review. The clean-HOME run demonstrates that the repository's own package contents at this exact head load correctly under pi -e . with no pre-existing global extension state to collide with, which is the condition the literal gate in rules/package-resources.md is meant to verify.

No source files were changed to produce this evidence.

@AojdevStudio

Copy link
Copy Markdown
Owner

Evidence re-evaluation

The exact-head Pi evidence clears the remaining package-load gate.

  • The normal-HOME failure consists only of duplicate tool/flag registrations from machine-global copies of the same repo extensions. That failure is external discovery state and is not caused by this lockfile-only PR.
  • The clean-HOME command invoked the resolved installed Pi cli.js with the same explicit -e . extension path, exited 0, and produced zero extension-registration errors.
  • The local pi shell wrapper only resolves that cli.js and adds skill-loading flags; those flags do not change the extension registration path under test.
  • The corroborating prompt run reached model authentication only after extension loading, with no collision diagnostics.
  • The live PR remains pinned to this SHA with exactly one package-lock.json hunk, 3 additions / 3 deletions, and all fresh CI/security checks green.

No required fix remains.

VERDICT: MERGE_READY
HEAD_SHA: 57669f6f6453df77ef4c1799ee3293221f8b031c
DIFF_SCOPE: PASS — package-lock.json only, exactly 3 additions / 3 deletions
ROOT_SPECIFIERS: PASS — all six entries remain latest
DEPENDENCY_DRIFT: PASS — none beyond ws version, URL, and integrity
DEPENDENCY_RESOLUTION: PASS — existing ^8.18.0 consumers accept 8.21.1
INTEGRITY: PASS — npm registry URL and SRI match
ADVISORY_RELEASE: PASS — 8.20.0 vulnerable; 8.21.1 patched and hardened
COMPATIBILITY: PASS — engine, license, and optional peers unchanged
CI: PASS — exact-head checks, pack dry-run, secret scan, and GitGuardian
PI_PACKAGE_LOAD: PASS — exact-head clean-HOME -e . run exited 0 with zero registration errors
NORMAL_HOME_COLLISIONS: NON_BLOCKING — reproduced machine-global duplicate extension state
REQUIRED_FIXES: none

@AojdevStudio
AojdevStudio merged commit d17b78e into main Jul 18, 2026
5 checks passed
@AojdevStudio
AojdevStudio deleted the dependabot/npm_and_yarn/npm_and_yarn-b448f38fe0 branch July 18, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant