helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: Fix: flush partial stop string when <EOG> is reached in /completion endpoint in streaming mode

In the `/completion` endpoint the server correctly holds the partial stop string until a decision can be made.

If EOG is reached and a stop string was not found, then the generated content should be flushed to the user.

To reproduce:
query: `Repeat exactly the following text: UNO DUE TRE`
stop:  `["TRE\nAAAAAAAA"]`
stream: `True`

Previous result:
`UNO DUE`

After this PR:
`UNO DUE TRE`

Note:
The openAI compatible api has the opposite problem, the partial stop string is always flushed even if the full stop string is found.
This is not addressed in this PR


Changed files:
filename: tools/server/server.cpp
patch: @@ -2839,7 +2839,7 @@ struct server_context {
                     slot.generated_text.begin() + pos + stop_pos,
                     slot.generated_text.end());
                 pos = std::min(slot.n_sent_text, slot.generated_text.size());
-            } else if (slot.has_next_token) {
+            } else if (slot.has_next_token && !llama_vocab_is_eog(vocab, result.tok) ) {
                 stop_pos = slot.find_stopping_strings(str_test, token_str.size(), false);
                 send_text = stop_pos == std::string::npos;
             }
Repository: facebook/react
Pull request: Align React Native OSS/Test Feature Flags

## Summary

Makes a few changes to align React Native feature flags for open source and internal test renderer configurations.

* Enable `enableSchedulingProfiler` for profiling builds.
* Align `ReactFeatureFlags.test-renderer.native.js` (with `ReactFeatureFlags.native-fb.js`).
  * Enable `enableUseMemoCacheHook`.
  * Enable `enableFizzExternalRuntime`.
  * Disable `alwaysThrottleRetries`.

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-oss.js
patch: @@ -70,7 +70,7 @@ export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__;
 export const enableCPUSuspense = false;
 export const enableDebugTracing = false;
 export const enableAsyncDebugInfo = false;
-export const enableSchedulingProfiler = false;
+export const enableSchedulingProfiler = __PROFILE__;
 export const enableLegacyCache = false;
 export const enableFetchInstrumentation = false;
 export const enablePostpone = false;

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native.js
patch: @@ -13,7 +13,7 @@ import typeof * as ExportsType from './ReactFeatureFlags.test-renderer';
 export const debugRenderPhaseSideEffectsForStrictMode = false;
 export const enableDebugTracing = false;
 export const enableAsyncDebugInfo = false;
-export const enableSchedulingProfiler = false;
+export const enableSchedulingProfiler = __PROFILE__;
 export const enableProfilerTimer = __PROFILE__;
 export const enableProfilerCommitHooks = __PROFILE__;
 export const enableProfilerNestedUpdatePhase = __PROFILE__;
@@ -40,7 +40,7 @@ export const enableFilterEmptyStringAttributesDOM = true;
 export const enableGetInspectorDataForInstanceInProduction = false;
 export const enableSuspenseAvoidThisFallback = false;
 export const enableSuspenseAvoidThisFallbackFizz = false;
-export const enableCPUSuspense = false;
+export const enableCPUSuspense = true;
 export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = false;
 export const favorSafetyOverHydrationPerf = true;
@@ -67,11 +67,12 @@ export const enableTransitionTracing = false;
 
 export const useModernStrictMode = false;
 export const enableDO_NOT_USE_disableStrictPassiveEffect = false;
+export const enableFizzExternalRuntime = true;
 export const enableDeferRootSchedulingToMicrotask = false;
 
 export const enableAsyncActions = true;
 
-export const alwaysThrottleRetries = true;
+export const alwaysThrottleRetries = false;
 
 export const passChildrenWhenCloningPersistedNodes = false;
 export const enableUseDeferredValueInitialArg = __EXPERIMENTAL__;
Repository: denoland/deno
Pull request: fix(types): specify `ArrayBuffer` as a backing buffer type for `TextEncoder.encode()`

This patch updates the `TextEncoder` interface type declarations to correctly specify `ArrayBuffer` as the backing buffer type for the `encode()` method, aligning with the spec and addressing the change introduced in TypeScript 5.7 about making `ArrayVBufferLike` a default buffer type behind `Uint8Array`.

### Problem

TypeScript 5.7 changed the default backing buffer type for `Uint8Array` from `ArrayBuffer` to `ArrayBufferLike` (which is a union of `ArrayBuffer` and `SharedArrayBuffer`). However, `TextEncoder.encode()` per specification always returns a `Uint8Array` backed by a standard `ArrayBuffer`, never a `SharedArrayBuffer`. This mismatch causes type errors when passing the buffer to functions expecting `ArrayBuffer`:

```typescript
const data = new TextEncoder().encode("hello");

function processData(d: ArrayBuffer) { /* ... */ }

processData(data.buffer);
```

Type check result with Deno v2.4.4:

```console
Check file:///tmp/arraybuffer.ts
TS2345 [ERROR]: Argument of type 'ArrayBufferLike' is not assignable to parameter of type 'ArrayBuffer'.
  Type 'SharedArrayBuffer' is missing the following properties from type 'ArrayBuffer': resizable, resize, detached, transfer, transferToFixedLength
processData(data.buffer) // Type error: ArrayBufferLike is not assignable to ArrayBuffer
            ~~~~~~~~~~~
    at file:///tmp/arraybuffer.ts:7:13

error: Type checking failed.
```

### Solution

This issue is resolved in this patch by explicitly specifying `Uint8Array<ArrayBuffer>` as the return type for `encode()`.

Also, the second parameter type of `encodeInto()` is updated to `Uint8Array<ArrayBufferLike>` to make it less confusing and more explicit.

### Refs

- microsoft/TypeScript#60846
- microsoft/TypeScript-DOM-lib-generator#1893
- microsoft/TypeScript-DOM-lib-generator#1944


Changed files:
filename: cli/tsc/dts/lib.deno_web.d.ts
patch: @@ -452,12 +452,6 @@ interface TextEncoderEncodeIntoResult {
   written: number;
 }
 
-/** @category Encoding */
-interface TextEncoder extends TextEncoderCommon {
-  /** Returns the result of running UTF-8's encoder. */
-  encode(input?: string): Uint8Array;
-  encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult;
-}
 /**
  * Allows you to convert a string into binary data (in the form of a Uint8Array)
  * given the encoding.
@@ -474,10 +468,13 @@ interface TextEncoder extends TextEncoderCommon {
  */
 interface TextEncoder extends TextEncoderCommon {
   /** Turns a string into binary data (in the form of a Uint8Array) using UTF-8 encoding. */
-  encode(input?: string): Uint8Array;
+  encode(input?: string): Uint8Array<ArrayBuffer>;
 
   /** Encodes a string into the destination Uint8Array and returns the result of the encoding. */
-  encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult;
+  encodeInto(
+    input: string,
+    dest: Uint8Array<ArrayBufferLike>,
+  ): TextEncoderEncodeIntoResult;
 }
 
 /** @category Encoding */
Repository: nodejs/node
Pull request: crypto: handle missing OPENSSL_TLS_SECURITY_LEVEL

`OPENSSL_TLS_SECURITY_LEVEL` isn't defined at all in BoringSSL and will cause compilation failures.

Ref https://github.com/nodejs/node/pull/57323
Ref https://github.com/nodejs/node/pull/56601

See [boringssl search results](https://source.chromium.org/search?q=OPENSSL_TLS_SECURITY_LEVEL&sq=package:chromium)

<!--
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: deps/ncrypto/ncrypto.cc
patch: @@ -2744,8 +2744,9 @@ std::optional<int> SSLPointer::getSecurityLevel() {
 
   return SSL_get_security_level(ssl);
 #else
-  // for BoringSSL assume the same as the default
-  return OPENSSL_TLS_SECURITY_LEVEL;
+  // OPENSSL_TLS_SECURITY_LEVEL is not defined in BoringSSL
+  // so assume it is the default OPENSSL_TLS_SECURITY_LEVEL value.
+  return 1;
 #endif  // OPENSSL_IS_BORINGSSL
 }
Repository: electron/electron
Pull request: fix: `NativeWindowViews::GetRestoredState()` can return wrong state when maximized

Backport of #46450

See that PR for details.


Notes: Fixed a bug that could cause some maximized windows on Linux to report an incorrect window state.

Changed files:
filename: shell/browser/native_window_views.cc
patch: @@ -1835,7 +1835,7 @@ ui::mojom::WindowShowState NativeWindowViews::GetRestoredState() {
       return ui::mojom::WindowShowState::kMaximized;
     }
 #else
-    return ui::mojom::WindowShowState::kMinimized;
+    return ui::mojom::WindowShowState::kMaximized;
 #endif
   }
Repository: ollama/ollama
Pull request: update submodule


Changed files:
filename: llm/llama.cpp/gguf
patch: @@ -1 +1 @@
-Subproject commit 53885d7256909ec3e2176cdc2477f3986c15ec69
+Subproject commit bc9d3e3971e5607a10ff4c24e39568ce1ac87271
Repository: facebook/react
Pull request: Test for ReactTestRenderer

This is a repro for a breakage that #28672 would introduce for legacy sync rendering.

Changed files:
filename: packages/react-test-renderer/src/__tests__/ReactTestRenderer-test.js
patch: @@ -50,6 +50,35 @@ describe('ReactTestRenderer', () => {
     expect(errors[1].message.includes('indexOf is not a function')).toBe(true);
   });
 
+  test('find element by prop with suspended content', async () => {
+    const neverResolve = new Promise(() => {});
+
+    function TestComp({foo}) {
+      if (foo === 'one') {
+        throw neverResolve;
+      } else {
+        return null;
+      }
+    }
+
+    const tree = await act(() =>
+      ReactTestRenderer.create(
+        <div>
+          <React.Suspense fallback={null}>
+            <TestComp foo="one" />
+          </React.Suspense>
+          <TestComp foo="two" />
+        </div>,
+      ),
+    );
+
+    expect(
+      tree.root.find(item => {
+        return item.props.foo === 'two';
+      }),
+    ).toBeDefined();
+  });
+
   describe('timed out Suspense hidden subtrees should not be observable via toJSON', () => {
     let AsyncText;
     let PendingResources;
Repository: huggingface/transformers
Pull request: Remove unnecessary contiguous calls for modern torch

`sdpa_integration.py` calls `contiguous()` on the three attention tensors to work around a bug that was present before `torch 2.2`. However, our minimum version is now >= 2.2 anyway, so this bug should not longer be relevant, and we can remove the workaround to boost performance.

Pytorch issue link: https://github.com/pytorch/pytorch/issues/112577

Changed files:
filename: src/transformers/integrations/sdpa_attention.py
patch: @@ -67,12 +67,6 @@ def sdpa_attention_forward(
     if attention_mask is not None and attention_mask.ndim == 4:
         attention_mask = attention_mask[:, :, :, : key.shape[-2]]
 
-    # SDPA with memory-efficient backend is bugged with non-contiguous inputs and custom attn_mask for some torch versions
-    # Reference: https://github.com/pytorch/pytorch/issues/112577.
-    query = query.contiguous()
-    key = key.contiguous()
-    value = value.contiguous()
-
     # We dispatch to SDPA's Flash Attention or Efficient kernels via this `is_causal` if statement instead of an inline conditional assignment
     # in SDPA to support both torch.compile's dynamic shapes and full graph options. An inline conditional prevents dynamic shapes from compiling.
     # Note that it is important to check first for the shape, otherwise compile will fail with `argument 'is_causal' must be bool, not SymBool`
Repository: denoland/deno
Pull request: feat(ext/fetch): Parse unix socket and vsock proxies from env var

Allows configuring a default unix/vsock proxy for upstream requests.

Changed files:
filename: ext/fetch/proxy.rs
patch: @@ -211,6 +211,26 @@ impl std::fmt::Debug for Intercept {
 
 impl Target {
   pub(crate) fn parse(val: &str) -> Option<Self> {
+    // unix:<path> is valid RFC3986 but not as an http::Uri
+    #[cfg(not(windows))]
+    if let Some(encoded_path) = val.strip_prefix("unix:") {
+      use std::os::unix::ffi::OsStringExt;
+      let decoded = std::ffi::OsString::from_vec(
+        percent_decode_str(encoded_path).collect::<Vec<u8>>(),
+      );
+      return Some(Target::Unix {
+        path: decoded.into(),
+      });
+    }
+    // vsock:<cid>:<port> is valid RFC3986 but not as an http::Uri
+    #[cfg(any(target_os = "linux", target_os = "macos"))]
+    if let Some(cid_port) = val.strip_prefix("vsock:") {
+      let (left, right) = cid_port.split_once(":")?;
+      let cid = left.parse::<u32>().ok()?;
+      let port = right.parse::<u32>().ok()?;
+      return Some(Target::Vsock { cid, port });
+    }
+
     let uri = val.parse::<Uri>().ok()?;
 
     let mut builder = Uri::builder();
@@ -939,6 +959,25 @@ fn test_proxy_parse_from_env() {
     }
     _ => panic!("bad target"),
   }
+
+  // unix
+  #[cfg(not(windows))]
+  match parse("unix:foo%20bar/baz") {
+    Target::Unix { path } => {
+      assert_eq!(path.to_str(), Some("foo bar/baz"));
+    }
+    _ => panic!("bad target"),
+  }
+
+  // vsock
+  #[cfg(any(target_os = "linux", target_os = "macos"))]
+  match parse("vsock:1234:5678") {
+    Target::Vsock { cid, port } => {
+      assert_eq!(cid, 1234);
+      assert_eq!(port, 5678);
+    }
+    _ => panic!("bad target"),
+  }
 }
 
 #[test]
Repository: ollama/ollama
Pull request: Use API to check if model exists and pull if necessary

Resolves #484 

Changed files:
filename: cmd/cmd.go
patch: @@ -11,7 +11,6 @@ import (
 	"io"
 	"log"
 	"net"
-	"net/http"
 	"os"
 	"os/exec"
 	"path/filepath"
@@ -108,35 +107,28 @@ func CreateHandler(cmd *cobra.Command, args []string) error {
 }
 
 func RunHandler(cmd *cobra.Command, args []string) error {
-	insecure, err := cmd.Flags().GetBool("insecure")
+	client, err := api.FromEnv()
 	if err != nil {
 		return err
 	}
 
-	mp := server.ParseModelPath(args[0])
-	if mp.ProtocolScheme == "http" && !insecure {
-		return fmt.Errorf("insecure protocol http")
-	}
-
-	fp, err := mp.GetManifestPath(false)
+	models, err := client.List(context.Background())
 	if err != nil {
 		return err
 	}
 
-	_, err = os.Stat(fp)
-	switch {
-	case errors.Is(err, os.ErrNotExist):
-		if err := pull(args[0], insecure); err != nil {
-			var apiStatusError api.StatusError
-			if !errors.As(err, &apiStatusError) {
-				return err
-			}
+	modelName, modelTag, ok := strings.Cut(args[0], ":")
+	if !ok {
+		modelTag = "latest"
+	}
 
-			if apiStatusError.StatusCode != http.StatusBadGateway {
-				return err
-			}
+	for _, model := range models.Models {
+		if model.Name == strings.Join([]string{modelName, modelTag}, ":") {
+			return RunGenerate(cmd, args)
 		}
-	case err != nil:
+	}
+
+	if err := PullHandler(cmd, args); err != nil {
 		return err
 	}
 

filename: server/routes.go
patch: @@ -499,23 +499,25 @@ func CopyModelHandler(c *gin.Context) {
 	}
 }
 
-func Serve(ln net.Listener, origins []string) error {
+var defaultAllowOrigins = []string{
+	"localhost",
+	"127.0.0.1",
+	"0.0.0.0",
+}
+
+func Serve(ln net.Listener, allowOrigins []string) error {
 	config := cors.DefaultConfig()
 	config.AllowWildcard = true
-	config.AllowOrigins = append(origins, []string{
-		"http://localhost",
-		"http://localhost:*",
-		"https://localhost",
-		"https://localhost:*",
-		"http://127.0.0.1",
-		"http://127.0.0.1:*",
-		"https://127.0.0.1",
-		"https://127.0.0.1:*",
-		"http://0.0.0.0",
-		"http://0.0.0.0:*",
-		"https://0.0.0.0",
-		"https://0.0.0.0:*",
-	}...)
+
+	config.AllowOrigins = allowOrigins
+	for _, allowOrigin := range defaultAllowOrigins {
+		config.AllowOrigins = append(config.AllowOrigins,
+			fmt.Sprintf("http://%s", allowOrigin),
+			fmt.Sprintf("https://%s", allowOrigin),
+			fmt.Sprintf("http://%s:*", allowOrigin),
+			fmt.Sprintf("https://%s:*", allowOrigin),
+		)
+	}
 
 	r := gin.Default()
 	r.Use(cors.New(config))
Repository: ollama/ollama
Pull request: fix OLLAMA_HOST parsing for ip6

Fix the environment parsing for `OLLAMA_HOST` so it can recognize ipv6 addresses, e.g. ipv6 loopback `[::1]:11434`

Some examples:

Default

```
$ OLLAMA_HOST='' ollama serve
2023/09/20 17:55:23 routes.go:540: Listening on 127.0.0.1:11434
```

IPv6 loopback

```
$ OLLAMA_HOST='[::1]:11434' ollama serve
2023/09/20 17:58:08 routes.go:540: Listening on [::1]:11434
```

Random port (any IPv4 & IPv6 address)

```
$ OLLAMA_HOST=':0' ollama serve
2023/09/20 17:58:26 routes.go:540: Listening on [::]:63574
```

Only IPv4

```
$ OLLAMA_HOST='127.0.0.1:12345' ollama serve
2023/09/20 17:58:37 routes.go:540: Listening on 127.0.0.1:12345
```

Only IPv6

```
$ OLLAMA_HOST='[::1]:12345' ollama serve
2023/09/20 17:59:23 routes.go:540: Listening on [::1]:12345
```

Only setting the address

```
$ OLLAMA_HOST='0.0.0.0' ollama serve
2023/09/20 18:54:18 routes.go:540: Listening on [::]:11434
```

It also removes `OLLAMA_PORT`

Resolves #560 

Changed files:
filename: cmd/cmd.go
patch: @@ -655,28 +655,19 @@ func generateBatch(cmd *cobra.Command, model string) error {
 }
 
 func RunServer(cmd *cobra.Command, _ []string) error {
-	host, port := "127.0.0.1", "11434"
-
-	parts := strings.Split(os.Getenv("OLLAMA_HOST"), ":")
-	if ip := net.ParseIP(parts[0]); ip != nil {
-		host = ip.String()
-	}
-
-	if len(parts) > 1 {
-		port = parts[1]
-	}
-
-	// deprecated: include port in OLLAMA_HOST
-	if p := os.Getenv("OLLAMA_PORT"); p != "" {
-		port = p
+	host, port, err := net.SplitHostPort(os.Getenv("OLLAMA_HOST"))
+	if err != nil {
+		host, port = "127.0.0.1", "11434"
+		if ip := net.ParseIP(os.Getenv("OLLAMA_HOST")); ip != nil {
+			host = ip.String()
+		}
 	}
 
-	err := initializeKeypair()
-	if err != nil {
+	if err := initializeKeypair(); err != nil {
 		return err
 	}
 
-	ln, err := net.Listen("tcp", fmt.Sprintf("%s:%s", host, port))
+	ln, err := net.Listen("tcp", net.JoinHostPort(host, port))
 	if err != nil {
 		return err
 	}
Repository: ollama/ollama
Pull request: fix impossible condition

split from #536 

Changed files:
filename: cmd/cmd.go
patch: @@ -114,10 +114,6 @@ func RunHandler(cmd *cobra.Command, args []string) error {
 	}
 
 	mp := server.ParseModelPath(args[0])
-	if err != nil {
-		return err
-	}
-
 	if mp.ProtocolScheme == "http" && !insecure {
 		return fmt.Errorf("insecure protocol http")
 	}
Repository: electron/electron
Pull request: fix: ensure maximize is emitted when reduce motion is enabled on macOS (34-x-y)

Manually backport #46459 to 34-x-y. See that PR for details.

Notes: no-notes


Changed files:
filename: shell/browser/ui/cocoa/electron_ns_window_delegate.mm
patch: @@ -221,6 +221,12 @@ - (void)windowDidResize:(NSNotification*)notification {
   [super windowDidResize:notification];
   shell_->NotifyWindowResize();
   shell_->RedrawTrafficLights();
+  // When reduce motion is enabled windowDidResize is only called once after
+  // a resize and windowDidEndLiveResize is not called. So we need to call
+  // handleZoomEnd here as well.
+  if (NSWorkspace.sharedWorkspace.accessibilityDisplayShouldReduceMotion) {
+    [self handleZoomEnd];
+  }
 }
 
 - (void)windowWillMove:(NSNotification*)notification {
@@ -276,9 +282,7 @@ - (BOOL)windowShouldZoom:(NSWindow*)window toFrame:(NSRect)newFrame {
   return YES;
 }
 
-- (void)windowDidEndLiveResize:(NSNotification*)notification {
-  resizingHorizontally_.reset();
-  shell_->NotifyWindowResized();
+- (void)handleZoomEnd {
   if (is_zooming_) {
     if (shell_->IsMaximized())
       shell_->NotifyWindowMaximize();
@@ -288,6 +292,12 @@ - (void)windowDidEndLiveResize:(NSNotification*)notification {
   }
 }
 
+- (void)windowDidEndLiveResize:(NSNotification*)notification {
+  resizingHorizontally_.reset();
+  shell_->NotifyWindowResized();
+  [self handleZoomEnd];
+}
+
 - (void)windowWillEnterFullScreen:(NSNotification*)notification {
   // Store resizable mask so it can be restored after exiting fullscreen.
   is_resizable_ = shell_->HasStyleMask(NSWindowStyleMaskResizable);
Repository: facebook/react
Pull request: Don't log onRecoverableError if the current commit fail

We didn't recover after all.

Currently we might log a recoverable error in the recovery pass. E.g. the SSR server had an error. Then the client component fails to render which errors again. This ends up double logging.

So if we fail to actually complete a fully successful commit, we ignore any recoverable errors because we'll get real errors logged.

It's possible that this might cover up some other error that happened at the same time.

Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
patch: @@ -6004,23 +6004,23 @@ describe('ReactDOMFizzServer', () => {
     expect(reportedServerErrors.length).toBe(1);
     expect(reportedServerErrors[0].message).toBe('Oops!');
 
+    const reportedCaughtErrors = [];
     const reportedClientErrors = [];
     ReactDOMClient.hydrateRoot(container, <App />, {
+      onCaughtError(error) {
+        reportedCaughtErrors.push(error);
+      },
       onRecoverableError(error) {
         reportedClientErrors.push(error);
       },
     });
     await waitForAll([]);
     expect(getVisibleChildren(container)).toEqual('Oops!');
-    expect(reportedClientErrors.length).toBe(1);
-    if (__DEV__) {
-      expect(reportedClientErrors[0].message).toBe('Oops!');
-    } else {
-      expect(reportedClientErrors[0].message).toBe(
-        'The server could not finish this Suspense boundary, likely due to ' +
-          'an error during server rendering. Switched to client rendering.',
-      );
-    }
+    // Because this is rethrown on the client, it is not a recoverable error.
+    expect(reportedClientErrors.length).toBe(0);
+    // It is caught by the error boundary.
+    expect(reportedCaughtErrors.length).toBe(1);
+    expect(reportedCaughtErrors[0].message).toBe('Oops!');
   });
 
   it("use a promise that's already been instrumented and resolved", async () => {

filename: packages/react-reconciler/src/ReactFiberWorkLoop.js
patch: @@ -1099,7 +1099,14 @@ function finishConcurrentRender(
       // Commit the placeholder.
       break;
     }
-    case RootErrored:
+    case RootErrored: {
+      // This render errored. Ignore any recoverable errors because we weren't actually
+      // able to recover. Instead, whatever the final errors were is the ones we log.
+      // This ensures that we only log the actual client side error if it's just a plain
+      // error thrown from a component on the server and the client.
+      workInProgressRootRecoverableErrors = null;
+      break;
+    }
     case RootSuspended:
     case RootCompleted: {
       break;