helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [errors] s/form state/action state

Noticed `useActionState` error still refers to "form state" while writing the docs.

Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMForm-test.js
patch: @@ -1092,7 +1092,7 @@ describe('ReactDOMForm', () => {
     const root = ReactDOMClient.createRoot(container);
     await act(async () => {
       root.render(<App />);
-      await waitForThrow('Cannot update form state while rendering.');
+      await waitForThrow('Cannot update action state while rendering.');
     });
   });
 

filename: packages/react-reconciler/src/ReactFiberHooks.js
patch: @@ -2085,7 +2085,7 @@ function dispatchActionState<S, P>(
   payload: P,
 ): void {
   if (isRenderPhaseUpdate(fiber)) {
-    throw new Error('Cannot update form state while rendering.');
+    throw new Error('Cannot update action state while rendering.');
   }
 
   const currentAction = actionQueue.action;

filename: scripts/error-codes/codes.json
patch: @@ -470,7 +470,7 @@
   "482": "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
   "483": "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
   "484": "A Server Component was postponed. The reason is omitted in production builds to avoid leaking sensitive details.",
-  "485": "Cannot update form state while rendering.",
+  "485": "Cannot update action state while rendering.",
   "486": "It should not be possible to postpone at the root. This is a bug in React.",
   "487": "We should not have any resumable nodes in the shell. This is a bug in React.",
   "488": "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.",
Repository: ollama/ollama
Pull request: launch: skip openclaw gateway health check when no daemon install

This fixes issues with installing open claw in a headless environment, where waiting for the gateway would fail.

Changed files:
filename: cmd/launch/openclaw.go
patch: @@ -80,6 +80,12 @@ func (c *Openclaw) Run(model string, args []string) error {
 		}
 		if canInstallDaemon() {
 			onboardArgs = append(onboardArgs, "--install-daemon")
+		} else {
+			// When we can't install a daemon (e.g. no systemd, sudo dropped
+			// XDG_RUNTIME_DIR, or container environment), skip the gateway
+			// health check so non-interactive onboarding completes. The
+			// gateway is started as a foreground child process after onboarding.
+			onboardArgs = append(onboardArgs, "--skip-health")
 		}
 		cmd := exec.Command(bin, onboardArgs...)
 		cmd.Stdin = os.Stdin
Repository: huggingface/transformers
Pull request: Fix explicit local code resolution for tokenizers and image processors

In https://github.com/huggingface/transformers/pull/45094 I introduced some errors to the remote code resolution when trying to detect if local code belonged to Transformers or not.

These tests were:

```bash
pytest tests/models/cohere_asr/test_modeling_cohere_asr.py::CohereAsrIntegrationTest::test_longform_english
pytest tests/models/cohere_asr/test_modeling_cohere_asr.py::CohereAsrIntegrationTest::test_non_english_with_punctuation
pytest tests/models/pp_ocrv5_mobile_rec/test_modeling_pp_ocrv5_mobile_rec.py::PPOCRV5MobileRecModelIntegrationTest::test_inference_text_recognition_head
pytest tests/models/pp_ocrv5_server_rec/test_modeling_pp_ocrv5_server_rec.py::PPOCRV5ServerRecModelIntegrationTest::test_inference_text_recognition_head
pytest tests/models/slanext/test_modeling_slanext.py::SLANeXtModelIntegrationTest::test_inference_table_recognition_head
pytest tests/models/timm_wrapper/test_modeling_timm_wrapper.py::TimmWrapperModelIntegrationTest::test_inference_with_pipeline
```

This PR fixes all of these.

(The timm test still appears to fail, but not for the reason that was caused by the linked PR)

Changed files:
filename: src/transformers/models/auto/image_processing_auto.py
patch: @@ -725,7 +725,7 @@ def from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs):
         has_remote_code = image_processor_auto_map is not None
         has_local_code = image_processor_class is not None or type(config) in IMAGE_PROCESSOR_MAPPING
         explicit_local_code = has_local_code and not (
-            image_processor_class or IMAGE_PROCESSOR_MAPPING[type(config)]
+            image_processor_class or _load_class_with_fallback(IMAGE_PROCESSOR_MAPPING[type(config)], backend)
         ).__module__.startswith("transformers.")
         if has_remote_code:
             class_ref = _resolve_auto_map_class_ref(image_processor_auto_map, backend)

filename: src/transformers/models/auto/tokenization_auto.py
patch: @@ -738,11 +738,15 @@ def from_pretrained(
                 or tokenizer_class_from_name(tokenizer_config_class + "Fast") is not None
             )
         )
-        explicit_local_code = has_local_code and (
-            tokenizer_config_class is not None
-            and not (
-                tokenizer_class_from_name(tokenizer_config_class).__module__.startswith("transformers.")
-                and tokenizer_class_from_name(tokenizer_config_class + "Fast").__module__.startswith("transformers.")
+        explicit_local_code = (
+            has_local_code
+            and type(config) not in TOKENIZER_MAPPING
+            and (
+                tokenizer_config_class is not None
+                and not (
+                    tokenizer_class_from_name(tokenizer_config_class)
+                    or tokenizer_class_from_name(tokenizer_config_class + "Fast")
+                ).__module__.startswith("transformers.")
             )
         )
         # V5: Skip remote tokenizer for custom models with incorrect hub tokenizer class
Repository: huggingface/transformers
Pull request: fix model parallelism bug for eurobert model

@ArthurZucker @Cyrilvallez pls help review, thx! This PR fixes failed test case:
`pytest -rA tests/models/eurobert/test_modeling_eurobert.py::EuroBertModelTest::test_model_parallelism`

Changed files:
filename: src/transformers/models/eurobert/modeling_eurobert.py
patch: @@ -512,6 +512,7 @@ def forward(
                 if attention_mask is None:
                     pooled_output = last_hidden_state.mean(dim=1)
                 else:
+                    attention_mask = attention_mask.to(last_hidden_state.device)
                     pooled_output = (last_hidden_state * attention_mask.unsqueeze(-1)).sum(dim=1)
                     pooled_output /= attention_mask.sum(dim=1, keepdim=True)
 
@@ -526,6 +527,7 @@ def forward(
             if attention_mask is None:
                 logits = logits.mean(dim=1)
             else:
+                attention_mask = attention_mask.to(logits.device)
                 logits = (logits * attention_mask.unsqueeze(-1)).sum(dim=1)
                 logits /= attention_mask.sum(dim=1, keepdim=True)
 

filename: src/transformers/models/eurobert/modular_eurobert.py
patch: @@ -273,6 +273,7 @@ def forward(
                 if attention_mask is None:
                     pooled_output = last_hidden_state.mean(dim=1)
                 else:
+                    attention_mask = attention_mask.to(last_hidden_state.device)
                     pooled_output = (last_hidden_state * attention_mask.unsqueeze(-1)).sum(dim=1)
                     pooled_output /= attention_mask.sum(dim=1, keepdim=True)
 
@@ -287,6 +288,7 @@ def forward(
             if attention_mask is None:
                 logits = logits.mean(dim=1)
             else:
+                attention_mask = attention_mask.to(logits.device)
                 logits = (logits * attention_mask.unsqueeze(-1)).sum(dim=1)
                 logits /= attention_mask.sum(dim=1, keepdim=True)
Repository: electron/electron
Pull request: fix: validate `dock_state_ `against allowlist before JS execution

Backport of #50646

See that PR for details.


Notes: none

Changed files:
filename: shell/browser/ui/inspectable_web_contents.cc
patch: @@ -12,6 +12,7 @@
 #include <utility>
 
 #include "base/base64.h"
+#include "base/containers/fixed_flat_set.h"
 #include "base/containers/span.h"
 #include "base/dcheck_is_on.h"
 #include "base/memory/raw_ptr.h"
@@ -160,6 +161,13 @@ void OnOpenItemComplete(const base::FilePath& path, const std::string& result) {
 constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250);
 constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10);
 
+constexpr auto kValidDockStates = base::MakeFixedFlatSet<std::string_view>(
+    {"bottom", "left", "right", "undocked"});
+
+bool IsValidDockState(const std::string& state) {
+  return kValidDockStates.contains(state);
+}
+
 }  // namespace
 
 class InspectableWebContents::NetworkResourceLoader
@@ -394,7 +402,7 @@ void InspectableWebContents::SetDockState(const std::string& state) {
     can_dock_ = false;
   } else {
     can_dock_ = true;
-    dock_state_ = state;
+    dock_state_ = IsValidDockState(state) ? state : "right";
   }
 }
 
@@ -559,7 +567,13 @@ void InspectableWebContents::LoadCompleted() {
           pref_service_->GetDict(kDevToolsPreferences);
       const std::string* current_dock_state =
           prefs.FindString("currentDockState");
-      base::RemoveChars(*current_dock_state, "\"", &dock_state_);
+      if (current_dock_state) {
+        std::string sanitized;
+        base::RemoveChars(*current_dock_state, "\"", &sanitized);
+        dock_state_ = IsValidDockState(sanitized) ? sanitized : "right";
+      } else {
+        dock_state_ = "right";
+      }
     }
 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
     auto* api_web_contents = api::WebContents::From(GetWebContents());
Repository: facebook/react
Pull request: [DevTools] Don't connect to pages that are being prerendered


## Summary

Fixes https://github.com/facebook/react/issues/35954

Root cause was ping-ponging the proxy connection between the actual page and the prerendered page. Both were battling for the same tab ID.

[We'll see if `pageshow` firing while prerendering is actually a bug](https://issues.chromium.org/issues/489633225) but even if, it'll take some time to get fixed so we should work around that.

## How did you test this change?

- [x] Go to https://yuri.twintail.org/chrome/prerendering/specrules.html, open Chrome DevTools, and see in the Chrome task manager no more CPU hogging by the React DevTools service worker


Changed files:
filename: flow-typed/environments/dom.js
patch: @@ -1415,6 +1415,8 @@ declare class Document extends Node {
   links: HTMLCollection<HTMLLinkElement>;
   media: string;
   open(url?: string, name?: string, features?: string, replace?: boolean): any;
+  /** @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/prerendering} */
+  prerendering: boolean;
   readyState: string;
   referrer: string;
   scripts: HTMLCollection<HTMLScriptElement>;

filename: packages/react-devtools-extensions/src/contentScripts/proxy.js
patch: @@ -10,7 +10,7 @@
 
 'use strict';
 
-function injectProxy({target}: {target: any}) {
+function injectProxy() {
   // Firefox's behaviour for injecting this content script can be unpredictable
   // While navigating the history, some content scripts might not be re-injected and still be alive
   if (!window.__REACT_DEVTOOLS_PROXY_INJECTED__) {
@@ -32,9 +32,23 @@ function injectProxy({target}: {target: any}) {
   }
 }
 
+function handlePageShow() {
+  if (document.prerendering) {
+    // React DevTools can't handle multiple documents being connected to the same extension port.
+    // However, browsers are firing pageshow events while prerendering (https://issues.chromium.org/issues/489633225).
+    // We need to wait until prerendering is finished before injecting the proxy.
+    // In browsers with pagereveal support, listening to pagereveal would be sufficient.
+    // Waiting for prerenderingchange is a workaround to support browsers that
+    // have speculationrules but not pagereveal.
+    document.addEventListener('prerenderingchange', injectProxy, {once: true});
+  } else {
+    injectProxy();
+  }
+}
+
 window.addEventListener('pagereveal', injectProxy);
 // For backwards compat with browsers not implementing `pagereveal` which is a fairly new event.
-window.addEventListener('pageshow', injectProxy);
+window.addEventListener('pageshow', handlePageShow);
 
 window.addEventListener('pagehide', function ({target}) {
   if (target !== window.document) {
Repository: rust-lang/rust
Pull request: add regression test for 119686

closes rust-lang/rust#119686 

Changed files:
filename: tests/ui/borrowck/async-trait-proposes-let-binding.rs
patch: @@ -0,0 +1,16 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/119686>.
+//@ edition: 2024
+struct A;
+pub trait Trait1 {
+    async fn func() -> ();
+}
+
+impl Trait1 for A {
+    async fn func() -> () {
+        let p = std::convert::identity(&("".to_string()));
+        //~^ ERROR temporary value dropped while borrowed
+        let _q = p;
+    }
+}
+
+fn main() {}

filename: tests/ui/borrowck/async-trait-proposes-let-binding.stderr
patch: @@ -0,0 +1,16 @@
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/async-trait-proposes-let-binding.rs:10:41
+   |
+LL |         let p = std::convert::identity(&("".to_string()));
+   |                                         ^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
+   |                                         |
+   |                                         creates a temporary value which is freed while still in use
+LL |
+LL |         let _q = p;
+   |                  - borrow later used here
+   |
+   = note: consider using a `let` binding to create a longer lived value
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0716`.
Repository: vercel/next.js
Pull request: [test] Increase `retry` timeouts for two flaky `app-action` tests

- [Flakiness metric for `should handle redirects to routes that provide an invalid RSC response`](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22app-dir%20action%20handling%20fetch%20actions%20should%20handle%20redirects%20to%20routes%20that%20provide%20an%20invalid%20RSC%20response%22%20%40test.type%3A%22nextjs%22%20%40test.status%3A%22fail%22&agg_m=count&agg_m_source=base&agg_t=count&currentTab=overview&eventStack=&fromUser=false&graphType=flamegraph&index=citest&start=1773313490002&end=1773918290002&paused=false)
- [Flakiness metric for `should work with interception routes`](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22app-dir%20action%20handling%20should%20work%20with%20interception%20routes%22%20%40test.type%3A%22nextjs%22%20%40test.status%3A%22fail%22&agg_m=count&agg_m_source=base&agg_t=count&fromUser=false&index=citest&start=1773313571516&end=1773918371516&paused=false)

Changed files:
filename: test/e2e/app-dir/actions/app-action.test.ts
patch: @@ -1335,7 +1335,7 @@ describe('app-dir action handling', () => {
         )
         expect(await browser.url()).toBe(`${next.url}/pages-dir`)
         expect(mpaTriggered).toBe(true)
-      }, 5000)
+      }, 10_000)
     })
 
     it('should handle revalidatePath', async () => {
@@ -1610,7 +1610,7 @@ describe('app-dir action handling', () => {
       expect(await browser.elementById('modal-data').text()).toContain(
         'in "modal"'
       )
-    })
+    }, 10_000)
 
     // Submit the action
     await browser.elementById('submit-intercept-action').click()
Repository: electron/electron
Pull request: fix: validate `dock_state_ `against allowlist before JS execution

#### Description of Change

The dock_state_ member was concatenated directly into a JavaScript string and executed via ExecuteJavaScript() in the DevTools context.

We should validate against the four known dock states and fall back to "right" for any unrecognized value for safety.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none

Changed files:
filename: shell/browser/ui/inspectable_web_contents.cc
patch: @@ -12,6 +12,7 @@
 #include <utility>
 
 #include "base/base64.h"
+#include "base/containers/fixed_flat_set.h"
 #include "base/containers/span.h"
 #include "base/dcheck_is_on.h"
 #include "base/memory/raw_ptr.h"
@@ -160,6 +161,13 @@ void OnOpenItemComplete(const base::FilePath& path, const std::string& result) {
 constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250);
 constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10);
 
+constexpr auto kValidDockStates = base::MakeFixedFlatSet<std::string_view>(
+    {"bottom", "left", "right", "undocked"});
+
+bool IsValidDockState(const std::string& state) {
+  return kValidDockStates.contains(state);
+}
+
 }  // namespace
 
 class InspectableWebContents::NetworkResourceLoader
@@ -394,7 +402,7 @@ void InspectableWebContents::SetDockState(const std::string& state) {
     can_dock_ = false;
   } else {
     can_dock_ = true;
-    dock_state_ = state;
+    dock_state_ = IsValidDockState(state) ? state : "right";
   }
 }
 
@@ -559,7 +567,13 @@ void InspectableWebContents::LoadCompleted() {
           pref_service_->GetDict(kDevToolsPreferences);
       const std::string* current_dock_state =
           prefs.FindString("currentDockState");
-      base::RemoveChars(*current_dock_state, "\"", &dock_state_);
+      if (current_dock_state) {
+        std::string sanitized;
+        base::RemoveChars(*current_dock_state, "\"", &sanitized);
+        dock_state_ = IsValidDockState(sanitized) ? sanitized : "right";
+      } else {
+        dock_state_ = "right";
+      }
     }
 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
     auto* api_web_contents = api::WebContents::From(GetWebContents());
Repository: huggingface/transformers
Pull request: fix bug embedding_size mismatch with hidden_size in electra model test

@ArthurZucker @Cyrilvallez pls help review. Thx! 

Changed files:
filename: tests/models/electra/test_modeling_electra.py
patch: @@ -126,6 +126,7 @@ def prepare_config_and_inputs(self):
     def get_config(self):
         return ElectraConfig(
             vocab_size=self.vocab_size,
+            embedding_size=self.hidden_size,  # Match hidden_size to avoid dimension expansion amplifying BF16 rounding errors
             hidden_size=self.hidden_size,
             num_hidden_layers=self.num_hidden_layers,
             num_attention_heads=self.num_attention_heads,
Repository: ollama/ollama
Pull request: cmd/launch: skip redundant config writes when model unchanged

- `launchSingleIntegration` unconditionally called `SaveIntegration` on every launch, even when the model hadn't changed. The editor integration flow already guarded against this. This aligns the single model flow to match.
- `resolveRunModel` called `SetLastModel(current)` in two paths where current was just read from `config.LastModel()` — a no-op write. Removed those, and guarded the post-selector write with a change check.



Changed files:
filename: cmd/launch/launch.go
patch: @@ -413,9 +413,6 @@ func (c *launcherClient) resolveRunModel(ctx context.Context, req RunModelReques
 			return "", err
 		}
 		fmt.Fprintf(os.Stderr, "Headless mode: auto-selected last used model %q\n", current)
-		if err := config.SetLastModel(current); err != nil {
-			return "", err
-		}
 		return current, nil
 	}
 
@@ -428,9 +425,6 @@ func (c *launcherClient) resolveRunModel(ctx context.Context, req RunModelReques
 			if err := c.ensureModelsReady(ctx, []string{current}); err != nil {
 				return "", err
 			}
-			if err := config.SetLastModel(current); err != nil {
-				return "", err
-			}
 			return current, nil
 		}
 	}
@@ -439,8 +433,10 @@ func (c *launcherClient) resolveRunModel(ctx context.Context, req RunModelReques
 	if err != nil {
 		return "", err
 	}
-	if err := config.SetLastModel(model); err != nil {
-		return "", err
+	if model != current {
+		if err := config.SetLastModel(model); err != nil {
+			return "", err
+		}
 	}
 	return model, nil
 }
@@ -475,8 +471,10 @@ func (c *launcherClient) launchSingleIntegration(ctx context.Context, name strin
 		return nil
 	}
 
-	if err := config.SaveIntegration(name, []string{target}); err != nil {
-		return fmt.Errorf("failed to save: %w", err)
+	if target != current {
+		if err := config.SaveIntegration(name, []string{target}); err != nil {
+			return fmt.Errorf("failed to save: %w", err)
+		}
 	}
 
 	return launchAfterConfiguration(name, runner, target, req)
Repository: rust-lang/rust
Pull request: triagebot: roll library reviewers for `{coretests,alloctests}`

Noticed in https://github.com/rust-lang/rust/pull/154761 that we are currently rolling fallback reviewers for `library/{alloctests,coretests}`

r? libs

Changed files:
filename: triagebot.toml
patch: @@ -1598,7 +1598,9 @@ dep-bumps = [
 "/compiler/rustc_type_ir" =                              ["compiler", "types"]
 "/compiler/rustc_public" =                               ["project-stable-mir"]
 "/library/alloc" =                                       ["libs"]
+"/library/alloctests" =                                  ["libs"]
 "/library/core" =                                        ["libs", "@scottmcm"]
+"/library/coretests" =                                   ["libs"]
 "/library/panic_abort" =                                 ["libs"]
 "/library/panic_unwind" =                                ["libs"]
 "/library/proc_macro" =                                  ["@petrochenkov"]