Skip to content

fix: support compressed provider streams on Node 26 - #25

Merged
benedict2310 merged 1 commit into
mainfrom
fix/node26-http-runtime
Aug 26, 2026
Merged

benedict2310 merged 1 commit into
mainfrom
fix/node26-http-runtime

Conversation

@benedict2310

Copy link
Copy Markdown
Owner

Summary

  • install the matching npm Undici globals only when TelePi still owns globalThis.fetch
  • configure HTTP only when startBot() runs, leaving setup/status/help side-effect free
  • cover fetch-override preservation, idempotence, and an isolated Node 26 gzip/SSE subprocess regression; CI now runs Node 22.19 and 26

Validation

  • npx vitest run test/http-runtime.test.ts (2 passed, 1 Node-26-only test skipped on local Node 23.11)
  • npm test (441 passed, 1 Node-26-only test skipped)
  • npm run test:coverage (passed; statements/lines 86.63%, branches 80.98%, functions 90.09%)
  • npm run build

The Node 26 gzip/SSE test cannot run locally because this workstation currently has Node 23.11 only; the CI matrix executes it under Node 26.

@benedict2310
benedict2310 merged commit d19bd7a into main Aug 26, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74d2513d66

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/http-runtime.ts
return;
}

install();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve embedding-provided non-fetch web globals

When an embedding application replaces only a web global such as WebSocket, EventSource, or Headers after this module loads but leaves fetch unchanged, this guard still reaches install(), which overwrites all of those globals. This defeats the embedding-safety behavior implemented for fetch and can break the host application's HTTP or socket instrumentation when it calls startBot(); either preserve each existing replacement or restrict installation to the fetch globals required by the workaround.

Useful? React with 👍 / 👎.

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.

1 participant