Skip to content

fix(deps): add missing runtime deps @toon-format/toon and safe-regex#5771

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.43from
chirag127:fix/missing-runtime-deps-toon-safe-regex
Jul 1, 2026
Merged

fix(deps): add missing runtime deps @toon-format/toon and safe-regex#5771
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.43from
chirag127:fix/missing-runtime-deps-toon-safe-regex

Conversation

@chirag127

Copy link
Copy Markdown
Contributor

Summary

Two packages are imported at runtime by the stacked compression pipeline but are missing from dependencies:

  • @toon-format/toon — imported by open-sse/services/compression/engines/headroom/toon.ts:3
    import { encode as toonEncode, decode as toonDecode } from "@toon-format/toon";
  • safe-regex — imported by open-sse/services/compression/engines/ccr/ccrQuery.ts:3
    import safeRegex from "safe-regex";

@types/safe-regex is already declared (types only) but the runtime package is not. @toon-format/toon has no declaration at all.

Impact

Both engines are wired into the default stacked compression pipeline. On a fresh pnpm install / npm install (no stale node_modules from a previous OmniRoute install carrying these packages transitively), any request routed through the compression pipeline crashes with:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package "@toon-format/toon" ...
Error [ERR_MODULE_NOT_FOUND]: Cannot find package "safe-regex" ...

This is related to (but distinct from) #5708 — that issue tracks pnpm-install-no-op on fresh clones. This issue is that even a working install cannot resolve these two because they were never declared.

Fix

     "@toon-format/toon": "^2.3.0",
     "@types/mdx": "^2.0.13",
     ...
     "safe-regex": "^2.1.1",
     "selfsigned": "^5.5.0",

Two-line change to package.json.

Test plan

  • Delete node_modules and re-install with pnpm install
  • Trigger a chat completion routed through the compression pipeline
  • Confirm neither engine throws ERR_MODULE_NOT_FOUND

Notes

Discovered while auditing our fork at oriz-org/OmniRoute. Filing as PR rather than issue because the fix is trivial.

Both packages are imported at runtime but were only declared for their
type shims (safe-regex was via @types/safe-regex; @toon-format/toon
had no declaration at all). Missing runtime deps mean:

- open-sse/services/compression/engines/headroom/toon.ts imports
  @toon-format/toon → MODULE_NOT_FOUND on cold pnpm/npm install
- open-sse/services/compression/engines/ccr/ccrQuery.ts imports
  safe-regex → MODULE_NOT_FOUND

Both engines are wired into the stacked compression pipeline (default
enabled), so a fresh clone that does not have a stale node_modules
from a previous version crashes as soon as the pipeline runs.

Verified with pnpm ls / grep before/after.
@chirag127
chirag127 requested a review from diegosouzapw as a code owner July 1, 2026 04:39
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@diegosouzapw diegosouzapw left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the dependency audit, @chirag127. I checked both packages against the monorepo before acting, and they're already declared in the workspace that imports them, so this change is redundant:

  • @toon-format/toon — declared in open-sse/package.json ("@toon-format/toon": "^2.3.0"); imported only from open-sse/services/compression/engines/headroom/toon.ts.
  • safe-regex — declared in open-sse/package.json ("safe-regex": "^2.1.1"); imported from open-sse/services/compression/engines/{ccr,rtk,riskGate}/….

open-sse is a workspace ("workspaces": ["open-sse"]), so its own package.json is authoritative for these runtime deps — adding them to the root package.json duplicates the declaration without fixing anything. (The root correctly carries only @types/safe-regex, the type shim.)

If you actually hit an ERR_MODULE_NOT_FOUND at runtime, could you share the exact install steps + error output? That would point to a genuinely missing declaration worth fixing. Also, the base branch should be release/v3.8.43 (the active cycle), not main.

Leaving this open rather than merging — appreciate you keeping an eye on the dependency graph.

@diegosouzapw
diegosouzapw changed the base branch from main to release/v3.8.43 July 1, 2026 11:58
@diegosouzapw
diegosouzapw merged commit 3e88fc0 into diegosouzapw:release/v3.8.43 Jul 1, 2026
194 of 195 checks passed
@chirag127

chirag127 commented Jul 1, 2026 via email

Copy link
Copy Markdown
Contributor Author

@diegosouzapw diegosouzapw mentioned this pull request Jul 2, 2026
@chirag127
chirag127 deleted the fix/missing-runtime-deps-toon-safe-regex branch July 10, 2026 08:25
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