helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: remove io/ioutil import

ioutil is deprecated

Changed files:
filename: server/images.go
patch: @@ -7,7 +7,6 @@ import (
 	"errors"
 	"fmt"
 	"io"
-	"io/ioutil"
 	"log"
 	"net/http"
 	"os"
@@ -528,13 +527,13 @@ func CopyModel(src, dest string) error {
 	}
 
 	// copy the file
-	input, err := ioutil.ReadFile(srcPath)
+	input, err := os.ReadFile(srcPath)
 	if err != nil {
 		fmt.Println("Error reading file:", err)
 		return err
 	}
 
-	err = ioutil.WriteFile(destPath, input, 0o644)
+	err = os.WriteFile(destPath, input, 0o644)
 	if err != nil {
 		fmt.Println("Error reading file:", err)
 		return err
@@ -1009,7 +1008,7 @@ func downloadBlob(mp ModelPath, digest string, regOpts *RegistryOptions, fn func
 	defer resp.Body.Close()
 
 	if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusPartialContent {
-		body, _ := ioutil.ReadAll(resp.Body)
+		body, _ := io.ReadAll(resp.Body)
 		return fmt.Errorf("on download registry responded with code %d: %v", resp.StatusCode, string(body))
 	}
Repository: ggml-org/llama.cpp
Pull request: server : fix division by zero when reporting stats

The `t_token_generaion` could become zero, causing division by zero here:

https://github.com/ggml-org/llama.cpp/blob/66892e160d9c9ad086f8681b0162d8da8dd92f20/tools/server/server.cpp#L1838

Changed files:
filename: tools/server/server.cpp
patch: @@ -4226,7 +4226,7 @@ struct server_context {
                     metrics.on_prompt_eval(slot);
                 }
 
-                slot.t_token_generation = (t_current - slot.t_start_generation) / 1e3;
+                slot.t_token_generation = std::max<int64_t>(1, t_current - slot.t_start_generation) / 1e3;
 
                 completion_token_output result;
                 result.tok          = id;
Repository: electron/electron
Pull request: perf: avoid redundant map lookups in `GetStorageMask()`

Backport of #46315

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/api/electron_api_session.cc
patch: @@ -13,6 +13,7 @@
 
 #include "base/command_line.h"
 #include "base/containers/fixed_flat_map.h"
+#include "base/containers/map_util.h"
 #include "base/files/file_enumerator.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
@@ -141,9 +142,8 @@ uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
 
   uint32_t storage_mask = 0;
   for (const auto& it : storage_types) {
-    auto type = base::ToLowerASCII(it);
-    if (Lookup.contains(type))
-      storage_mask |= Lookup.at(type);
+    if (const uint32_t* val = base::FindOrNull(Lookup, base::ToLowerASCII(it)))
+      storage_mask |= *val;
   }
   return storage_mask;
 }
@@ -183,9 +183,8 @@ BrowsingDataRemover::DataType GetDataTypeMask(
     const std::vector<std::string>& data_types) {
   BrowsingDataRemover::DataType mask = 0u;
   for (const auto& type : data_types) {
-    if (kDataTypeLookup.contains(type)) {
-      mask |= kDataTypeLookup.at(type);
-    }
+    if (const auto* val = base::FindOrNull(kDataTypeLookup, type))
+      mask |= *val;
   }
   return mask;
 }
Repository: nodejs/node
Pull request: worker: flush stdout and stderr on exit

This fix an old problem I had since forever when using worker threads, stdout log lines being cut if the thread exited. This PR fixes it by bypassing backpressure if the thread is exiting. 

Changed files:
filename: lib/internal/bootstrap/switches/is_not_main_thread.js
patch: @@ -33,11 +33,22 @@ process.removeListener('removeListener', stopListeningIfSignal);
 
 const {
   createWorkerStdio,
+  kStdioWantsMoreDataCallback,
 } = require('internal/worker/io');
 
 let workerStdio;
 function lazyWorkerStdio() {
-  return workerStdio ??= createWorkerStdio();
+  if (workerStdio === undefined) {
+    workerStdio = createWorkerStdio();
+    process.on('exit', flushSync);
+  }
+
+  return workerStdio;
+}
+
+function flushSync() {
+  workerStdio.stdout[kStdioWantsMoreDataCallback]();
+  workerStdio.stderr[kStdioWantsMoreDataCallback]();
 }
 
 function getStdout() { return lazyWorkerStdio().stdout; }

filename: lib/internal/worker/io.js
patch: @@ -292,9 +292,13 @@ class WritableWorkerStdio extends Writable {
       chunks: ArrayPrototypeMap(chunks,
                                 ({ chunk, encoding }) => ({ chunk, encoding })),
     });
-    ArrayPrototypePush(this[kWritableCallbacks], cb);
-    if (this[kPort][kWaitingStreams]++ === 0)
-      this[kPort].ref();
+    if (process._exiting) {
+      cb();
+    } else {
+      ArrayPrototypePush(this[kWritableCallbacks], cb);
+      if (this[kPort][kWaitingStreams]++ === 0)
+        this[kPort].ref();
+    }
   }
 
   _final(cb) {

filename: test/parallel/test-worker-stdio-flush-inflight.js
patch: @@ -0,0 +1,24 @@
+'use strict';
+const common = require('../common');
+const assert = require('assert');
+const { Worker, isMainThread } = require('worker_threads');
+
+if (isMainThread) {
+  const w = new Worker(__filename, { stdout: true });
+  const expected = 'hello world';
+
+  let data = '';
+  w.stdout.setEncoding('utf8');
+  w.stdout.on('data', (chunk) => {
+    data += chunk;
+  });
+
+  w.on('exit', common.mustCall(() => {
+    assert.strictEqual(data, expected);
+  }));
+} else {
+  process.stdout.write('hello');
+  process.stdout.write(' ');
+  process.stdout.write('world');
+  process.exit(0);
+}

filename: test/parallel/test-worker-stdio-flush.js
patch: @@ -0,0 +1,25 @@
+'use strict';
+const common = require('../common');
+const assert = require('assert');
+const { Worker, isMainThread } = require('worker_threads');
+
+if (isMainThread) {
+  const w = new Worker(__filename, { stdout: true });
+  const expected = 'hello world';
+
+  let data = '';
+  w.stdout.setEncoding('utf8');
+  w.stdout.on('data', (chunk) => {
+    data += chunk;
+  });
+
+  w.on('exit', common.mustCall(() => {
+    assert.strictEqual(data, expected);
+  }));
+} else {
+  process.on('exit', () => {
+    process.stdout.write(' ');
+    process.stdout.write('world');
+  });
+  process.stdout.write('hello');
+}
Repository: denoland/deno
Pull request: fix(ext/node): fix segmentation fault when spkac is empty

Hi, looking at #30180 , yes the error occur in aws-lc, but deno should not panic with a segmentation fault. This fix check if no end is in base64, so exit gracefully.

Changed files:
filename: libs/crypto/spki.rs
patch: @@ -17,6 +17,10 @@ impl NetscapeSpki {
       .rposition(|&b| !b" \n\r\t".contains(&b))
       .map_or(0, |i| i + 1);
 
+    if end == 0 {
+      return Err("Invalid SPKI data: no base64 content found");
+    }
+
     // SAFETY: Cast data pointer to convert base64 to NETSCAPE_SPKI
     unsafe {
       let spki = aws_lc_sys::NETSCAPE_SPKI_b64_decode(
@@ -185,4 +189,10 @@ mod tests {
     let spkac = b"MIICUzCCATswggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCXzfKgGnkkOF7+VwMzGpiWy5nna/VGJOfPBsCVg5WooJHN9nAFyqLxoV0WyhwvIdHhIgcTX2L4BHRa+4B0zb4stRHK02ZknJvionK4kBfa+k7Q4DzasW3ulLCTXPLVBKzW9QSzE4Wult17BX6uSUy3Bpr/Nuk6B4Ja3JnFpdSYmJbWP55kRONFBZYPCXr7T8k6hzEHcevFE/PUi6IU+LKiwyGH5KXAUzRbMtqbZLn/rEAmEBxmv/z/+shAwiRE8s9RqBi+pVdwqWdw6ibNkbM7G3j4CMyfAk7EOpGf5loRIrVWB4XrVYWb2EQ6sd9LfiQ9GwqlFYw006MUo6nxoEtNAgMBAAEWE3RoaXMtaXMtYS1jaGFsbGVuZ2UwDQYJKoZIhvcNAQELBQADggEBAHUw1UoZjG7TCb/JhFo5p8XIFeizGEwYoqttBoVTQ+MeCfnNoLLeAyId0atb2jPnYsI25Z/PHHV1N9t0L/NelY3rZC/Z00Wx8IGeslnGXXbqwnp36Umb0r2VmxTr8z1QaToGyOQXp4Xor9qbQFoANIivyVUYsuqJ1FnDJCC/jBPo4IWiQbTst331v2fiVdV+/XUh9AIjcm4085b65HjFwLxDeWhbgAZ+UfhqBbTVA1K8uUqS8e3gbeaNstZvnclxZ3PlHSk8v1RdIG4e5ThTOwPH5u/7KKeafn9SwgY/Q8KqaVfHHCv1IeVlijamjnyFhWc35kGlBUNgLOnWAOE3GsM=";
     assert!(verify_spkac(spkac));
   }
+
+  #[test]
+  fn test_spkac_empty() {
+    let empty_spkac = b"";
+    assert!(!verify_spkac(empty_spkac));
+  }
 }
Repository: denoland/deno
Pull request: fix(bundle): don't force managed npm resolution

Fixes #30187.

If you're using --node-modules-dir=manual we should respect that, since resolution may not work with the managed resolver

Changed files:
filename: cli/factory.rs
patch: @@ -1227,7 +1227,6 @@ fn new_workspace_factory_options(
         | DenoSubcommand::Init(_)
         | DenoSubcommand::Outdated(_)
         | DenoSubcommand::Clean(_)
-        | DenoSubcommand::Bundle(_)
     ),
     no_lock: flags.no_lock
       || matches!(
Repository: ollama/ollama
Pull request: use max scan token size to hold large objects

The internal buffer used by scanner is too small to hold Meta's license so allocate the maximum size set in bufio. It can be potentially higher but it's not necessary right now

Changed files:
filename: parser/parser.go
patch: @@ -24,6 +24,7 @@ func Parse(reader io.Reader) ([]Command, error) {
 	var command, modelCommand Command
 
 	scanner := bufio.NewScanner(reader)
+	scanner.Buffer(make([]byte, 0, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize)
 	scanner.Split(scanModelfile)
 	for scanner.Scan() {
 		line := scanner.Bytes()
Repository: ggml-org/llama.cpp
Pull request: vocab : mark EOT token for Granite models

fix #16498

The `infill` samplers requires a valid EOT token and the Granite models didn't have one defined.

Changed files:
filename: src/llama-sampling.cpp
patch: @@ -2541,8 +2541,13 @@ static void llama_sampler_infill_apply(struct llama_sampler * smpl, llama_token_
     if (n_non_eog == 0) {
         cur_p->size = 1;
         cur_p->data[0].id = ctx->vocab->token_eot();
+        if (cur_p->data[0].id == LLAMA_TOKEN_NULL) {
+            cur_p->data[0].id = ctx->vocab->token_eos();
+        }
         cur_p->data[0].logit = 1.0f;
 
+        GGML_ASSERT(cur_p->data[0].id != LLAMA_TOKEN_NULL);
+
         return;
     }
 

filename: src/llama-vocab.cpp
patch: @@ -2171,6 +2171,7 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
                         || t.first == "
"
                         || t.first == "<end_of_turn>"
                         || t.first == "
"
+                        || t.first == "
" // granite
                         || t.first == "<EOT>"
                         || t.first == "_<EOT>"
                         || t.first == "<｜end▁of▁sentence｜>" // DeepSeek
Repository: ollama/ollama
Pull request: embed ggml-metal.metal

`go:embed ggml-metal.metal` and write it out to the right location on `init()` so llama.cpp can use it.

with this change, `ollama` is serveable using `go run . serve` or `go install . && ~/go/bin/ollama serve`

resolves #48

Changed files:
filename: ggml-metal.metal
patch: @@ -1 +0,0 @@
-llama/ggml-metal.metal
\ No newline at end of file

filename: llama/llama.go
patch: @@ -86,6 +86,7 @@ llama_token llama_sample(
 import "C"
 import (
 	"bytes"
+	"embed"
 	"errors"
 	"fmt"
 	"io"
@@ -99,6 +100,9 @@ import (
 	"github.com/jmorganca/ollama/api"
 )
 
+//go:embed ggml-metal.metal
+var fs embed.FS
+
 type LLM struct {
 	params *C.struct_llama_context_params
 	model  *C.struct_llama_model

filename: llama/llama_darwin.go
patch: @@ -0,0 +1,53 @@
+package llama
+
+import (
+	"errors"
+	"io"
+	"log"
+	"os"
+	"path/filepath"
+)
+
+func init() {
+	if err := initBackend(); err != nil {
+		log.Printf("WARNING: GPU could not be initialized correctly: %v", err)
+		log.Printf("WARNING: falling back to CPU")
+	}
+}
+
+func initBackend() error {
+	exec, err := os.Executable()
+	if err != nil {
+		return err
+	}
+
+	exec, err = filepath.EvalSymlinks(exec)
+	if err != nil {
+		return err
+	}
+
+	metal := filepath.Join(filepath.Dir(exec), "ggml-metal.metal")
+	if _, err := os.Stat(metal); err != nil {
+		if !errors.Is(err, os.ErrNotExist) {
+			return err
+		}
+
+		dst, err := os.Create(filepath.Join(filepath.Dir(exec), "ggml-metal.metal"))
+		if err != nil {
+			return err
+		}
+		defer dst.Close()
+
+		src, err := fs.Open("ggml-metal.metal")
+		if err != nil {
+			return err
+		}
+		defer src.Close()
+
+		if _, err := io.Copy(dst, src); err != nil {
+			return err
+		}
+	}
+
+	return nil
+}
Repository: ggml-org/llama.cpp
Pull request: server : log requests to /v1/completions

Logging the requests along with their HTTP status is quite useful for traceability and observability purposes. For some reason which I don't understand, `/v1/health` and `/v1/completions` requests are being ignored and not logged.

We don't really care about `/v1/health`, but we really need logs for `/v1/completions` requests.

Changed files:
filename: tools/server/server.cpp
patch: @@ -4368,7 +4368,7 @@ struct server_context {
 
 static void log_server_request(const httplib::Request & req, const httplib::Response & res) {
     // skip GH copilot requests when using default port
-    if (req.path == "/v1/health" || req.path == "/v1/completions") {
+    if (req.path == "/v1/health") {
         return;
     }
Repository: facebook/react
Pull request: Add dynamic flag for infinite loop detection on React Native FB

Add dynamic flag for infinite loop detection on React Native FB


Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
patch: @@ -27,6 +27,7 @@ export const enableUseRefAccessWarning = __VARIANT__;
 export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
 export const useMicrotasksForSchedulingInFabric = __VARIANT__;
 export const enableUnifiedSyncLane = __VARIANT__;
+export const enableInfiniteRenderLoopDetection = __VARIANT__;
 
 // Flow magic to verify the exports of this file match the original version.
 ((((null: any): ExportsType): DynamicFlagsType): ExportsType);

filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -25,6 +25,7 @@ export const {
   passChildrenWhenCloningPersistedNodes,
   useMicrotasksForSchedulingInFabric,
   enableUnifiedSyncLane,
+  enableInfiniteRenderLoopDetection,
 } = dynamicFlags;
 
 // The rest of the flags are static for better dead code elimination.
@@ -96,7 +97,6 @@ export const disableClientCache = true;
 
 export const enableServerComponentKeys = true;
 export const enableServerComponentLogs = true;
-export const enableInfiniteRenderLoopDetection = false;
 
 // TODO: Roll out with GK. Don't keep as dynamic flag for too long, though,
 // because JSX is an extremely hot path.

filename: scripts/flow/xplat.js
patch: @@ -15,4 +15,5 @@ declare module 'ReactNativeInternalFeatureFlags' {
   declare export var passChildrenWhenCloningPersistedNodes: boolean;
   declare export var useMicrotasksForSchedulingInFabric: boolean;
   declare export var enableUnifiedSyncLane: boolean;
+  declare export var enableInfiniteRenderLoopDetection: boolean;
 }
Repository: vercel/next.js
Pull request: Update Rspack production test manifest

This auto-generated PR updates the production integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-build-tests-manifest.json
patch: @@ -5828,6 +5828,7 @@
   },
   "test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts": {
     "passed": [
+      "segment cache (basic tests) does not cause infinite loop with cacheLife(\"seconds\")",
       "segment cache (basic tests) does not throw an error when navigating to a page with a server action",
       "segment cache (basic tests) navigate before any data has loaded into the prefetch cache",
       "segment cache (basic tests) navigate to page with lazily-generated (not at build time) static param",
@@ -5984,6 +5985,8 @@
   },
   "test/e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts": {
     "passed": [
+      "<Link prefetch={true}> (runtime prefetch) cache stale time handling includes private caches with cacheLife(\"seconds\")",
+      "<Link prefetch={true}> (runtime prefetch) cache stale time handling includes public caches with cacheLife(\"seconds\")",
       "<Link prefetch={true}> (runtime prefetch) cache stale time handling includes short-lived public caches with a long enough staleTime",
       "<Link prefetch={true}> (runtime prefetch) cache stale time handling omits private caches with a short enough staleTime",
       "<Link prefetch={true}> (runtime prefetch) cache stale time handling omits short-lived public caches with a short enough staleTime",
Repository: electron/electron
Pull request: build: validate Chromium cookie authentication

Backport of #46274

See that PR for details.


Notes: none

Changed files:
filename: .github/actions/set-chromium-cookie/action.yml
patch: @@ -17,10 +17,32 @@ runs:
       ${{ env.CHROMIUM_GIT_COOKIE }}
       __END__
       eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
+
+      RESPONSE=$(curl -s -b ~/.gitcookies https://chromium-review.googlesource.com/a/accounts/self)
+      if [[ $RESPONSE == ")]}'"* ]]; then
+        # Extract account email for verification
+        EMAIL=$(echo "$RESPONSE" | tail -c +5 | jq -r '.email // "No email found"')
+        echo "Cookie authentication successful - authenticated as: $EMAIL"
+      else
+        echo "Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE is set correctly"
+        echo $RESPONSE
+      fi
   - name: Set the git cookie from chromium.googlesource.com (Windows)
     if: ${{ runner.os == 'Windows' && env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
     shell: cmd
     run: |
       git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
       powershell -noprofile -nologo -command Write-Output "${{ env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}" >>"%USERPROFILE%\.gitcookies"
 
+      curl -s -b "%USERPROFILE%\.gitcookies" https://chromium-review.googlesource.com/a/accounts/self > response.txt
+
+      findstr /B /C:")]}'" response.txt > nul
+      if %ERRORLEVEL% EQU 0 (
+        echo Cookie authentication successful
+        powershell -NoProfile -Command "& {$content = Get-Content -Raw response.txt; $content = $content.Substring(4); try { $json = ConvertFrom-Json $content; if($json.email) { Write-Host 'Authenticated as:' $json.email } else { Write-Host 'No email found in response' } } catch { Write-Host 'Error parsing JSON:' $_ }}"
+      ) else (
+        echo Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE_WINDOWS_STRING is set correctly
+        type response.txt
+      )
+
+      del response.txt
Repository: denoland/deno
Pull request: test: avoid race condition on node compat test runner

Fixes #30193

Changed files:
filename: tests/node_compat/run_all_test_unmodified.ts
patch: @@ -21,6 +21,7 @@ import {
   TEST_ARGS,
   usesNodeTestModule,
 } from "./common.ts";
+import { generateTestSerialId } from "./test.ts";
 
 const testDirUrl = new URL("runner/suite/test/", import.meta.url).href;
 const IS_CI = !!Deno.env.get("CI");
@@ -153,7 +154,6 @@ function getFlags(source: string): [string[], string[]] {
   return [v8Flags, nodeOptions];
 }
 
-let testSerialId = 0;
 /**
  * Run a single node test file. Retries 3 times on WouldBlock error.
  *
@@ -169,7 +169,7 @@ export async function runSingle(
     retry?: number;
   },
 ): Promise<NodeTestFileReport> {
-  testSerialId++;
+  const testSerialId = generateTestSerialId();
   let cmd: Deno.ChildProcess | undefined;
   const testPath_ = "tests/node_compat/runner/suite/test/" + testPath;
   let usesNodeTest = false;

filename: tests/node_compat/test.ts
patch: @@ -6,6 +6,9 @@ import { assert } from "@std/assert";
 import { partition } from "@std/collections/partition";
 import { pooledMap } from "@std/async/pool";
 
+let testSerialId = 0;
+export const generateTestSerialId = () => ++testSerialId;
+
 interface SingleFileConfig {
   flaky?: boolean;
 }
Repository: denoland/deno
Pull request: fix(compile): do not include managed npm deps when graph does not have any npm pkgs

Closes https://github.com/denoland/deno/issues/30177 (along with https://github.com/denoland/deno/pull/30188)

Changed files:
filename: cli/standalone/binary.rs
patch: @@ -392,14 +392,18 @@ impl<'a> DenoCompileBinaryWriter<'a> {
     }
     let npm_snapshot = match &self.npm_resolver {
       CliNpmResolver::Managed(managed) => {
-        let snapshot = managed
-          .resolution()
-          .serialized_valid_snapshot_for_system(&self.npm_system_info);
-        if !snapshot.as_serialized().packages.is_empty() {
-          self.fill_npm_vfs(&mut vfs).context("Building npm vfs.")?;
-          Some(snapshot)
-        } else {
+        if graph.npm_packages.is_empty() {
           None
+        } else {
+          let snapshot = managed
+            .resolution()
+            .serialized_valid_snapshot_for_system(&self.npm_system_info);
+          if !snapshot.as_serialized().packages.is_empty() {
+            self.fill_npm_vfs(&mut vfs).context("Building npm vfs.")?;
+            Some(snapshot)
+          } else {
+            None
+          }
         }
       }
       CliNpmResolver::Byonm(_) => {

filename: tests/specs/compile/npm_pkgs_lockfile_unused/__test__.jsonc
patch: @@ -0,0 +1,10 @@
+{
+  "tempDir": true,
+  "steps": [{
+    "args": "install",
+    "output": "[WILDCARD]"
+  }, {
+    "args": "compile main.ts",
+    "output": "compile.out"
+  }]
+}

filename: tests/specs/compile/npm_pkgs_lockfile_unused/compile.out
patch: @@ -0,0 +1,9 @@
+[WILDCARD]
+
+Embedded Files
+
+[# this should not contain the npm packages found in the lockfile]
+[WILDLINE]
+└── main.ts ([WILDLINE])
+
+[WILDCARD]

filename: tests/specs/compile/npm_pkgs_lockfile_unused/deno.json
patch: @@ -0,0 +1,5 @@
+{
+  "imports": {
+    "add": "npm:@denotest/add"
+  }
+}

filename: tests/specs/compile/npm_pkgs_lockfile_unused/main.ts
patch: @@ -0,0 +1 @@
+console.log(1);
Repository: vercel/next.js
Pull request: [Cache Components] Only validate the shell on SSR render

Prior to this change on every navigation we would validate that the initial static shell satisified the rules of cache components. This offers more protection as you edit pages but it slows down navigations and we are already concerned with dev speed and the extra CPU contention can potenially hide or exacerbate other performance characteristics you might notice in dev.

So for now we will only validate a page on initial load. This means that if you are trying to debug a page's static shell suitability you will need to refresh the page not just navigate to and from it.

Changed files:
filename: packages/next/src/server/app-render/app-render.tsx
patch: @@ -572,31 +572,6 @@ async function generateDynamicFlightRenderResult(
     options
   )
 
-  if (
-    // We only want this behavior when running `next dev`
-    renderOpts.dev &&
-    // We only want this behavior when we have React's dev builds available
-    process.env.NODE_ENV === 'development' &&
-    // We only have a Prerender environment for projects opted into cacheComponents
-    renderOpts.experimental.cacheComponents
-  ) {
-    const [resolveValidation, validationOutlet] = createValidationOutlet()
-    RSCPayload._validation = validationOutlet
-
-    const devValidatingFallbackParams =
-      getRequestMeta(req, 'devValidatingFallbackParams') || null
-
-    spawnDynamicValidationInDev(
-      resolveValidation,
-      ctx.componentMod.tree,
-      ctx,
-      false,
-      ctx.clientReferenceManifest,
-      requestStore,
-      devValidatingFallbackParams
-    )
-  }
-
   // For app dir, use the bundled version of Flight server renderer (renderToReadableStream)
   // which contains the subset React.
   const flightReadableStream = workUnitAsyncStorage.run(

filename: test/development/app-dir/cache-components-dev-errors/cache-components-dev-errors.test.ts
patch: @@ -1,6 +1,11 @@
 import stripAnsi from 'strip-ansi'
 import { nextTestSetup } from 'e2e-utils'
-import { assertNoRedbox, hasErrorToast, retry } from 'next-test-utils'
+import {
+  assertNoRedbox,
+  assertNoErrorToast,
+  hasErrorToast,
+  retry,
+} from 'next-test-utils'
 import { createSandbox } from 'development-sandbox'
 import { outdent } from 'outdent'
 
@@ -32,14 +37,17 @@ describe('Cache Components Dev Errors', () => {
     `)
   })
 
-  it('should show a red box error on client navigations', async () => {
+  it('should not show a red box error on client navigations', async () => {
     const browser = await next.browser('/no-error')
 
     await retry(async () => {
       expect(await hasErrorToast(browser)).toBe(false)
     })
 
     await browser.elementByCss("[href='/error']").click()
+    await assertNoErrorToast(browser)
+
+    await browser.loadPage(`${next.url}/error`)
 
     // TODO: React should not include the anon stack in the Owner Stack.
     await expect(browser).toDisplayCollapsedRedbox(`