helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: fix : Dangling pointer for non-empty trigger words in lazy grammar construction

Fix on issue #17047.

Added `static` keyword, to not let the pointer be out of scope. However, my understanding of this functionality in cpp is poor, so happy to be corrected with some better engineering.

To consider: Isn't `static` also needed on line 1631, when constructing `trigger_pattern`?


Changed files:
filename: src/llama-sampling.cpp
patch: @@ -4,6 +4,7 @@
 #include "llama-vocab.h"
 #include "llama-grammar.h"
 
+#include <array>
 #include <algorithm>
 #include <cassert>
 #include <cfloat>
@@ -1625,10 +1626,12 @@ static struct llama_sampler * llama_sampler_init_grammar_impl(
     auto * ctx = new llama_sampler_grammar;
 
     if (grammar_str != nullptr && grammar_str[0] != '\0') {
+        std::string trigger_pattern;
+        llama_grammar * grammar = nullptr;
         // TODO: remove trigger_words support.
         if (trigger_words != nullptr && num_trigger_words > 0) {
             GGML_ASSERT(trigger_patterns == nullptr && num_trigger_patterns == 0);
-            std::string trigger_pattern("[\\s\\S]*?(");
+            trigger_pattern = "[\\s\\S]*?(";
             for (size_t i = 0; i < num_trigger_words; ++i) {
                 static const std::regex special_chars("[.^$|()*+?\\[\\]{}\\\\]");
                 if (i > 0) {
@@ -1637,15 +1640,17 @@ static struct llama_sampler * llama_sampler_init_grammar_impl(
                 trigger_pattern += std::regex_replace(trigger_words[i], special_chars, "\\$0");
             }
             trigger_pattern += ")[\\s\\S]*";
-            const auto * trigger_pattern_c = trigger_pattern.c_str();
-            trigger_patterns = &trigger_pattern_c;
-            num_trigger_patterns = 1;
+
+            std::array<const char *, 1> tmp_trigger_patterns = { trigger_pattern.c_str() };
+            grammar = llama_grammar_init_impl(vocab, grammar_str, grammar_root, lazy, tmp_trigger_patterns.data(), tmp_trigger_patterns.size(), trigger_tokens, num_trigger_tokens);
+        } else {
+            grammar = llama_grammar_init_impl(vocab, grammar_str, grammar_root, lazy, trigger_patterns, num_trigger_patterns, trigger_tokens, num_trigger_tokens);
         }
         *ctx = {
             /* .vocab        = */ vocab,
             /* .grammar_str  = */ grammar_str,
             /* .grammar_root = */ grammar_root,
-            /* .grammar      = */ llama_grammar_init_impl(vocab, grammar_str, grammar_root, lazy, trigger_patterns, num_trigger_patterns, trigger_tokens, num_trigger_tokens),
+            /* .grammar      = */ grammar,
         };
         if (!ctx->grammar) {
             delete ctx;
Repository: ollama/ollama
Pull request: fix(test): use real version string for comparison

nix passes in the any configured build flags to test which means it's being run with, among other things, `ldflags`, e.g.:

```
go test -v -ldflags='-X github.com/jmorganca/ollama/version.Version=x.y.z' ./...
```

resolves #1613 

Changed files:
filename: server/routes_test.go
patch: @@ -16,6 +16,7 @@ import (
 
 	"github.com/jmorganca/ollama/api"
 	"github.com/jmorganca/ollama/parser"
+	"github.com/jmorganca/ollama/version"
 )
 
 func setupServer(t *testing.T) (*Server, error) {
@@ -71,7 +72,7 @@ func Test_Routes(t *testing.T) {
 				assert.Equal(t, contentType, "application/json; charset=utf-8")
 				body, err := io.ReadAll(resp.Body)
 				assert.Nil(t, err)
-				assert.Equal(t, `{"version":"0.0.0"}`, string(body))
+				assert.Equal(t, fmt.Sprintf(`{"version":"%s"}`, version.Version), string(body))
 			},
 		},
 		{
Repository: ollama/ollama
Pull request: Add Langchain Dart library


Changed files:
filename: README.md
patch: @@ -285,6 +285,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [OllamaKit for Swift](https://github.com/kevinhermawan/OllamaKit)
 - [Ollama for Dart](https://github.com/breitburg/dart-ollama)
 - [Ollama for Laravel](https://github.com/cloudstudio/ollama-laravel)
+- [LangChainDart](https://github.com/davidmigloz/langchain_dart)
 
 ### Mobile
Repository: ggml-org/llama.cpp
Pull request: server : fix "can batch with" bug

While looking into #17260, found this error in the logic:

The `slot_batched` could end up being released (for example if the prompt does not fit into the context). The fix is to set `slot_batched` ptr only after we have actually queued any tokens for that slot.

Changed files:
filename: tools/server/server.cpp
patch: @@ -3591,13 +3591,13 @@ struct server_context {
         // next, batch any pending prompts without exceeding n_batch
         if (params_base.cont_batching || batch.n_tokens == 0) {
             for (auto & slot : slots) {
+                if (!slot.is_processing()) {
+                    continue;
+                }
+
                 // check if we can batch this slot with the previous one
-                if (slot.is_processing()) {
-                    if (!slot_batched) {
-                        slot_batched = &slot;
-                    } else if (!slot_batched->can_batch_with(slot)) {
-                        continue;
-                    }
+                if (slot_batched && !slot_batched->can_batch_with(slot)) {
+                    continue;
                 }
 
                 // this slot still has a prompt to be processed
@@ -4028,6 +4028,10 @@ struct server_context {
                     }
                 }
 
+                if (!slot_batched) {
+                    slot_batched = &slot;
+                }
+
                 if (batch.n_tokens >= n_batch) {
                     break;
                 }
Repository: electron/electron
Pull request: fix: set `XDG_CURRENT_DESKTOP` env var back to original value before invoking xdg utils

Backport of #45310

See that PR for details.


Notes: Fixed `electron.shell.openExternal` and `electron.shell.openPath` to honor user-defined system defaults on Linux


Changed files:
filename: shell/common/platform_util_linux.cc
patch: @@ -15,6 +15,7 @@
 
 #include "base/cancelable_callback.h"
 #include "base/containers/contains.h"
+#include "base/containers/map_util.h"
 #include "base/environment.h"
 #include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
@@ -58,6 +59,8 @@ const char kFreedesktopPortalName[] = "org.freedesktop.portal.Desktop";
 const char kFreedesktopPortalPath[] = "/org/freedesktop/portal/desktop";
 const char kFreedesktopPortalOpenURI[] = "org.freedesktop.portal.OpenURI";
 
+const char kOriginalXdgCurrentDesktopEnvVar[] = "ORIGINAL_XDG_CURRENT_DESKTOP";
+
 const char kMethodOpenDirectory[] = "OpenDirectory";
 
 class ShowItemHelper {
@@ -282,6 +285,12 @@ bool XDGUtil(const std::vector<std::string>& argv,
     base::nix::CreateLaunchOptionsWithXdgActivation(base::BindOnce(
         [](base::RepeatingClosure quit_loop, base::LaunchOptions* options_out,
            base::LaunchOptions options) {
+          // Correct the XDG_CURRENT_DESKTOP environment variable before calling
+          // XDG, in case it was changed for compatibility.
+          if (const auto* orig = base::FindOrNull(
+                  options.environment, kOriginalXdgCurrentDesktopEnvVar))
+            options.environment.emplace(base::nix::kXdgCurrentDesktopEnvVar,
+                                        *orig);
           *options_out = std::move(options);
           std::move(quit_loop).Run();
         },
Repository: ollama/ollama
Pull request: Added cmdh to community section in README

Added a link to my terminal application cmdh, which lets you request linux commands using an LLM (https://github.com/pgibler/cmdh). I just added ollama support today. The tl;dr is it sends your command request to the LLM which outputs a terminal command that matches the request. You can then use a hotkey to run the command. It's saved me hours of looking through documentation and can push out pretty complex results.

Thank you for creating & maintaining ollama!

Changed files:
filename: README.md
patch: @@ -261,6 +261,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [ogpt.nvim](https://github.com/huynle/ogpt.nvim)
 - [gptel Emacs client](https://github.com/karthink/gptel)
 - [Oatmeal](https://github.com/dustinblackman/oatmeal)
+- [cmdh](https://github.com/pgibler/cmdh)
 
 ### Database
Repository: vercel/next.js
Pull request: Include prerender interrupted error in unstable_rethrow

Prerender interrupted errors are part of the control flow for Next.js applications and aren't intended to be caught by user code. Since we can't avoid it we need to include it in the rethrow API.

Changed files:
filename: packages/next/src/client/components/unstable-rethrow.server.ts
patch: @@ -2,7 +2,10 @@ import { isHangingPromiseRejectionError } from '../../server/dynamic-rendering-u
 import { isPostpone } from '../../server/lib/router-utils/is-postpone'
 import { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'
 import { isNextRouterError } from './is-next-router-error'
-import { isDynamicPostpone } from '../../server/app-render/dynamic-rendering'
+import {
+  isDynamicPostpone,
+  isPrerenderInterruptedError,
+} from '../../server/app-render/dynamic-rendering'
 import { isDynamicServerError } from './hooks-server-context'
 
 export function unstable_rethrow(error: unknown): void {
@@ -12,7 +15,8 @@ export function unstable_rethrow(error: unknown): void {
     isDynamicServerError(error) ||
     isDynamicPostpone(error) ||
     isPostpone(error) ||
-    isHangingPromiseRejectionError(error)
+    isHangingPromiseRejectionError(error) ||
+    isPrerenderInterruptedError(error)
   ) {
     throw error
   }
Repository: nodejs/node
Pull request: benchmark: reduce N for diagnostics_channel subscribe benchmark

<!--
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: benchmark/diagnostics_channel/subscribe.js
patch: @@ -3,17 +3,16 @@ const common = require('../common.js');
 const dc = require('diagnostics_channel');
 
 const bench = common.createBenchmark(main, {
-  n: [1e8],
+  n: [1e5],
 });
 
-function noop() {}
+function noop() { }
 
 function main({ n }) {
-  const channel = dc.channel('channel.0');
 
   bench.start();
   for (let i = 0; i < n; i++) {
-    channel.subscribe(noop);
+    dc.subscribe('channel.0', noop);
   }
   bench.end(n);
 }
Repository: ollama/ollama
Pull request: README with Enchanted iOS App

I have just released iOS mobile App for Ollama and wanted to share with the community. A lot of improvements are coming up soon.

Changed files:
filename: README.md
patch: @@ -286,7 +286,8 @@ See the [API documentation](./docs/api.md) for all endpoints.
 
 ### Mobile
 
-- [Maid](https://github.com/danemadsen/Maid) (Mobile Artificial Intelligence Distribution)
+- [Enchanted](https://github.com/AugustDev/enchanted)
+- [Maid](https://github.com/danemadsen/Maid)
 
 ### Extensions & Plugins
Repository: vercel/next.js
Pull request: [turbopack] Attempt #2 at making rust-analyzer happy with our macros

We are experiencing https://github.com/rust-lang/rust-analyzer/issues/19993 and Rust Analyzer is complaining about our macro gencode.  After some trial and error i determined the issue was our use of the `concat!` and specifically the inclusion of the crate name macro so this works around that.

Apparently Rust Analyzers implementation of concat! or maybe token tree parsing can get confused by string literals with `-` characters in them.  Simply avoiding that for rust analyzer is a reasonable short term workaround


Closes PACK-5410

Changed files:
filename: turbopack/crates/turbo-tasks-macros/src/global_name.rs
patch: @@ -5,7 +5,7 @@ use quote::quote;
 ///
 /// The name is prefixed with the current crate name and module path
 pub(crate) fn global_name(local_name: impl quote::ToTokens) -> TokenStream {
-    let crate_name =
-        std::env::var("CARGO_PKG_NAME").unwrap_or_else(|_| "unknown_crate".to_string());
-    quote! { concat!(#crate_name, "@", module_path!(), "::", #local_name)}
+    quote! {
+        turbo_tasks::macro_helpers::global_name!(#local_name)
+    }
 }

filename: turbopack/crates/turbo-tasks/src/macro_helpers.rs
patch: @@ -12,7 +12,7 @@ use crate::{
     ValueTypeId, Vc, debug::ValueDebugFormatString, task::TaskOutput,
 };
 pub use crate::{
-    inventory_submit,
+    global_name, inventory_submit,
     magic_any::MagicAny,
     manager::{find_cell_by_type, notify_scheduled_tasks, spawn_detached_for_testing},
     native_function::{
@@ -199,3 +199,22 @@ macro_rules! inventory_submit {
 /// Exported so the above macro can reference it.
 #[doc(hidden)]
 pub use inventory::submit as inventory_submit_inner;
+
+/// Define a global name for a turbo-tasks value.
+#[cfg(not(rust_analyzer))] // ignore-rust-analyzer due to https://github.com/rust-lang/rust-analyzer/issues/19993
+#[macro_export]
+macro_rules! global_name {
+    ($($item:tt)*) => {
+
+        ::std::concat!(::std::env!("CARGO_PKG_NAME"), "@", ::std::module_path!(), "::", $($item)*)
+    }
+}
+/// Define a global name for a turbo-tasks value.
+/// This has a dummy implementation for Rust Analyzer to avoid https://github.com/rust-lang/rust-analyzer/issues/19993
+#[cfg(rust_analyzer)]
+#[macro_export]
+macro_rules! global_name {
+    ($($item:tt)*) => {
+        $($item)*
+    }
+}
Repository: ollama/ollama
Pull request: Added Bionic GPT as a front end.


Changed files:
filename: README.md
patch: @@ -239,7 +239,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 ## Community Integrations
 
 ### Web & Desktop
-
+- [Bionic GPT](https://github.com/bionic-gpt/bionic-gpt)
 - [HTML UI](https://github.com/rtcfirefly/ollama-ui)
 - [Chatbot UI](https://github.com/ivanfioravanti/chatbot-ollama)
 - [Typescript UI](https://github.com/ollama-interface/Ollama-Gui?tab=readme-ov-file)
Repository: ggml-org/llama.cpp
Pull request: readme : add RVV,ZVFH,ZFH,ZICBOP support for RISC-V


Changed files:
filename: .github/copilot-instructions.md
patch: @@ -9,7 +9,7 @@ llama.cpp is a large-scale C/C++ project for efficient LLM (Large Language Model
 - **Size**: ~200k+ lines of code across 1000+ files
 - **Architecture**: Modular design with main library (`libllama`) and 40+ executable tools/examples
 - **Core dependency**: ggml tensor library (vendored in `ggml/` directory)
-- **Backends supported**: CPU (AVX/NEON optimized), CUDA, Metal, Vulkan, SYCL, ROCm, MUSA
+- **Backends supported**: CPU (AVX/NEON/RVV optimized), CUDA, Metal, Vulkan, SYCL, ROCm, MUSA
 - **License**: MIT
 
 ## Build Instructions

filename: README.md
patch: @@ -61,6 +61,7 @@ range of hardware - locally and in the cloud.
 - Plain C/C++ implementation without any dependencies
 - Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks
 - AVX, AVX2, AVX512 and AMX support for x86 architectures
+- RVV, ZVFH, ZFH and ZICBOP support for RISC-V architectures
 - 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use
 - Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)
 - Vulkan and SYCL backend support
Repository: ollama/ollama
Pull request: update required go version

go 1.21 is required to build ollama, update the go.mod to reflect this

resolves #1515 

Changed files:
filename: cmd/cmd.go
patch: @@ -19,14 +19,14 @@ import (
 	"path/filepath"
 	"regexp"
 	"runtime"
-	"slices"
 	"strings"
 	"syscall"
 	"time"
 
 	"github.com/olekukonko/tablewriter"
 	"github.com/spf13/cobra"
 	"golang.org/x/crypto/ssh"
+	"golang.org/x/exp/slices"
 	"golang.org/x/term"
 
 	"github.com/jmorganca/ollama/api"
Repository: vercel/next.js
Pull request: [turbopack] enable the signal feature of `nix`

This is needed by `prepared_app.rs` to manage subprocesses.  Without this we are seeing build breakages in CI e.g https://github.com/vercel/next.js/runs/49662155436

This was triggered by the nix upgrade in #83414 



Closes PACK-5412

Changed files:
filename: turbopack/crates/turbopack-bench/Cargo.toml
patch: @@ -40,4 +40,4 @@ turbopack-create-test-app = { workspace = true }
 url = { workspace = true }
 
 [target.'cfg(unix)'.dependencies]
-nix = "0.30.1"
+nix = { version="0.30.1", features=["signal"] }
Repository: denoland/deno
Pull request: ci: fix issue triage workflow


Changed files:
filename: .github/workflows/issue_triage.yml
patch: @@ -15,6 +15,7 @@ jobs:
     if: github.event_name == 'workflow_dispatch' || (github.event.issue.author_association != 'MEMBER' && github.event.issue.author_association != 'OWNER')
     runs-on: ubuntu-latest
     permissions:
+      contents: read
       issues: write
       id-token: write
     steps:
Repository: huggingface/transformers
Pull request: Fix parent classes of ProcessingKwargs

# What does this PR do?

The parent classes of `ProcessingKwargs` look incorrect.


Changed files:
filename: src/transformers/processing_utils.py
patch: @@ -332,7 +332,7 @@ class CommonKwargs(TypedDict, total=False):
     return_tensors: Optional[Union[str, TensorType]]
 
 
-class ProcessingKwargs(TextKwargs, ImagesKwargs, VideosKwargs, AudioKwargs, CommonKwargs, total=False):
+class ProcessingKwargs(TypedDict, total=False):
     """
     Base class for kwargs passing to processors.
     A model should have its own `ModelProcessorKwargs` class that inherits from `ProcessingKwargs` to provide:
Repository: ollama/ollama
Pull request: add API tests for list handler

This change adds some tests for the `GET /api/list` endpoint. It includes a test that gets no models, and one that returns a single entry.

Changed files:
filename: server/routes_test.go
patch: @@ -2,12 +2,19 @@ package server
 
 import (
 	"context"
+	"encoding/json"
+	"fmt"
 	"io"
 	"net/http"
 	"net/http/httptest"
+	"os"
+	"strings"
 	"testing"
 
 	"github.com/stretchr/testify/assert"
+
+	"github.com/jmorganca/ollama/api"
+	"github.com/jmorganca/ollama/parser"
 )
 
 func setupServer(t *testing.T) (*Server, error) {
@@ -40,6 +47,55 @@ func Test_Routes(t *testing.T) {
 				assert.Equal(t, `{"version":"0.0.0"}`, string(body))
 			},
 		},
+		{
+			Name:   "Tags Handler (no tags)",
+			Method: http.MethodGet,
+			Path:   "/api/tags",
+			Expected: func(t *testing.T, resp *http.Response) {
+				contentType := resp.Header.Get("Content-Type")
+				assert.Equal(t, contentType, "application/json; charset=utf-8")
+				body, err := io.ReadAll(resp.Body)
+				assert.Nil(t, err)
+
+				var modelList api.ListResponse
+
+				err = json.Unmarshal(body, &modelList)
+				assert.Nil(t, err)
+
+				assert.Equal(t, 0, len(modelList.Models))
+			},
+		},
+		{
+			Name:   "Tags Handler (yes tags)",
+			Method: http.MethodGet,
+			Path:   "/api/tags",
+			Setup: func(t *testing.T, req *http.Request) {
+				f, err := os.CreateTemp("", "ollama-modelfile")
+				assert.Nil(t, err)
+				defer os.RemoveAll(f.Name())
+
+				modelfile := strings.NewReader(fmt.Sprintf("FROM %s", f.Name()))
+				commands, err := parser.Parse(modelfile)
+				assert.Nil(t, err)
+				fn := func(resp api.ProgressResponse) {}
+				err = CreateModel(context.TODO(), "test", "", commands, fn)
+				assert.Nil(t, err)
+			},
+			Expected: func(t *testing.T, resp *http.Response) {
+				contentType := resp.Header.Get("Content-Type")
+				assert.Equal(t, contentType, "application/json; charset=utf-8")
+				body, err := io.ReadAll(resp.Body)
+				assert.Nil(t, err)
+
+				var modelList api.ListResponse
+
+				err = json.Unmarshal(body, &modelList)
+				assert.Nil(t, err)
+
+				assert.Equal(t, 1, len(modelList.Models))
+				assert.Equal(t, modelList.Models[0].Name, "test:latest")
+			},
+		},
 	}
 
 	s, err := setupServer(t)
@@ -50,6 +106,11 @@ func Test_Routes(t *testing.T) {
 	httpSrv := httptest.NewServer(router)
 	t.Cleanup(httpSrv.Close)
 
+	workDir, err := os.MkdirTemp("", "ollama-test")
+	assert.Nil(t, err)
+	defer os.RemoveAll(workDir)
+	os.Setenv("OLLAMA_MODELS", workDir)
+
 	for _, tc := range testCases {
 		u := httpSrv.URL + tc.Path
 		req, err := http.NewRequestWithContext(context.TODO(), tc.Method, u, nil)
Repository: facebook/react
Pull request: compiler: fix accidental propagation of function effects from StartMemoize/FinishMemoize

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #29154
* #29151

By default, React Compiler will skip compilation if it cannot preserve existing memoization. Ie, if the code has an existing `useMemo()` or `useCallback()` and the compiler cannot determine that it is safe to keep that memoization — or do even better — then we'll leave the code alone. The actual compilation doesn't use any hints from existing memo calls, this is purely to check and avoid regressing any specific memoization that developers may have already applied.

However, we were accidentally reporting some false-positive _validation_ errors due to the StartMemoize and FinishMemoize instructions that we emit to track where the memoization was in the source code. This is now fixed.

Fixes #29131
Fixes #29132

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts
patch: @@ -1611,14 +1611,14 @@ function inferBlock(
               val,
               Effect.Freeze,
               ValueReason.Other,
-              functionEffects
+              []
             );
           } else {
             state.referenceAndRecordEffects(
               val,
               Effect.Read,
               ValueReason.Other,
-              functionEffects
+              []
             );
           }
         }

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect-usecallback.expect.md
patch: @@ -2,6 +2,7 @@
 ## Input
 
 ```javascript
+// @validatePreserveExistingMemoizationGuarantees
 import { useCallback, useEffect, useState } from "react";
 
 let someGlobal = {};
@@ -33,7 +34,7 @@ export const FIXTURE_ENTRYPOINT = {
 ## Code
 
 ```javascript
-import { c as _c } from "react/compiler-runtime";
+import { c as _c } from "react/compiler-runtime"; // @validatePreserveExistingMemoizationGuarantees
 import { useCallback, useEffect, useState } from "react";
 
 let someGlobal = {};

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/allow-global-mutation-in-effect-indirect-usecallback.js
patch: @@ -1,3 +1,4 @@
+// @validatePreserveExistingMemoizationGuarantees
 import { useCallback, useEffect, useState } from "react";
 
 let someGlobal = {};