helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/internal/dgram.ts`

Towards #24236. Replaces `Symbol` as well as as `Function` and `Map` instance methods with the primordial equivalents. A "prefer-primordial" ignore comment was added to the `handle.bind` method call within the `_createSocketHandle` function since this is a method call on a `UDP` instance instead of a `bind` call on a `Function` object.

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: ext/node/polyfills/internal/dgram.ts
patch: @@ -20,9 +20,6 @@
 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 // USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { lookup as defaultLookup } from "node:dns";
 import {
   isInt32,
@@ -33,6 +30,8 @@ import { ERR_SOCKET_BAD_TYPE } from "ext:deno_node/internal/errors.ts";
 import { UDP } from "ext:deno_node/internal_binding/udp_wrap.ts";
 import { guessHandleType } from "ext:deno_node/internal_binding/util.ts";
 import { codeMap } from "ext:deno_node/internal_binding/uv.ts";
+import { primordials } from "ext:core/mod.js";
+const { FunctionPrototypeBind, MapPrototypeGet, Symbol } = primordials;
 
 export type SocketType = "udp4" | "udp6";
 
@@ -75,15 +74,15 @@ export function newHandle(
   if (type === "udp4") {
     const handle = new UDP();
 
-    handle.lookup = lookup4.bind(handle, lookup);
+    handle.lookup = FunctionPrototypeBind(lookup4, handle, lookup);
 
     return handle;
   }
 
   if (type === "udp6") {
     const handle = new UDP();
 
-    handle.lookup = lookup6.bind(handle, lookup);
+    handle.lookup = FunctionPrototypeBind(lookup6, handle, lookup);
     handle.bind = handle.bind6;
     handle.connect = handle.connect6;
     handle.send = handle.send6;
@@ -108,11 +107,12 @@ export function _createSocketHandle(
     const type = guessHandleType(fd);
 
     if (type !== "UDP") {
-      err = codeMap.get("EINVAL")!;
+      err = MapPrototypeGet(codeMap, "EINVAL")!;
     } else {
       err = handle.open(fd);
     }
   } else if (port || address) {
+    // deno-lint-ignore prefer-primordials
     err = handle.bind(address, port || 0, flags);
   }
Repository: ggml-org/llama.cpp
Pull request: CANN: Disable acl_graph for prefill stage

Since the prefill length is not fixed, graphs constructed for the prefill stage cannot be reused. For this reason, ACL graph execution is disabled by default during prefill.

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: docs/backend/CANN.md
patch: @@ -318,3 +318,7 @@ Operators are executed using ACL graph execution, rather than in op-by-op (eager
 ### GGML_CANN_GRAPH_CACHE_CAPACITY
 
 Maximum number of compiled CANN graphs kept in the LRU cache, default is 12. When the number of cached graphs exceeds this capacity, the least recently used graph will be evicted.
+
+### GGML_CANN_PREFILL_USE_GRAPH
+
+Enable ACL graph execution during the prefill stage, default is false. This option is only effective when FA is enabled.

filename: ggml/src/ggml-cann/ggml-cann.cpp
patch: @@ -2360,6 +2360,21 @@ static enum ggml_status ggml_backend_cann_graph_compute(
     bool use_cann_graph = true;
     bool cann_graph_update_required = false;
 
+    static bool prefill_use_graph = parse_bool(get_env("GGML_CANN_PREFILL_USE_GRAPH").value_or(""));
+    if (!prefill_use_graph) {
+        // Do not use acl_graph for prefill.
+        for (int i = 0; i < cgraph->n_nodes; i++) {
+            ggml_tensor * node = cgraph->nodes[i];
+            // TODO: Optimize here. Currently, we can only
+            // get seq_len by FA's input.
+            if (node->op == GGML_OP_FLASH_ATTN_EXT) {
+                // Q -> src[0], shape: [B, S, N, D]
+                use_cann_graph = (node->src[0]->ne[1] == 1);
+                break;
+            }
+        }
+    }
+
     if (!cann_ctx->acl_graph_mode) {
         use_cann_graph = false;
     }
Repository: ggml-org/llama.cpp
Pull request: llama : validate seq id batch input

cont #13706 

Validate that `0 <= seq_id < LLAMA_MAX_PARALLEL_SEQUENCES`.

Changed files:
filename: src/llama-context.cpp
patch: @@ -693,12 +693,18 @@ int llama_context::encode(llama_batch & inp_batch) {
 
     GGML_ASSERT((!batch.token && batch.embd) || (batch.token && !batch.embd)); // NOLINT
 
+    // TODO: move the validation to the llama_batch_allocr
     if (batch.token) {
         for (int32_t i = 0; i < n_tokens; ++i) {
             if (batch.token[i] < 0 || (uint32_t) batch.token[i] >= model.vocab.n_tokens()) {
                 LLAMA_LOG_ERROR("%s: invalid token[%d] = %d\n", __func__, i, batch.token[i]);
                 return -1;
             }
+
+            if (batch.seq_id && (batch.seq_id[i][0] < 0 || batch.seq_id[i][0] >= LLAMA_MAX_PARALLEL_SEQUENCES)) {
+                LLAMA_LOG_ERROR("%s: invalid seq_id[%d] = %d > %d\n", __func__, i, batch.seq_id[i][0], LLAMA_MAX_PARALLEL_SEQUENCES);
+                throw -1;
+            }
         }
     }
 
@@ -887,11 +893,17 @@ int llama_context::decode(llama_batch & inp_batch) {
 
     GGML_ASSERT((!batch.token && batch.embd) || (batch.token && !batch.embd)); // NOLINT
 
+    // TODO: move the validation to the llama_batch_allocr
     if (batch.token) {
         for (int64_t i = 0; i < n_tokens_all; ++i) {
             if (batch.token[i] < 0 || (uint32_t) batch.token[i] >= model.vocab.n_tokens()) {
                 LLAMA_LOG_ERROR("%s: invalid token[%" PRId64 "] = %d\n", __func__, i, batch.token[i]);
-                throw std::runtime_error("invalid token");
+                return -1;
+            }
+
+            if (batch.seq_id && (batch.seq_id[i][0] < 0 || batch.seq_id[i][0] >= LLAMA_MAX_PARALLEL_SEQUENCES)) {
+                LLAMA_LOG_ERROR("%s: invalid seq_id[%" PRId64 "] = %d >= %d\n", __func__, i, batch.seq_id[i][0], LLAMA_MAX_PARALLEL_SEQUENCES);
+                return -1;
             }
         }
     }
Repository: vercel/next.js
Pull request: [test] Use same pnpm in temporary repo directory

During `node run-test`, we setup a temporary repository that will execute `pnpm` commands. However, that used the default pnpm version not the one configured in the monorepo root. The default pnpm version may not be compatible with the pnpm version we use normally in the monorepo (notably v10 has a different output format for `pnpm pack`)

Now we also copy the relevant files to signal to pnpm that the commands pnpm is running in are workspaces and where it should take the `packageManager` field from (the root package.json where the pnpm-workspaces.yml is located).

Changed files:
filename: test/lib/create-next-install.js
patch: @@ -81,7 +81,12 @@ async function createNextInstall({
         )
         require('console').log('Creating temp repo dir', tmpRepoDir)
 
-        for (const item of ['package.json', 'packages']) {
+        for (const item of [
+          'package.json',
+          'packages',
+          // Otherwise pnpm will not recognize workspaces
+          'pnpm-workspace.yaml',
+        ]) {
           await rootSpan
             .traceChild(`copy ${item} to temp dir`)
             .traceAsyncFn(() =>
Repository: facebook/react
Pull request: Use createRoot in useFocus-test


Changed files:
filename: packages/react-interactions/events/src/dom/create-event-handle/__tests__/useFocus-test.internal.js
patch: @@ -13,7 +13,7 @@ import {createEventTarget, setPointerEvent} from 'dom-event-testing-library';
 
 let React;
 let ReactFeatureFlags;
-let ReactDOM;
+let ReactDOMClient;
 let useFocus;
 let act;
 
@@ -23,7 +23,7 @@ function initializeModules(hasPointerEvents) {
   ReactFeatureFlags = require('shared/ReactFeatureFlags');
   ReactFeatureFlags.enableCreateEventHandleAPI = true;
   React = require('react');
-  ReactDOM = require('react-dom');
+  ReactDOMClient = require('react-dom/client');
   act = require('internal-test-utils').act;
   // TODO: This import throws outside of experimental mode. Figure out better
   // strategy for gated imports.
@@ -45,7 +45,6 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
   });
 
   afterEach(() => {
-    ReactDOM.render(null, container);
     document.body.removeChild(container);
     container = null;
   });
@@ -65,8 +64,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
         });
         return <div ref={ref} />;
       };
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Component />, container);
+        root.render(<Component />);
       });
     };
 
@@ -93,8 +93,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
         });
         return <div ref={ref} />;
       };
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Component />, container);
+        root.render(<Component />);
       });
     };
 
@@ -125,8 +126,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
           </div>
         );
       };
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Component />, container);
+        root.render(<Component />);
       });
     };
 
@@ -164,8 +166,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
           </div>
         );
       };
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Component />, container);
+        root.render(<Component />);
       });
     };
 
@@ -209,8 +212,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
           </div>
         );
       };
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Component />, container);
+        root.render(<Component />);
       });
     };
 
@@ -305,8 +309,9 @@ describe.each(table)(`useFocus hasPointerEvents=%s`, hasPointerEvents => {
         );
       };
 
+      const root = ReactDOMClient.createRoot(container);
       await act(() => {
-        ReactDOM.render(<Outer />, container);
+        root.render(<Outer />);
       });
       const innerTarget = createEventTarget(innerRef.current);
       const outerTarget = createEventTarget(outerRef.current);
Repository: nodejs/node
Pull request: doc: add puskin to collaborators

Fixes: https://github.com/nodejs/node/issues/58088

Changed files:
filename: .mailmap
patch: @@ -204,6 +204,7 @@ George Adams <gadams@microsoft.com> <george.adams@uk.ibm.com>
 Gerhard Stöbich <deb2001-github@yahoo.de>
 Gibson Fahnestock <gibfahn@gmail.com> <gib@uk.ibm.com>
 Gil Pedersen <git@gpost.dk> <github@gpost.dk>
+Giovanni Bucci <github@puskin.it>
 Graham Fairweather <xotic750@gmail.com> <xotic750@gmail>
 Greg Sabia Tucker <greg@narrowlabs.com> <greg@tucke.rs>
 Gregor Martynus <gregor@martynus.net>

filename: README.md
patch: @@ -411,6 +411,8 @@ For information about the governance of the Node.js project, see
   **Tim Perry** <<pimterry@gmail.com>> (he/him)
 * [pmarchini](https://github.com/pmarchini) -
   **Pietro Marchini** <<pietro.marchini94@gmail.com>> (he/him)
+* [puskin](https://github.com/puskin) -
+  **Giovanni Bucci** <<github@puskin.it>> (he/him)
 * [Qard](https://github.com/Qard) -
   **Stephen Belanger** <<admin@stephenbelanger.com>> (he/him)
 * [RafaelGSS](https://github.com/RafaelGSS) -
Repository: denoland/deno
Pull request: feat(lsp): add description in TaskDefinition

Ref https://github.com/denoland/deno/issues/29243

Changed files:
filename: cli/lsp/language_server.rs
patch: @@ -4755,6 +4755,7 @@ impl Inner {
             command: def.command.clone(),
             source_uri: url_to_uri(&config_file.specifier)
               .map_err(|_| LspError::internal_error())?,
+            description: def.description.clone(),
           });
         }
       };
@@ -4767,6 +4768,7 @@ impl Inner {
             command: Some(command.clone()),
             source_uri: url_to_uri(&package_json.specifier())
               .map_err(|_| LspError::internal_error())?,
+            description: None,
           });
         }
       }

filename: cli/lsp/lsp_custom.rs
patch: @@ -15,6 +15,7 @@ pub const LATEST_DIAGNOSTIC_BATCH_INDEX: &str =
 pub struct TaskDefinition {
   pub name: String,
   pub command: Option<String>,
+  pub description: Option<String>,
   pub source_uri: lsp::Uri,
 }
 

filename: tests/integration/lsp_tests.rs
patch: @@ -1295,11 +1295,13 @@ fn lsp_deno_task() {
       {
         "name": "build",
         "command": "deno test",
+        "description": null,
         "sourceUri": url_to_uri(&temp_dir.url().join("deno.jsonc").unwrap()).unwrap(),
       },
       {
         "name": "serve",
         "command": "deno run -RN server.ts",
+        "description": "Start the dev server",
         "sourceUri": url_to_uri(&temp_dir.url().join("deno.jsonc").unwrap()).unwrap(),
       }
     ])
Repository: vercel/next.js
Pull request: Update rust-cache action to v1.0.9

Adds a 60s timeout for fetching the cache to avoid this blocking continuing 

x-ref: https://github.com/ijjk/rust-cache/commit/a34594c450817c9860143c79797a8770c4e587f5

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -352,7 +352,7 @@ jobs:
         if: ${{ matrix.settings.setup }}
 
       - name: Cache on ${{ github.ref_name }}
-        uses: ijjk/rust-cache@turbo-cache-v1.0.8
+        uses: ijjk/rust-cache@turbo-cache-v1.0.9
         with:
           save-if: 'true'
           cache-provider: 'turbo'

filename: .github/workflows/build_reusable.yml
patch: @@ -179,7 +179,7 @@ jobs:
       - run: corepack prepare --activate yarn@1.22.19 && npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
 
       - name: Cache on ${{ github.ref_name }}
-        uses: ijjk/rust-cache@turbo-cache-v1.0.8
+        uses: ijjk/rust-cache@turbo-cache-v1.0.9
         if: ${{ inputs.rustCacheKey }}
         with:
           cache-provider: 'turbo'

filename: .github/workflows/turbopack-benchmark.yml
patch: @@ -65,7 +65,7 @@ jobs:
           tool: cargo-codspeed@2.10.1
 
       - name: Cache on ${{ github.ref_name }}
-        uses: ijjk/rust-cache@turbo-cache-v1.0.8
+        uses: ijjk/rust-cache@turbo-cache-v1.0.9
         with:
           save-if: 'true'
           cache-provider: 'turbo'
Repository: ggml-org/llama.cpp
Pull request: graph : support non-contiguous Q in build_attn_mha

Change `reshape_4d` to `view_4d`, fixes non-contiguous assertion error in `build_attn_mha`.

Tested with `jina-reranker-v2`, `starcoder`, `bloomz` (and `Qwen3MoE` for good measure), all with and without FA.

Fixes #15895

Changed files:
filename: src/llama-graph.cpp
patch: @@ -1273,7 +1273,7 @@ ggml_tensor * llm_graph_context::build_attn_mha(
     // split the batch into streams if needed
     const auto n_stream = k->ne[3];
 
-    q = ggml_reshape_4d(ctx0, q, q->ne[0], q->ne[1], q->ne[2]/n_stream, n_stream);
+    q = ggml_view_4d(ctx0, q, q->ne[0], q->ne[1], q->ne[2]/n_stream, n_stream, q->nb[1], q->nb[2], q->nb[3]/n_stream, 0);
 
     q = ggml_permute(ctx0, q, 0, 2, 1, 3);
     k = ggml_permute(ctx0, k, 0, 2, 1, 3);
Repository: facebook/react
Pull request: [ci] remove fuzz tests from CircleCI

These have been migrated to GitHub Actions with c01ac689e9628c952761ba0583d6c00ba5521c6a.

Changed files:
filename: .circleci/config.yml
patch: @@ -373,18 +373,6 @@ jobs:
             yarn predev
             yarn test --maxWorkers=2
 
-  test_fuzz:
-    docker: *docker
-    environment: *environment
-    steps:
-      - checkout
-      - setup_node_modules
-      - run:
-          name: Run fuzz tests
-          command: |
-            FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
-            FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
-
   publish_prerelease:
     parameters:
       commit_sha:
@@ -529,19 +517,6 @@ workflows:
           requires:
             - build_devtools_and_process_artifacts
 
-  fuzz_tests:
-    unless: << pipeline.parameters.prerelease_commit_sha >>
-    triggers:
-      - schedule:
-          # Fuzz tests run hourly
-          cron: "0 * * * *"
-          filters:
-            branches:
-              only:
-                - main
-    jobs:
-      - test_fuzz
-
   devtools_regression_tests:
     unless: << pipeline.parameters.prerelease_commit_sha >>
     triggers:
Repository: denoland/deno
Pull request: fix(check): write lockfile after type checking

Type checking might discover `npm:@types/node`, so write after type checking.

Changed files:
filename: cli/module_loader.rs
patch: @@ -220,11 +220,6 @@ impl ModuleLoadPreparer {
 
     self.graph_roots_valid(graph, roots, allow_unknown_media_types)?;
 
-    // write the lockfile if there is one
-    if let Some(lockfile) = &self.lockfile {
-      lockfile.write_if_changed()?;
-    }
-
     drop(_pb_clear_guard);
 
     // type check if necessary
@@ -247,6 +242,12 @@ impl ModuleLoadPreparer {
         .await?;
     }
 
+    // write the lockfile if there is one and do so after type checking
+    // as type checking might discover `@types/node`
+    if let Some(lockfile) = &self.lockfile {
+      lockfile.write_if_changed()?;
+    }
+
     log::debug!("Prepared module load.");
 
     Ok(())

filename: tests/specs/check/lockfile_types_node/__test__.jsonc
patch: @@ -0,0 +1,16 @@
+{
+  "tempDir": true,
+  "steps": [{
+    "args": "check --frozen=true",
+    "output": "[WILDCARD]The lockfile is out of date.[WILDCARD]",
+    "exitCode": 1
+  }, {
+    "args": "check --frozen=false",
+    "output": "[WILDCARD]",
+    "exitCode": 0
+  }, {
+    "args": "check --frozen=true",
+    "output": "[WILDCARD]",
+    "exitCode": 0
+  }]
+}

filename: tests/specs/check/lockfile_types_node/deno.json
patch: @@ -0,0 +1,3 @@
+{
+  "lock": true
+}

filename: tests/specs/check/lockfile_types_node/deno.lock
patch: @@ -0,0 +1,3 @@
+{
+  "version": "5"
+}

filename: tests/specs/check/lockfile_types_node/main.ts
patch: @@ -0,0 +1,2 @@
+import path from "node:path";
+console.log(path);
Repository: nodejs/node
Pull request: test: allow `tmpDir.path` to be modified

The behavior was changed in 8e872999c446617ce2cd429aa230203d57082937, which broke `make test-npm`, as it tries modifying the path used for tmpDir.

Changed files:
filename: test/common/tmpdir.js
patch: @@ -39,7 +39,7 @@ const testRoot = process.env.NODE_TEST_DIR ?
 // gets tools to ignore it by default or by simple rules, especially eslint.
 const tmpdirName = '.tmp.' +
   (process.env.TEST_SERIAL_ID || process.env.TEST_THREAD_ID || '0');
-const tmpPath = path.join(testRoot, tmpdirName);
+let tmpPath = path.join(testRoot, tmpdirName);
 
 let firstRefresh = true;
 function refresh(useSpawn = false) {
@@ -100,7 +100,13 @@ function fileURL(...paths) {
 module.exports = {
   fileURL,
   hasEnoughSpace,
-  path: tmpPath,
   refresh,
   resolve,
+
+  get path() {
+    return tmpPath;
+  },
+  set path(newPath) {
+    tmpPath = path.resolve(newPath);
+  },
 };
Repository: vercel/next.js
Pull request: fix: update useEffect closure when menu is truly mounted

Previously we mounted event handlers on the the menu's [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument) to listen for clicks outside the menu. This causes a bug where the ref the useEffect captures is not set yet, and when it is set the effect does not try to run again. The fix is to derive active state from the true state tracking if the menu is mounted, not if the menu __will be open__

### Before
https://github.com/user-attachments/assets/d88f9b46-2203-45f3-a184-46db39584679

### After

https://github.com/user-attachments/assets/57a0f68f-8d46-41ea-b761-222c82e4b6bc




Changed files:
filename: packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/dev-tools-indicator.tsx
patch: @@ -163,8 +163,8 @@ function DevToolsPopover({
   )
 
   // Features to make the menu accessible
-  useFocusTrap(menuRef, triggerRef, isMenuOpen)
-  useClickOutside(menuRef, triggerRef, isMenuOpen, closeMenu)
+  useFocusTrap(menuRef, triggerRef, menuMounted)
+  useClickOutside(menuRef, triggerRef, menuMounted, closeMenu)
   useShortcuts(hideShortcut ? { [hideShortcut]: hideDevTools } : {}, triggerRef)
 
   useEffect(() => {

filename: packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/dev-tools-info/dev-tools-info.tsx
patch: @@ -33,11 +33,11 @@ export function DevToolsInfo({
     exitDelay: MENU_DURATION_MS,
   })
 
-  useFocusTrap(ref, triggerRef, isOpen, () => {
+  useFocusTrap(ref, triggerRef, mounted, () => {
     // Bring focus to close button, so the user can easily close the overlay
     closeButtonRef.current?.focus()
   })
-  useClickOutside(ref, triggerRef, isOpen, close)
+  useClickOutside(ref, triggerRef, mounted, close)
 
   if (!mounted) {
     return null