helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: destroy parent port backend when JS env exits

#### Description of Change

Refs https://github.com/microsoft/vscode/issues/243957.
Refs https://github.com/electron/electron/pull/39335.

We previously added this change to `MessagePort` but did not do the same for `ParentPort`, and it seems it is subject to the same potential issue.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fix a potential crash in `parentPort`.


Changed files:
filename: shell/services/node/node_service.cc
patch: @@ -96,6 +96,7 @@ NodeService::NodeService(
 NodeService::~NodeService() {
   if (!node_env_stopped_) {
     node_env_->set_trace_sync_io(false);
+    ParentPort::GetInstance()->Close();
     js_env_->DestroyMicrotasksRunner();
     node::Stop(node_env_.get(), node::StopFlags::kDoNotTerminateIsolate);
   }
@@ -147,6 +148,7 @@ void NodeService::Initialize(
       node_env_.get(), [this](node::Environment* env, int exit_code) {
         // Destroy node platform.
         env->set_trace_sync_io(false);
+        ParentPort::GetInstance()->Close();
         js_env_->DestroyMicrotasksRunner();
         node::Stop(env, node::StopFlags::kDoNotTerminateIsolate);
         node_env_stopped_ = true;

filename: shell/services/node/parent_port.cc
patch: @@ -23,8 +23,8 @@ namespace electron {
 gin::WrapperInfo ParentPort::kWrapperInfo = {gin::kEmbedderNativeGin};
 
 ParentPort* ParentPort::GetInstance() {
-  static base::NoDestructor<ParentPort> instance;
-  return instance.get();
+  static ParentPort* instance = new ParentPort();
+  return instance;
 }
 
 ParentPort::ParentPort() = default;

filename: shell/services/node/parent_port.h
patch: @@ -10,6 +10,7 @@
 #include "gin/wrappable.h"
 #include "mojo/public/cpp/bindings/connector.h"
 #include "mojo/public/cpp/bindings/message.h"
+#include "shell/common/gin_helper/cleaned_up_at_exit.h"
 #include "third_party/blink/public/common/messaging/message_port_descriptor.h"
 
 namespace v8 {
@@ -31,6 +32,7 @@ namespace electron {
 // for the lifetime of a Utility Process which
 // also means that GC lifecycle is ignored by this class.
 class ParentPort final : public gin::Wrappable<ParentPort>,
+                         public gin_helper::CleanedUpAtExit,
                          private mojo::MessageReceiver {
  public:
   static ParentPort* GetInstance();
@@ -49,9 +51,10 @@ class ParentPort final : public gin::Wrappable<ParentPort>,
       v8::Isolate* isolate) override;
   const char* GetTypeName() override;
 
+  void Close();
+
  private:
   void PostMessage(v8::Local<v8::Value> message_value);
-  void Close();
   void Start();
   void Pause();
Repository: facebook/react
Pull request: Hardcode disableIEWorkarounds for www

This has landed and is true everywhere, but let's keep the flag until it lands in the stable release.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.www-dynamic.js
patch: @@ -13,7 +13,6 @@
 // Use __VARIANT__ to simulate a GK. The tests will be run twice: once
 // with the __VARIANT__ set to `true`, and once set to `false`.
 
-export const disableIEWorkarounds = __VARIANT__;
 export const disableSchedulerTimeoutInWorkLoop = __VARIANT__;
 export const enableLazyContextPropagation = __VARIANT__;
 export const forceConcurrentByDefaultForTesting = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.www.js
patch: @@ -15,7 +15,6 @@ import typeof * as DynamicFeatureFlags from './ReactFeatureFlags.www-dynamic';
 const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags');
 
 export const {
-  disableIEWorkarounds,
   enableTrustedTypesIntegration,
   enableDebugTracing,
   enableLazyContextPropagation,
@@ -49,6 +48,7 @@ export const enableUpdaterTracking = __PROFILE__;
 export const enableSuspenseAvoidThisFallback = true;
 export const enableSuspenseAvoidThisFallbackFizz = false;
 
+export const disableIEWorkarounds = true;
 export const enableCPUSuspense = true;
 export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = true;

filename: scripts/jest/setupTests.www.js
patch: @@ -15,6 +15,11 @@ jest.mock('shared/ReactFeatureFlags', () => {
   // code live.
   actual.disableInputAttributeSyncing = __VARIANT__;
 
+  // This is hardcoded to true for the next release,
+  // but still run the tests against both variants until
+  // we remove the flag.
+  actual.disableIEWorkarounds = __VARIANT__;
+
   return actual;
 });
Repository: ollama/ollama
Pull request: fix: regression unsupported metal types

omitting `--n-gpu-layers` means use metal on macos which isn't correct since ollama uses `num_gpu=0` to explicitly disable gpu for file types that are not implemented in metal

Changed files:
filename: llm/llama.go
patch: @@ -292,13 +292,10 @@ func newLlama(model string, adapters []string, runners []ModelRunner, numLayers
 		"--rope-freq-base", fmt.Sprintf("%f", opts.RopeFrequencyBase),
 		"--rope-freq-scale", fmt.Sprintf("%f", opts.RopeFrequencyScale),
 		"--batch-size", fmt.Sprintf("%d", opts.NumBatch),
+		"--n-gpu-layers", fmt.Sprintf("%d", numGPU),
 		"--embedding",
 	}
 
-	if numGPU > 0 {
-		params = append(params, "--n-gpu-layers", fmt.Sprintf("%d", numGPU))
-	}
-
 	if opts.NumGQA > 0 {
 		params = append(params, "--gqa", fmt.Sprintf("%d", opts.NumGQA))
 	}
Repository: nodejs/node
Pull request: fs: avoid computing time coefficient constants in runtime

Fixes: https://github.com/nodejs/node/issues/58726 [^1]

These constants can be precomputed.

[^1]: even though it's not a Node.js bug

Changed files:
filename: lib/internal/fs/utils.js
patch: @@ -419,10 +419,10 @@ StatsBase.prototype.isSocket = function() {
   return this._checkModeProperty(S_IFSOCK);
 };
 
-const kNsPerMsBigInt = 10n ** 6n;
-const kNsPerSecBigInt = 10n ** 9n;
-const kMsPerSec = 10 ** 3;
-const kNsPerMs = 10 ** 6;
+const kNsPerMsBigInt = 1_000_000n;
+const kNsPerSecBigInt = 1_000_000_000n;
+const kMsPerSec = 1_000;
+const kNsPerMs = 1_000_000;
 function msFromTimeSpec(sec, nsec) {
   return sec * kMsPerSec + nsec / kNsPerMs;
 }
Repository: huggingface/transformers
Pull request: Remove working-dir from collated reports job


Changed files:
filename: .github/workflows/collated-reports.yml
patch: @@ -27,7 +27,6 @@ jobs:
       - uses: actions/download-artifact@v4
 
       - name: Collated reports
-        working-directory: /transformers
         shell: bash
         env:
           ACCESS_REPO_INFO_TOKEN: ${{ secrets.ACCESS_REPO_INFO_TOKEN }}
Repository: ollama/ollama
Pull request: Add OllamaSharp for .NET community integration

Thank you so much for your efforts to build such an amazing piece of software.
I love Ollama and use it every day and I also plan to integrate it into further .NET applications. That's why I published [OllamaSharp](https://github.com/awaescher/OllamaSharp) as nuget package so everyone in .NET land can talk to the Ollama API easily.

Thanks again and keep up the great work.

Changed files:
filename: README.md
patch: @@ -231,4 +231,5 @@ curl -X POST http://localhost:11434/api/generate -d '{
 - [Dumbar](https://github.com/JerrySievert/Dumbar)
 - [Emacs client](https://github.com/zweifisch/ollama)
 - [oterm](https://github.com/ggozad/oterm)
-- [Ellama Emacs client](https://github.com/s-kostyaev/ellama)
\ No newline at end of file
+- [Ellama Emacs client](https://github.com/s-kostyaev/ellama)
+- [OllamaSharp for .NET](https://github.com/awaescher/OllamaSharp)
Repository: facebook/react
Pull request: [tests] assertLog before act in useEffectEvent

Fixes tests blocking https://github.com/facebook/react/pull/28737

Changed files:
filename: packages/react-reconciler/src/__tests__/useEffectEvent-test.js
patch: @@ -742,7 +742,7 @@ describe('useEffectEvent', () => {
     await act(() =>
       ReactNoop.render(<ChatRoom roomId="general" theme="light" />),
     );
-    await act(() => jest.runAllTimers());
+
     assertLog(['Welcome to the general room!', 'Connected! theme: light']);
     expect(ReactNoop).toMatchRenderedOutput(
       <span prop="Welcome to the general room!" />,
@@ -752,20 +752,17 @@ describe('useEffectEvent', () => {
     await act(() =>
       ReactNoop.render(<ChatRoom roomId="music" theme="light" />),
     );
-    await act(() => jest.runAllTimers());
     assertLog([
       'Welcome to the music room!',
       // should trigger a reconnect
       'Connected! theme: light',
     ]);
-
     expect(ReactNoop).toMatchRenderedOutput(
       <span prop="Welcome to the music room!" />,
     );
 
     // change theme only
     await act(() => ReactNoop.render(<ChatRoom roomId="music" theme="dark" />));
-    await act(() => jest.runAllTimers());
     // should not trigger a reconnect
     assertLog(['Welcome to the music room!']);
     expect(ReactNoop).toMatchRenderedOutput(
@@ -776,7 +773,6 @@ describe('useEffectEvent', () => {
     await act(() =>
       ReactNoop.render(<ChatRoom roomId="travel" theme="dark" />),
     );
-    await act(() => jest.runAllTimers());
     assertLog([
       'Welcome to the travel room!',
       // should trigger a reconnect
Repository: ggml-org/llama.cpp
Pull request: Update requirements-convert_legacy_llama.txt

Updated requirements to support Qwen3-VL in transformers 4.57.1 version

https://github.com/ggml-org/llama.cpp/pull/16780#issuecomment-3468787502

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*



Changed files:
filename: requirements/requirements-convert_legacy_llama.txt
patch: @@ -1,14 +1,7 @@
 numpy~=1.26.4
 sentencepiece~=0.2.0
 
-# Embedding Gemma is currently a preview release:
-# https://github.com/huggingface/transformers/releases/tag/v4.56.0-Embedding-Gemma-preview
-
-# The version is needed to be able to convert Embedding Gemma models to GGUF format:
-git+https://github.com/huggingface/transformers@v4.56.0-Embedding-Gemma-preview
-
-# Once Embedding Gemma is officially released, we can switch to:
-#transformers>=4.57.1,<5.0.0
+transformers>=4.57.1,<5.0.0
 
 gguf>=0.1.0
 protobuf>=4.21.0,<5.0.0
Repository: huggingface/transformers
Pull request: Fix typo and improve GPU kernel check error message in MXFP4 quantization (#40349)

## Description

This PR fixes a typo in MXFP4 quantization tests and improves the consistency of GPU kernel check error messages. The changes address both code quality and user experience improvements.

## What was fixed

- **Typo Fix**: Corrected `is_kernels_availalble` → `is_kernels_available` in test patches (2 instances)
- **Error Message Consistency**: Improved GPU kernel check error message to match the warning message above it
- **Code Quality**: Eliminated confusion and potential test failures

## Why this matters

- **Typo fix**: Prevents test failures and confusion when patching the `is_kernels_available` function
- **Error message consistency**: Makes error messages clearer and more professional
- **User experience**: Users get consistent terminology in both warnings and errors

## Files affected

- `tests/quantization/mxfp4/test_mxfp4.py` - Fixed 2 typo instances in test patches
- `src/transformers/quantizers/quantizer_mxfp4.py` - Improved error message consistency

## Dependencies

None. This is a pure typo fix and error message improvement with no new dependencies or requirements.

## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?

## Who can review?

Since this affects quantization and testing, I suggest tagging:

- **@SunMarc** (quantization - MXFP4 is a quantization method)
- **@MekkCyber** (quantization - also handles quantization-related issues)
- **@gante** (testing - this involves test fixes)

Fixes #40349

Changed files:
filename: src/transformers/quantizers/quantizer_mxfp4.py
patch: @@ -112,7 +112,7 @@ def validate_environment(self, *args, **kwargs):
             )
         elif not kernels_available:
             # we can't quantize the model in this case so we raise an error
-            raise ValueError("MXFP4 quantization requires triton >= 3.4.0 and triton_kernels installed")
+            raise ValueError("MXFP4 quantization requires triton >= 3.4.0 and kernels installed")
 
         if not self.pre_quantized:
             self._lazy_import_kernels()
Repository: vercel/next.js
Pull request: fix(edge-runtime): clone requests properly

Clone calling super before validating URL.

Closes https://github.com/vercel/next.js/issues/82767

Changed files:
filename: packages/next/src/server/web/sandbox/context.test.ts
patch: @@ -0,0 +1,72 @@
+import { getModuleContext } from './context'
+import { validateURL } from '../utils'
+
+jest.mock('../utils', () => ({
+  ...jest.requireActual('../utils'),
+  validateURL: jest.fn(jest.requireActual('../utils').validateURL),
+}))
+
+const mockedValidateURL = jest.mocked(validateURL)
+
+describe('Next.js sandbox Request constructor', () => {
+  let moduleContext: any
+
+  beforeEach(async () => {
+    mockedValidateURL.mockClear()
+    moduleContext = await getModuleContext({
+      moduleName: 'test-module',
+      onError: () => {},
+      onWarning: () => {},
+      useCache: false,
+      distDir: '/tmp',
+      edgeFunctionEntry: {
+        assets: [],
+        wasm: [],
+        env: {},
+      },
+    })
+  })
+
+  it('should preserve Request method when copying Request in Next.js context', () => {
+    const { Request: NextRequest } = moduleContext.runtime.context
+
+    const originalRequest = new NextRequest('https://example.com', {
+      method: 'POST',
+    })
+    expect(originalRequest.method).toBe('POST')
+
+    const copiedRequest = new NextRequest(originalRequest)
+
+    expect(copiedRequest.method).toBe('POST')
+    expect(copiedRequest.url).toBe('https://example.com/')
+  })
+
+  it('should validate URL is called during Request construction', () => {
+    const { Request: NextRequest } = moduleContext.runtime.context
+
+    new NextRequest('https://example.com')
+    expect(mockedValidateURL).toHaveBeenCalledWith('https://example.com')
+  })
+
+  it('should handle Request with body and headers correctly', () => {
+    const { Request: NextRequest } = moduleContext.runtime.context
+
+    const originalRequest = new NextRequest('https://example.com', {
+      method: 'POST',
+      body: 'test body',
+      headers: { 'Content-Type': 'application/json' },
+    })
+
+    const copiedRequest = new NextRequest(originalRequest)
+
+    expect(copiedRequest.method).toBe('POST')
+    expect(copiedRequest.headers.get('Content-Type')).toBe('application/json')
+  })
+
+  it('should throw Next.js specific error for relative URLs', () => {
+    const { Request: NextRequest } = moduleContext.runtime.context
+    expect(() => new NextRequest('/urls-b')).toThrow(
+      'Please use only absolute URLs'
+    )
+  })
+})

filename: packages/next/src/server/web/sandbox/context.ts
patch: @@ -406,8 +406,14 @@ Learn More: https://nextjs.org/docs/messages/edge-dynamic-code-evaluation`),
             typeof input !== 'string' && 'url' in input
               ? input.url
               : String(input)
-          validateURL(url)
-          super(url, init)
+
+          if (typeof input === 'string') {
+            validateURL(url)
+            super(input, init)
+          } else {
+            super(input, init)
+            validateURL(url)
+          }
           this.next = init?.next
         }
       }
Repository: electron/electron
Pull request: build: emphasize the need for a testcase in our issue template

#### Description of Change

Asking for repros is the biggest drain of time when triaging issues.

This PR changes the issue template to encourages developers to include repros without us having to ask.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none


Changed files:
filename: .github/ISSUE_TEMPLATE/bug_report.yml
patch: @@ -73,7 +73,7 @@ body:
 - type: input
   attributes:
     label: Testcase Gist URL
-    description: If you can reproduce the issue in a standalone test case, please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com) and put the gist URL here. This is **the best way** to ensure this issue is triaged quickly.
+    description: Electron maintainers need a standalone test case to reproduce and fix your issue. Please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com). Then put the gist URL here. Issues without testcase gists receive less attention and might be closed without a maintainer taking a closer look. To maximize how much attention your issue receives, please include a testcase gist right from the start.
     placeholder: https://gist.github.com/...
 - type: textarea
   attributes:
Repository: denoland/deno
Pull request: fix(ext/node): accept ArrayBuffer on crypto.timingSafeEqual

Fixes #30759

The buffer validation is based on Node.js implementation: https://github.com/nodejs/node/blob/591ba692bfe30408e6a67397e7d18bfa1b9c3561/src/crypto/crypto_util.h#L467-L472

Changed files:
filename: ext/node/polyfills/internal_binding/_timingSafeEqual.ts
patch: @@ -4,8 +4,29 @@
 // deno-lint-ignore-file prefer-primordials
 
 import { Buffer } from "node:buffer";
-import { ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH } from "ext:deno_node/internal/errors.ts";
-import { validateBuffer } from "ext:deno_node/internal/validators.mjs";
+import {
+  ERR_CRYPTO_TIMING_SAFE_EQUAL_LENGTH,
+  ERR_INVALID_ARG_TYPE,
+} from "ext:deno_node/internal/errors.ts";
+import { core } from "ext:core/mod.js";
+
+const {
+  isAnyArrayBuffer,
+  isArrayBufferView,
+} = core;
+
+function validateBuffer(
+  buf: unknown,
+  name: string,
+): asserts buf is ArrayBufferLike | ArrayBufferView {
+  if (!isAnyArrayBuffer(buf) && !isArrayBufferView(buf)) {
+    throw new ERR_INVALID_ARG_TYPE(
+      name,
+      ["Buffer", "ArrayBuffer", "TypedArray", "DataView"],
+      buf,
+    );
+  }
+}
 
 function toDataView(ab: ArrayBufferLike | ArrayBufferView): DataView {
   if (ArrayBuffer.isView(ab)) {

filename: tests/integration/node_unit_tests.rs
patch: @@ -68,6 +68,7 @@ util::unit_test_factory!(
     crypto_pbkdf2_test = crypto / crypto_pbkdf2_test,
     crypto_scrypt_test = crypto / crypto_scrypt_test,
     crypto_sign_test = crypto / crypto_sign_test,
+    crypto_timing_safe_equal_test = crypto / crypto_timing_safe_equal_test,
     events_test,
     dgram_test,
     domain_test,

filename: tests/unit_node/crypto/crypto_timing_safe_equal_test.ts
patch: @@ -0,0 +1,39 @@
+// Copyright 2018-2025 the Deno authors. MIT license.
+import * as crypto from "node:crypto";
+import { assertEquals, assertThrows } from "@std/assert";
+import { Buffer } from "node:buffer";
+
+Deno.test("timingSafeEqual ArrayBuffer and TypedArray", async () => {
+  const data = new TextEncoder().encode("foo"); // Uint8Array
+
+  const hash = await crypto.subtle.digest("SHA-256", data); // ArrayBuffer
+  const ui8a = new Uint8Array(hash); // Uint8Array
+
+  // @ts-ignore crypto.timingSafeEqual accepts ArrayBuffer
+  const eq = crypto.timingSafeEqual(hash, ui8a);
+  assertEquals(eq, true);
+});
+
+Deno.test("timingSafeEqual rejects non ArrayBuffer/TypedArray", () => {
+  const str = "foo";
+  const buf = Buffer.from(str);
+  const i = 123;
+
+  assertThrows(
+    () => {
+      // @ts-expect-error testing invalid input
+      crypto.timingSafeEqual(str, buf);
+    },
+    'TypeError: The "buf1" argument must be an instance of Buffer, ArrayBuffer, TypedArray, or DataView.' +
+      "Received type string ('foo')",
+  );
+
+  assertThrows(
+    () => {
+      // @ts-expect-error testing invalid input
+      crypto.timingSafeEqual(buf, i);
+    },
+    'TypeError: The "buf2" argument must be an instance of Buffer, ArrayBuffer, TypedArray, or DataView.' +
+      "Received type number (123)",
+  );
+});
Repository: ggml-org/llama.cpp
Pull request: server: Allow for longer prompts in q URL parameter

Resolves the larger part of #16830.

The current limit is 8192 characters. This is not enough for summarizing most articles worth summarizing. Doubling handles many. Quadrupling would arguably handle most.

Supporting web browser integration introduces security risks. If there were an exploit opportunity that opened up in llama-server, this could give the exploiter quadruple the space for an exploit. Furthermore, an exploit might not always require the user to have inadvisably exposed the server to a public network. If a prompt injection attack on a website isn't handled properly anywhere along the way to/from the LLM, *and* there's some exploitable code where it's mishandled, this change could presumably make this easier/possible to exploit.

It could be sufficient to include a warning somewhere along with advice for good practices which might include using a combination of a strict content blocker and only allowing prompts from trusted websites.

Changed files:
filename: tools/server/utils.hpp
patch: @@ -13,6 +13,8 @@
 #define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
 // increase backlog size to avoid connection resets for >> 1 slots
 #define CPPHTTPLIB_LISTEN_BACKLOG 512
+// increase max URI length to handle longer prompts in query string
+#define CPPHTTPLIB_REQUEST_URI_MAX_LENGTH 32768
 // disable Nagle's algorithm
 #define CPPHTTPLIB_TCP_NODELAY true
 #include <cpp-httplib/httplib.h>
Repository: nodejs/node
Pull request: doc: run license-builder

License is likely out of date. This is an automatically generated PR by the `license-builder.yml` GitHub Action, which runs `license-builder.sh` and submits a new PR or updates an existing PR.

Changed files:
filename: LICENSE
patch: @@ -1545,9 +1545,9 @@ The externally maintained libraries used by Node.js are:
 - zlib, located at deps/zlib, is licensed as follows:
   """
     zlib.h -- interface of the 'zlib' general purpose compression library
-    version 1.3.0.1, August xxth, 2023
+    version 1.3.1, January 22nd, 2024
 
-    Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler
+    Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
 
     This software is provided 'as-is', without any express or implied
     warranty.  In no event will the authors be held liable for any damages