helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: mlx: remove noisy error output from dynamic library loading

The recent change in #14322 added tryLoadByName() which attempts to load libmlxc.dylib via rpath before searching directories. This is an optimization for Homebrew installations where rpath is correctly set.

However, when rpath isn't set (which is the common case for app bundle installations), dlopen fails and the CHECK macro prints an error to stderr:

  ERROR - dynamic.c:21 - CHECK failed: handle->ctx != NULL

This error is misleading because it's an expected failure path - the code correctly falls back to searching the executable directory and loads the library successfully. The error message causes user confusion and makes it appear that something is broken.

Replace the CHECK macro with a simple return code so the C code fails silently. The Go code already handles error logging appropriately: tryLoadByName() fails silently (intentional fallback), while tryLoadFromDir() logs via slog.Error() when explicit path loading fails.

Changed files:
filename: x/mlxrunner/mlx/dynamic.c
patch: @@ -18,7 +18,9 @@
 
 static int mlx_dynamic_open(mlx_dynamic_handle* handle, const char* path) {
     handle->ctx = (void*) DLOPEN(path);
-    CHECK(handle->ctx != NULL);
+    if (handle->ctx == NULL) {
+        return 1;
+    }
     return 0;
 }
Repository: electron/electron
Pull request: build: add patch conflict resolution workflow with CI artifacts

#### Description of Change

This PR adds documentation and CI automation to streamline the patch conflict resolution workflow when fixing conflicts on branches with open PRs.

**Changes:**
1. **CLAUDE.md**: Added a new section documenting how to use CI-generated patch artifacts to resolve conflicts faster than running a full local sync. Includes commands for finding and downloading the artifact from a failed Apply Patches run, and guidance on fallback procedures.

2. **.github/workflows/apply-patches.yml**: Added a new workflow step that uploads a `update-patches.patch` artifact when the Apply Patches job fails. This artifact contains the resolved patch diff from CI's 3-way merge, allowing developers to quickly apply the fix without running `e sync --3` locally.

The workflow improvement reduces friction in the patch management process by leveraging CI's already-computed merge resolution.

#### Checklist

- [x] PR description included
- [x] Documentation updated (CLAUDE.md and workflow comments)
- [ ] `npm test` passes (N/A - documentation and workflow configuration only)
- [ ] tests are changed or added (N/A - no code logic changes)
- [ ] relevant API documentation updated (N/A)

#### Release Notes

Notes: none

Changed files:
filename: .github/workflows/apply-patches.yml
patch: @@ -71,3 +71,10 @@ jobs:
       uses: ./src/electron/.github/actions/checkout
       with:
         target-platform: linux
+    - name: Upload Patch Conflict Fix
+      if: ${{ failure() }}
+      uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+      with:
+        name: update-patches
+        path: patches/update-patches.patch
+        if-no-files-found: ignore

filename: CLAUDE.md
patch: @@ -127,6 +127,22 @@ patches/{target}/*.patch  →  [e sync --3]  →  target repo commits
 2. Create a git commit
 3. Run `e patches <target>` to export
 
+**Fixing patch conflicts on an existing PR:**
+
+If asked to fix a patch conflict on a branch that already has an open PR, check the PR's failed **Apply Patches** CI run for an `update-patches` artifact before running `e sync` locally. CI has already performed the 3-way merge and exported the resolved patch diff — applying it is much faster than a full local sync.
+
+```bash
+# Find the failed Apply Patches run for the PR and download the artifact
+gh run list --repo electron/electron --branch <pr-branch> --workflow "Apply Patches" --limit 1
+gh run download <run-id> --repo electron/electron --name update-patches
+
+# Apply the CI-generated fix, then push
+git am update-patches.patch
+git push
+```
+
+If no artifact exists (e.g. the 3-way merge itself failed), fall back to `e sync --3` and resolve manually.
+
 ## Testing
 
 **Test location:** `spec/` directory
Repository: nodejs/node
Pull request: src: handle null backing store in ArrayBufferViewContents::Read

added fallback stack_storage for null scenario

Fixes: https://github.com/nodejs/node/issues/62342

Changed files:
filename: src/util-inl.h
patch: @@ -591,7 +591,9 @@ void ArrayBufferViewContents<T, S>::Read(v8::Local<v8::ArrayBufferView> abv) {
   static_assert(sizeof(T) == 1, "Only supports one-byte data at the moment");
   length_ = abv->ByteLength();
   if (length_ > sizeof(stack_storage_) || abv->HasBuffer()) {
-    data_ = static_cast<T*>(abv->Buffer()->Data()) + abv->ByteOffset();
+    auto buf_data = abv->Buffer()->Data();
+    data_ = buf_data != nullptr ? static_cast<T*>(buf_data) + abv->ByteOffset()
+                                : stack_storage_;
   } else {
     abv->CopyContents(stack_storage_, sizeof(stack_storage_));
     data_ = stack_storage_;

filename: test/parallel/test-crypto-authenticated.js
patch: @@ -772,3 +772,26 @@ for (const test of TEST_CASES) {
     decipher.final();
   }, /Unsupported state or unable to authenticate data/);
 }
+
+// Refs: https://github.com/nodejs/node/issues/62342
+{
+  const key = crypto.randomBytes(16);
+  const nonce = crypto.randomBytes(13);
+
+  const cipher = crypto.createCipheriv('aes-128-ccm', key, nonce, {
+    authTagLength: 16,
+  });
+  cipher.setAAD(Buffer.alloc(0), { plaintextLength: 0 });
+  cipher.update(new DataView(new ArrayBuffer(0)));
+  cipher.final();
+  const tag = cipher.getAuthTag();
+  assert.strictEqual(tag.length, 16);
+
+  const decipher = crypto.createDecipheriv('aes-128-ccm', key, nonce, {
+    authTagLength: 16,
+  });
+  decipher.setAuthTag(tag);
+  decipher.setAAD(Buffer.alloc(0), { plaintextLength: 0 });
+  decipher.update(new DataView(new ArrayBuffer(0)));
+  decipher.final();
+}
Repository: ollama/ollama
Pull request: mlx: try loading library via rpath before searching directories

## Problem

The existing code in `x/mlxrunner/mlx/dynamic.go` manually searches directories for `libmlxc.*` and passes full paths to `dlopen`, bypassing the binary's rpath. This means MLX libraries installed via package managers (e.g., Homebrew) aren't found even when rpath is correctly set at link time.

## Solution

This PR adds a fallback that tries loading via rpath first (using just the library name), before falling back to the existing directory search. This follows standard Unix/macOS conventions and works with any installation that sets rpath.

## Changes

- Added `tryLoadByName()` function that attempts to load `libmlxc.dylib` (or `libmlxc.so` on Linux) using just the library name
- This allows the system to use rpath, `LD_LIBRARY_PATH`, or standard search paths
- Falls back to existing directory search if rpath loading fails

## Benefits

- **Homebrew users**: Works out of the box without requiring `OLLAMA_LIBRARY_PATH` environment variable
- **Other package managers**: Any installation that sets rpath correctly will work
- **No breaking changes**: Existing behavior (OLLAMA_LIBRARY_PATH, directory search) still works as fallback
- **Standards compliant**: Uses standard OS library loading mechanisms

## Testing

- Tested on macOS with Homebrew-installed mlx-c
- `ollama --version` no longer shows MLX warning
- Library loads correctly via rpath set at build time

Changed files:
filename: x/mlxrunner/mlx/dynamic.go
patch: @@ -55,6 +55,30 @@ func tryLoadFromDir(dir string) bool {
 	return false
 }
 
+// tryLoadByName attempts to load the library using just its name,
+// allowing the system to use rpath, LD_LIBRARY_PATH, or standard search paths.
+// Returns true if the library was successfully loaded.
+func tryLoadByName() bool {
+	libraryName := "libmlxc.dylib"
+	if runtime.GOOS == "linux" {
+		libraryName = "libmlxc.so"
+	}
+
+	cPath := C.CString(libraryName)
+	defer C.free(unsafe.Pointer(cPath))
+
+	var handle C.mlx_dynamic_handle
+	if C.mlx_dynamic_load(&handle, cPath) != 0 {
+		return false
+	}
+	if C.mlx_dynamic_load_symbols(handle) != 0 {
+		C.mlx_dynamic_unload(&handle)
+		return false
+	}
+
+	return true
+}
+
 func init() {
 	switch runtime.GOOS {
 	case "darwin":
@@ -73,6 +97,11 @@ func init() {
 		}
 	}
 
+	// Try loading via rpath/standard library search
+	if tryLoadByName() {
+		return
+	}
+
 	// Build search paths: executable directory, then build directories
 	var searchDirs []string
 	if exe, err := os.Executable(); err == nil {
Repository: electron/electron
Pull request: build: upload patch conflict fix as CI artifact

Backport of #50235 and #50251

See those PRs for details. CLAUDE.md hunk dropped — that file doesn't exist on this branch.

Notes: none

Changed files:
filename: .github/workflows/apply-patches.yml
patch: @@ -71,3 +71,11 @@ jobs:
       uses: ./src/electron/.github/actions/checkout
       with:
         target-platform: linux
+    - name: Upload Patch Conflict Fix
+      if: ${{ failure() }}
+      uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
+      with:
+        name: update-patches
+        path: patches/update-patches.patch
+        if-no-files-found: ignore
+        archive: false
Repository: vercel/next.js
Pull request: Turbopack: Merge release-with-assertions-no-lto profile into release-with-assertions

- More profiles means more bloat to the `target` directory and more cold builds.
- There's no practical use case where we'd be okay with the performance hit of `debug-assertions` and not okay with the performance hit of `lto = false`. Neither profile was suitable for benchmarking.
- `release-with-assertions-no-lto` is too long to type and was giving me carpal tunnel.

Changed files:
filename: Cargo.toml
patch: @@ -271,16 +271,17 @@ opt-level = "s"
 [profile.release.package.miette]
 opt-level = "s"
 
-
-# Use a custom profile for CI where many tests are performance sensitive but we still want the additional validation of debug-assertions
+# Use a custom profile for CI or local testing where we are somewhat performance
+# sensitive but we still want the additional validation of debug-assertions.
+#
+# This is not suitable for benchmarking, as debug assertions worsen performance
+# and we disable LTO.
 [profile.release-with-assertions]
 inherits = "release"
 debug-assertions = true
 overflow-checks = true
-
-# Like release-with-assertions but without LTO for faster test binary linking
-[profile.release-with-assertions-no-lto]
-inherits = "release-with-assertions"
+# Thin-LTO can make the binary ~5-10% faster, but it can make our build take a
+# couple more minutes, so it's not worth it for most test scenarios.
 lto = false
 
 [profile.release-with-debug]

filename: packages/next-swc/package.json
patch: @@ -20,7 +20,7 @@
     "rust-check-doc": "RUSTDOCFLAGS='-Zunstable-options --output-format=json' cargo doc --no-deps --workspace",
     "rust-check-fmt": "cd ../..; cargo fmt -- --check",
     "rust-check-napi": "cargo check -p next-napi-bindings",
-    "test-cargo-unit": "cargo nextest run --workspace --exclude next-napi-bindings --exclude turbo-tasks-macros --cargo-profile release-with-assertions-no-lto --no-fail-fast"
+    "test-cargo-unit": "cargo nextest run --workspace --exclude next-napi-bindings --exclude turbo-tasks-macros --cargo-profile release-with-assertions --no-fail-fast"
   },
   "napi": {
     "name": "next-swc",
Repository: facebook/react
Pull request: [Perf Tracks] Handle function names that aren't strings

Closes https://github.com/facebook/react/issues/35652

Tests are not useful here since Jest seems to get in the way. You can validate manually in the Browser console though with `class Foo { static name = {} }` and
```
{
  const x = [];

  const cursor = () => {
    return new Proxy(() => x, { get() { return cursor(); }});
  };

  cursor().name + "() {}"
}
```

Changed files:
filename: packages/shared/ReactPerformanceTrackProperties.js
patch: @@ -253,10 +253,15 @@ export function addValueToProperties(
         return;
       }
     case 'function':
-      if (value.name === '') {
+      const functionName = value.name;
+      if (
+        functionName === '' ||
+        // e.g. proxied functions or classes with a static property "name" that's not a string
+        typeof functionName !== 'string'
+      ) {
         desc = '() => {}';
       } else {
-        desc = value.name + '() {}';
+        desc = functionName + '() {}';
       }
       break;
     case 'string':
Repository: ollama/ollama
Pull request: install: prevent partial download script execution

Wrap script in main function so that a truncated partial download doesn't end up executing half a script.

Changed files:
filename: scripts/install.sh
patch: @@ -2,6 +2,10 @@
 # This script installs Ollama on Linux and macOS.
 # It detects the current operating system architecture and installs the appropriate version of Ollama.
 
+# Wrap script in main function so that a truncated partial download doesn't end
+# up executing half a script.
+main() {
+
 set -eu
 
 red="$( (/usr/bin/tput bold || :; /usr/bin/tput setaf 1 || :) 2>&-)"
@@ -446,3 +450,6 @@ fi
 
 status "NVIDIA GPU ready."
 install_success
+}
+
+main
Repository: rust-lang/rust
Pull request: [beta] update stage0 and cargo

Update stage0 to 1.94.0

<https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday>

---

Update cargo submodule rust-lang/rust#153515

2 commits in f298b8c82da0cba538516b45b04a480fc501d4c0..e8eb8435d5cad936237a1ee798c2f983624d0825
2026-02-24 21:59:20 +0000 to 2026-03-06 12:51:00 -0600
- [beta-1.95] Add missing truncate when writing .crate files (rust-lang/cargo#16713)
- [beta 1.95] backport test fixes (rust-lang/cargo#16715)

Changed files:
filename: src/tools/cargo
patch: @@ -1 +1 @@
-Subproject commit f298b8c82da0cba538516b45b04a480fc501d4c0
+Subproject commit e8eb8435d5cad936237a1ee798c2f983624d0825
Repository: facebook/react
Pull request: [tests] Fix ReactDOMAttribute-test

In https://github.com/facebook/react/pull/35646 I thought there was a bug in trusted types, but the bug is in jsdom. 

For trusted types we still want to check the coersion and throw for a good dev warning, but prod will also throw becuase the browser will implicitly coerce to a string. This ensures there's no behavior difference between dev and prod.

So the right fix is to add in the JSDOM hack that's used in `ReactDOMSelect-test.js`.

Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMAttribute-test.js
patch: @@ -9,6 +9,13 @@
 
 'use strict';
 
+// Fix JSDOM. setAttribute is supposed to throw on things that can't be implicitly toStringed.
+const setAttribute = Element.prototype.setAttribute;
+Element.prototype.setAttribute = function (name, value) {
+  // eslint-disable-next-line react-internal/safe-string-coercion
+  return setAttribute.call(this, name, '' + value);
+};
+
 describe('ReactDOM unknown attribute', () => {
   let React;
   let ReactDOMClient;
@@ -171,13 +178,7 @@ describe('ReactDOM unknown attribute', () => {
       const test = () =>
         testUnknownAttributeAssignment(new TemporalLike(), null);
 
-      if (gate('enableTrustedTypesIntegration') && !__DEV__) {
-        // TODO: this still throws in DEV even though it's not toString'd in prod.
-        await expect(test).rejects.toThrowError('2020-01-01');
-      } else {
-        await expect(test).rejects.toThrowError(new TypeError('prod message'));
-      }
-
+      await expect(test).rejects.toThrowError(new TypeError('prod message'));
       assertConsoleErrorDev([
         'The provided `unknown` attribute is an unsupported type TemporalLike.' +
           ' This value must be coerced to a string before using it here.\n' +

filename: packages/shared/CheckStringCoercion.js
patch: @@ -76,8 +76,6 @@ export function checkAttributeStringCoercion(
   attributeName: string,
 ): void | string {
   if (__DEV__) {
-    // TODO: for enableTrustedTypesIntegration we don't toString this
-    //       so we shouldn't need the DEV warning.
     if (willCoercionThrow(value)) {
       console.error(
         'The provided `%s` attribute is an unsupported type %s.' +
Repository: vercel/next.js
Pull request: disable bmi2 in qfilter

Fixes #91708 

set the legacy_x86_64_support feature on qfilter to support older intel cpus

Changed files:
filename: turbopack/crates/turbo-persistence/Cargo.toml
patch: @@ -26,7 +26,8 @@ memmap2 = "0.9.5"
 nohash-hasher = { workspace = true }
 parking_lot = { workspace = true }
 pot = "3.0.0"
-qfilter = { version = "0.3.0-alpha.2", features = ["serde"] }
+# See https://github.com/vercel/next.js/issues/91708 for why we need the legacy_x86_64_support feature
+qfilter = { version = "0.3.0-alpha.2", features = ["serde", "legacy_x86_64_support"] }
 quick_cache = { workspace = true }
 rustc-hash = { workspace = true }
 smallvec = { workspace = true }
Repository: facebook/react
Pull request: [Perf Tracks] Use minus (`-`) instead of en dash for removed props

Stacked on https://github.com/facebook/react/pull/35648

The [en dash is used for number ranges or connections](https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use).

This seems not suitable for a diff. Our hydration diffs also use a minus symbol instead of en dash for removed lines. git-diff also uses minus.

Changed files:
filename: packages/react-reconciler/src/__tests__/ReactPerformanceTrack-test.js
patch: @@ -231,7 +231,7 @@ describe('ReactPerformanceTracks', () => {
               properties: [
                 ['Changed Props', ''],
                 ['  data', ''],
-                ['–   buffer', 'null'],
+                ['-   buffer', 'null'],
                 ['+   buffer', 'Uint8Array'],
                 ['+     0', '0'],
                 ['+     1', '0'],
@@ -422,7 +422,7 @@ describe('ReactPerformanceTracks', () => {
               color: 'error',
               properties: [
                 ['Changed Props', ''],
-                ['– value', '1'],
+                ['- value', '1'],
                 ['+ value', '2'],
               ],
               tooltipText: 'Left',
@@ -510,7 +510,7 @@ describe('ReactPerformanceTracks', () => {
                 ['  data', ''],
                 ['    deeply', ''],
                 ['      nested', ''],
-                ['–       numbers', 'Array'],
+                ['-       numbers', 'Array'],
                 ['+       numbers', 'Array'],
               ],
               tooltipText: 'App',

filename: packages/shared/ReactPerformanceTrackProperties.js
patch: @@ -279,7 +279,7 @@ export function addValueToProperties(
   properties.push([prefix + '\xa0\xa0'.repeat(indent) + propertyName, desc]);
 }
 
-const REMOVED = '\u2013\xa0';
+const REMOVED = '-\xa0';
 const ADDED = '+\xa0';
 const UNCHANGED = '\u2007\xa0';
Repository: nodejs/node
Pull request: lib: fix typo in esm worker loader hook comment

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: lib/internal/modules/esm/worker.js
patch: @@ -37,7 +37,7 @@ const { isCascadedLoaderInitialized, getOrInitializeCascadedLoader } = require('
 const { AsyncLoaderHooksOnLoaderHookWorker } = require('internal/modules/esm/hooks');
 
 /**
- * Register asynchronus module loader customization hooks. This should only be run in the loader
+ * Register asynchronous module loader customization hooks. This should only be run in the loader
  * hooks worker. In a non-loader-hooks thread, if any asynchronous loader hook is registered, the
  * ModuleLoader#asyncLoaderHooks are initialized to be AsyncLoaderHooksProxiedToLoaderHookWorker
  * which posts the messages to the async loader hook worker thread.
Repository: facebook/react
Pull request: Convert ReactFreshMultipleRenderer to createRoot


Changed files:
filename: packages/react-refresh/src/__tests__/ReactFreshMultipleRenderer-test.internal.js
patch: @@ -16,7 +16,8 @@ if (__DEV__) {
   ReactFreshRuntime = require('react-refresh/runtime');
   ReactFreshRuntime.injectIntoGlobalHook(global);
 }
-const ReactDOM = require('react-dom');
+const ReactDOMClient = require('react-dom/client');
+const act = require('internal-test-utils').act;
 
 jest.resetModules();
 const ReactART = require('react-art');
@@ -41,7 +42,7 @@ describe('ReactFresh', () => {
     }
   });
 
-  it('can update components managed by different renderers independently', () => {
+  it('can update components managed by different renderers independently', async () => {
     if (__DEV__) {
       const InnerV1 = function () {
         return <ReactART.Shape fill="blue" />;
@@ -59,7 +60,10 @@ describe('ReactFresh', () => {
       };
       ReactFreshRuntime.register(OuterV1, 'Outer');
 
-      ReactDOM.render(<OuterV1 />, container);
+      const root = ReactDOMClient.createRoot(container);
+      await act(() => {
+        root.render(<OuterV1 />);
+      });
       const el = container.firstChild;
       const pathEl = el.querySelector('path');
       expect(el.style.color).toBe('blue');
Repository: facebook/react
Pull request: [Flight] Fix markup types for server references

Follow-up to https://github.com/facebook/react/pull/35632/changes/d5324f41438fd58d01d5a5c2d6e4775872775b41

Flow narrows the `ServerReferenceId` to a `string` due to `typeof` check and then it can't assign the narrowed value to an opaque type.

Instead we don't make `ServerReferenceId` opaque like for the other configs.

Changed files:
filename: packages/react-client/src/forks/ReactFlightClientConfig.markup.js
patch: @@ -18,7 +18,7 @@ export * from 'react-client/src/ReactClientConsoleConfigPlain';
 export type ModuleLoading = null;
 export type ServerConsumerModuleMap = null;
 export opaque type ServerManifest = null;
-export opaque type ServerReferenceId = string;
+export type ServerReferenceId = string;
 export opaque type ClientReferenceMetadata = null;
 export opaque type ClientReference<T> = null; // eslint-disable-line no-unused-vars
 
@@ -43,7 +43,7 @@ export function resolveClientReference<T>(
 
 export function resolveServerReference<T>(
   config: ServerManifest,
-  id: mixed,
+  id: ServerReferenceId,
 ): ClientReference<T> {
   throw new Error(
     'renderToHTML should not have emitted Server References. This is a bug in React.',

filename: packages/react-server/src/ReactFlightActionServer.js
patch: @@ -46,7 +46,7 @@ function bindArgs(fn: any, args: any) {
 function loadServerReference<T>(
   bundlerConfig: ServerManifest,
   metaData: {
-    id: string,
+    id: ServerReferenceId,
     bound: null | Promise<Array<any>>,
   },
 ): Promise<T> {