helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: Float16Array type

<!--
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: cli/tsc/dts/lib.deno.unstable.d.ts
patch: @@ -4782,7 +4782,7 @@ declare var Float16Array: Float16ArrayConstructor;
  * @category Platform
  * @experimental
  */
-declare interface Float16 {
+declare interface Float16Array {
   [Symbol.iterator](): IterableIterator<number>;
   /**
    * Returns an array of key, value pairs for every entry in the array
@@ -4803,7 +4803,7 @@ declare interface Float16 {
  * @experimental
  */
 declare interface Float16Constructor {
-  new (elements: Iterable<number>): Float16;
+  new (elements: Iterable<number>): Float16Array;
 
   /**
    * Creates an array from an array-like or iterable object.
@@ -4815,7 +4815,7 @@ declare interface Float16Constructor {
     arrayLike: Iterable<number>,
     mapfn?: (v: number, k: number) => number,
     thisArg?: any,
-  ): Float16;
+  ): Float16Array;
 }
 
 /**
Repository: nodejs/node
Pull request: doc: add `node:sqlite` to mandatory `node:` prefix list

<!--
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.
-->

Added `node:sqlite` to mandatory `node:` prefix list.


Changed files:
filename: doc/api/modules.md
patch: @@ -519,6 +519,7 @@ modules from having a conflict with user land packages that already have
 taken the name. Currently the built-in modules that requires the `node:` prefix are:
 
 * [`node:sea`][]
+* [`node:sqlite`][]
 * [`node:test`][]
 * [`node:test/reporters`][]
 
@@ -1278,6 +1279,7 @@ This section was moved to
 [`module` core module]: module.md
 [`module` object]: #the-module-object
 [`node:sea`]: single-executable-applications.md#single-executable-application-api
+[`node:sqlite`]: sqlite.md
 [`node:test/reporters`]: test.md#test-reporters
 [`node:test`]: test.md
 [`package.json`]: packages.md#nodejs-packagejson-field-definitions
Repository: ggml-org/llama.cpp
Pull request: examples/training: Fix file name in README

This patch fixes binary file names in README.md.



Changed files:
filename: examples/training/README.md
patch: @@ -10,8 +10,8 @@ Proof of concept:
 
 ``` sh
 export model_name=llama_3.2-1b && export quantization=f32
-./build/bin/finetune --file wikitext-2-raw/wiki.test.raw -ngl 999 --model models/${model_name}-${quantization}.gguf -c 512 -b 512 -ub 512
-./build/bin/perplexity --file wikitext-2-raw/wiki.test.raw -ngl 999 --model finetuned-model.gguf
+./build/bin/llama-finetune --file wikitext-2-raw/wiki.test.raw -ngl 999 --model models/${model_name}-${quantization}.gguf -c 512 -b 512 -ub 512
+./build/bin/llama-perplexity --file wikitext-2-raw/wiki.test.raw -ngl 999 --model finetuned-model.gguf
 ```
 
 The perplexity value of the finetuned model should be lower after training on the test set for 2 epochs.
Repository: vercel/next.js
Pull request: perf(turbopack): Remove needless clone of SWC AST

### What?

Part of the memory usage reduction task.

### Why?

We don't need to clone the AST.


Closes PACK-4566

Changed files:
filename: turbopack/crates/turbopack-ecmascript/src/references/esm/export.rs
patch: @@ -680,7 +680,6 @@ impl EsmExports {
         Ok(CodeGeneration::new(
             vec![],
             [dynamic_stmt
-                .clone()
                 .map(|stmt| CodeGenerationHoistedStmt::new("__turbopack_dynamic__".into(), stmt))]
             .into_iter()
             .flatten()
@@ -689,7 +688,7 @@ impl EsmExports {
                 "__turbopack_esm__".into(),
                 quote!("$turbopack_esm($getters);" as Stmt,
                     turbopack_esm: Expr = TURBOPACK_ESM.into(),
-                    getters: Expr = getters.clone()
+                    getters: Expr = getters
                 ),
             )],
         ))
Repository: ggml-org/llama.cpp
Pull request: server: fix regression on streamed non-chat completion w/ stops

Fixes https://github.com/ggml-org/llama.cpp/issues/13780 (regression from https://github.com/ggml-org/llama.cpp/pull/12379)

Make new message differ less strict: partial stop words aren't erased by server_context::process_token, but full stop words are (which was breaking the wrong assumption of the diffing logic)

(added slow server test for non-chat completion + stream + stop combo)

Changed files:
filename: common/chat.cpp
patch: @@ -31,6 +31,11 @@ static std::string string_diff(const std::string & last, const std::string & cur
         return current;
     }
     if (!string_starts_with(current, last)) {
+        if (string_starts_with(last, current)) {
+            // This happens if the last generation ended on a partial stop word (not erased),
+            // and the current ended on a stop word (erased).
+            return "";
+        }
         throw std::runtime_error("Invalid diff: '" + last + "' not found at start of '" + current + "'");
     }
     return current.substr(last.size());

filename: tools/server/tests/unit/test_completion.py
patch: @@ -121,6 +121,30 @@ def test_completion_stream_with_openai_library():
     assert match_regex("(going|bed)+", output_text)
 
 
+# Test case from https://github.com/ggml-org/llama.cpp/issues/13780
+@pytest.mark.slow
+def test_completion_stream_with_openai_library_stops():
+    global server
+    server.model_hf_repo = "bartowski/Phi-3.5-mini-instruct-GGUF:Q4_K_M"
+    server.model_hf_file = None
+    server.start()
+    client = OpenAI(api_key="dummy", base_url=f"http://{server.server_host}:{server.server_port}/v1")
+    res = client.completions.create(
+        model="davinci-002",
+        prompt="System: You are helpfull assistant.\nAssistant:\nHey! How could I help?\nUser:\nTell me a joke.\nAssistant:\n",
+        stop=["User:\n", "Assistant:\n"],
+        max_tokens=200,
+        stream=True,
+    )
+    output_text = ''
+    for data in res:
+        choice = data.choices[0]
+        if choice.finish_reason is None:
+            assert choice.text is not None
+            output_text += choice.text
+    assert match_regex("Sure, here's one for[\\s\\S]*", output_text), f'Unexpected output: {output_text}'
+
+
 @pytest.mark.parametrize("n_slots", [1, 2])
 def test_consistent_result_same_seed(n_slots: int):
     global server
Repository: vercel/next.js
Pull request: fix(CI): Remove comments from labeler config

The labeler reads this as json5 here: https://github.com/vercel/next-labeler-webhook/blob/1ecc3b54c2b03fae950c7cb2dd859cf63c3e8684/src/app/api/label/utils/fetchConfig.ts#L1

But apparently something else is also reading it and expecting JSON?

![Screenshot 2025-05-09 at 4.47.49 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/HAZVitxRNnZz8QMiPn4a/625ba150-a5d1-4e93-b6f8-37907f93a06b.png)

Closes PACK-4568

Changed files:
filename: .github/labeler.json
patch: @@ -1,4 +1,3 @@
-// This is a JSON5 file, processed by https://github.com/vercel/next-labeler-webhook/
 {
   "labels": {
     "create-next-app": ["packages/create-next-app/**"],
@@ -8,8 +7,6 @@
     "tests": ["test/**", "bench/**"],
     "Turbopack": ["crates/next-*/**", "crates/napi/**", "turbopack/**"],
     "Rspack": [
-      // Usernames sourced from: https://rspack.dev/misc/team/core-team
-      // This label determines whether or not to run the Rspack CI alongside the normal CI jobs
       { "type": "user", "pattern": "9aoy" },
       { "type": "user", "pattern": "ahabhgk" },
       { "type": "user", "pattern": "bvanjoi" },
@@ -35,7 +32,6 @@
       { "type": "user", "pattern": "xc2" },
       { "type": "user", "pattern": "zackarychapple" },
       { "type": "user", "pattern": "zoolsher" },
-      // these files are mostly webpack plugins/configs
       "packages/next/src/build/**"
     ],
     "created-by: Chrome Aurora": [
Repository: nodejs/node
Pull request: doc: add added tag and fix typo sqlite.md

Very cool to see my PR #54181 released!

I noticed that the version added line was missing because I forgot to use `REPLACEME`.

Also I fixed a typo `databsase` -> `database`.

Changed files:
filename: doc/api/sqlite.md
patch: @@ -156,6 +156,10 @@ around [`sqlite3_prepare_v2()`][].
 
 ### `database.createSession([options])`
 
+<!-- YAML
+added: v23.3.0
+-->
+
 * `options` {Object} The configuration options for the session.
   * `table` {string} A specific table to track changes for. By default, changes to all tables are tracked.
   * `db` {string} Name of the database to track. This is useful when multiple databases have been added using [`ATTACH DATABASE`][]. **Default**: `'main'`.
@@ -165,14 +169,18 @@ Creates and attaches a session to the database. This method is a wrapper around
 
 ### `database.applyChangeset(changeset[, options])`
 
+<!-- YAML
+added: v23.3.0
+-->
+
 * `changeset` {Uint8Array} A binary changeset or patchset.
 * `options` {Object} The configuration options for how the changes will be applied.
   * `filter` {Function} Skip changes that, when targeted table name is supplied to this function, return a truthy value.
     By default, all changes are attempted.
   * `onConflict` {number} Determines how conflicts are handled. **Default**: `SQLITE_CHANGESET_ABORT`.
     * `SQLITE_CHANGESET_OMIT`: conflicting changes are omitted.
     * `SQLITE_CHANGESET_REPLACE`: conflicting changes replace existing values.
-    * `SQLITE_CHANGESET_ABORT`: abort on conflict and roll back databsase.
+    * `SQLITE_CHANGESET_ABORT`: abort on conflict and roll back database.
 * Returns: {boolean} Whether the changeset was applied succesfully without being aborted.
 
 An exception is thrown if the database is not
@@ -198,15 +206,27 @@ targetDb.applyChangeset(changeset);
 
 ## Class: `Session`
 
+<!-- YAML
+added: v23.3.0
+-->
+
 ### `session.changeset()`
 
+<!-- YAML
+added: v23.3.0
+-->
+
 * Returns: {Uint8Array} Binary changeset that can be applied to other databases.
 
 Retrieves a changeset containing all changes since the changeset was created. Can be called multiple times.
 An exception is thrown if the database or the session is not open. This method is a wrapper around [`sqlite3session_changeset()`][].
 
 ### `session.patchset()`
 
+<!-- YAML
+added: v23.3.0
+-->
+
 * Returns: {Uint8Array} Binary patchset that can be applied to other databases.
 
 Similar to the method above, but generates a more compact patchset. See [Changesets and Patchsets][]
Repository: denoland/deno
Pull request: fix(inspector): Fix panic when re-entering runtime ops

Mark `op_require_break_on_next_statement` as reentrant and properly release borrow on the `OpState`. This fixes `BorrowMut` assertions when running with inspector + op metrics.

Fixes https://github.com/denoland/deno/issues/25515


Changed files:
filename: ext/node/ops/require.rs
patch: @@ -591,12 +591,14 @@ where
   }
 }
 
-#[op2(fast)]
-pub fn op_require_break_on_next_statement(state: &mut OpState) {
-  let inspector = state.borrow::<Rc<RefCell<JsRuntimeInspector>>>();
-  inspector
-    .borrow_mut()
-    .wait_for_session_and_break_on_next_statement()
+#[op2(fast, reentrant)]
+pub fn op_require_break_on_next_statement(state: Rc<RefCell<OpState>>) {
+  let inspector_rc = {
+    let state = state.borrow();
+    state.borrow::<Rc<RefCell<JsRuntimeInspector>>>().clone()
+  };
+  let mut inspector = inspector_rc.borrow_mut();
+  inspector.wait_for_session_and_break_on_next_statement()
 }
 
 fn url_to_file_path_string(url: &Url) -> Result<String, AnyError> {
Repository: facebook/react
Pull request: [Test] Outer boundary should not report errors from an inner boundary

@jplhomer reported an issue with hydration error messages in #24578

The root issue is if you have a pair of nested Suspense boundaries, if the inner one has hydration errors caused by something suspended but the outer one is not suspended, it will report the inner boundaries errors as recoverable.

The changes in #24532 move the recoverable error logic so that it only fires for the hydrating boundary which resolves this bug and causes the test to pass.


Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
patch: @@ -3531,4 +3531,50 @@ describe('ReactDOMFizzServer', () => {
       console.error = originalConsoleError;
     }
   });
+
+  // @gate experimental
+  it('#24578 Hydration errors caused by a suspending component should not become recoverable when nested in an ancestor Suspense that is showing primary content', async () => {
+    // this test failed before because hydration errors on the inner boundary were upgraded to recoverable by
+    // a codepath of the outer boundary
+    function App({isClient}) {
+      return (
+        <Suspense fallback={'outer'}>
+          <Suspense fallback={'inner'}>
+            <div>
+              {isClient ? <AsyncText text="A" /> : <Text text="A" />}
+              <b>B</b>
+            </div>
+          </Suspense>
+        </Suspense>
+      );
+    }
+    await act(async () => {
+      const {pipe} = ReactDOMFizzServer.renderToPipeableStream(<App />);
+      pipe(writable);
+    });
+
+    const errors = [];
+    ReactDOMClient.hydrateRoot(container, <App isClient={true} />, {
+      onRecoverableError(error) {
+        errors.push(error.message);
+      },
+    });
+
+    expect(Scheduler).toFlushAndYield([]);
+    expect(errors).toEqual([]);
+    expect(getVisibleChildren(container)).toEqual(
+      <div>
+        A<b>B</b>
+      </div>,
+    );
+
+    resolveText('A');
+    expect(Scheduler).toFlushAndYield([]);
+    expect(errors).toEqual([]);
+    expect(getVisibleChildren(container)).toEqual(
+      <div>
+        A<b>B</b>
+      </div>,
+    );
+  });
 });
Repository: electron/electron
Pull request: fix: EyeDropper working in devtools (32-x-y)

Manually backport #43685 to 32-x-y. See that PR for details.

Notes: Fixed an issue where clicking the eyedropper icon did nothing instead of opening an eyedropper for color selection as expected.

Changed files:
filename: shell/browser/ui/inspectable_web_contents.cc
patch: @@ -797,6 +797,7 @@ void InspectableWebContents::SetEyeDropperActive(bool active) {
   if (delegate_)
     delegate_->DevToolsSetEyeDropperActive(active);
 }
+
 void InspectableWebContents::ShowCertificateViewer(
     const std::string& cert_chain) {}
 
@@ -1000,6 +1001,13 @@ void InspectableWebContents::CloseContents(content::WebContents* source) {
   CloseDevTools();
 }
 
+std::unique_ptr<content::EyeDropper> InspectableWebContents::OpenEyeDropper(
+    content::RenderFrameHost* frame,
+    content::EyeDropperListener* listener) {
+  auto* delegate = web_contents_->GetDelegate();
+  return delegate ? delegate->OpenEyeDropper(frame, listener) : nullptr;
+}
+
 void InspectableWebContents::RunFileChooser(
     content::RenderFrameHost* render_frame_host,
     scoped_refptr<content::FileSelectListener> listener,

filename: shell/browser/ui/inspectable_web_contents.h
patch: @@ -208,6 +208,9 @@ class InspectableWebContents
   bool HandleKeyboardEvent(content::WebContents*,
                            const input::NativeWebKeyboardEvent&) override;
   void CloseContents(content::WebContents* source) override;
+  std::unique_ptr<content::EyeDropper> OpenEyeDropper(
+      content::RenderFrameHost* frame,
+      content::EyeDropperListener* listener) override;
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       scoped_refptr<content::FileSelectListener> listener,
                       const blink::mojom::FileChooserParams& params) override;
Repository: nodejs/node
Pull request: build: fix GN build for sqlite

Fix the GN build failure after merging #54181.

Changed files:
filename: deps/sqlite/unofficial.gni
patch: @@ -7,6 +7,10 @@
 template("sqlite_gn_build") {
   config("sqlite_config") {
     include_dirs = [ "." ]
+    defines = [
+      "SQLITE_ENABLE_SESSION",
+      "SQLITE_ENABLE_PREUPDATE_HOOK",
+    ]
   }
 
   gypi_values = exec_script("../../tools/gypi_to_gn.py",
Repository: ggml-org/llama.cpp
Pull request: llama : clarify deprecation message

fix https://github.com/ggml-org/llama.cpp/issues/13793

See https://github.com/ggml-org/llama.cpp/issues/13793#issuecomment-2908960352

Changed files:
filename: include/llama.h
patch: @@ -612,11 +612,11 @@ extern "C" {
     // Returns the number of tokens in the KV cache (slow, use only for debug)
     // If a KV cell has multiple sequences assigned to it, it will be counted multiple times
     DEPRECATED(LLAMA_API int32_t llama_kv_self_n_tokens(const struct llama_context * ctx),
-               "Use llama_kv_self_seq_pos_max() instead");
+               "Use llama_kv_self_seq_pos_max() and llama_kv_self_seq_pos_min() instead (https://github.com/ggml-org/llama.cpp/issues/13793)");
 
     // Returns the number of used KV cells (i.e. have at least one sequence assigned to them)
     DEPRECATED(LLAMA_API int32_t llama_kv_self_used_cells(const struct llama_context * ctx),
-               "Use llama_kv_self_seq_pos_max() instead");
+               "Use llama_kv_self_seq_pos_max() and llama_kv_self_seq_pos_min() instead (https://github.com/ggml-org/llama.cpp/issues/13793)");
 
     // Clear the KV cache - both cell info is erased and KV data is zeroed
     LLAMA_API void llama_kv_self_clear(
Repository: electron/electron
Pull request: fix: `createWindow` shouldn't load URL for `webContents`

Backport of #43775.

See that PR for details.

Notes: Fixed a potential issue accessing a child window document when overriding browserWindow creation via `setWindowOpenHandler`.

Changed files:
filename: lib/browser/guest-window-manager.ts
patch: @@ -71,14 +71,6 @@ export function openGuestWindow ({ embedder, guest, referrer, disposition, postD
         throw new Error('Invalid webContents. Created window should be connected to webContents passed with options object.');
       }
 
-      webContents.loadURL(url, {
-        httpReferrer: referrer,
-        ...(postData && {
-          postData,
-          extraHeaders: formatPostDataHeaders(postData as Electron.UploadRawData[])
-        })
-      });
-
       handleWindowLifecycleEvents({ embedder, frameName, guest, outlivesOpener });
     }
 

filename: spec/guest-window-manager-spec.ts
patch: @@ -234,6 +234,10 @@ describe('webContents.setWindowOpenHandler', () => {
             response.statusCode = 200;
             response.end('<title>Child page</title>');
             break;
+          case '/test':
+            response.statusCode = 200;
+            response.end('<title>Test page</title>');
+            break;
           default:
             throw new Error(`Unsupported endpoint: ${request.url}`);
         }
@@ -306,7 +310,33 @@ describe('webContents.setWindowOpenHandler', () => {
       expect(childWindow.title).to.equal(browserWindowTitle);
     });
 
-    it('spawns browser window with overriden options', async () => {
+    it('should be able to access the child window document when createWindow is provided', async () => {
+      browserWindow.webContents.setWindowOpenHandler(() => {
+        return {
+          action: 'allow',
+          createWindow: (options) => {
+            const child = new BrowserWindow(options);
+            return child.webContents;
+          }
+        };
+      });
+
+      const aboutBlankTitle = await browserWindow.webContents.executeJavaScript(`
+        const win1 = window.open('about:blank', '', 'show=no');
+        win1.document.title = 'about-blank-title';
+        win1.document.title;
+      `);
+      expect(aboutBlankTitle).to.equal('about-blank-title');
+
+      const serverPageTitle = await browserWindow.webContents.executeJavaScript(`
+        const win2 = window.open('${url}/child', '', 'show=no');
+        win2.document.title = 'server-page-title';
+        win2.document.title;
+      `);
+      expect(serverPageTitle).to.equal('server-page-title');
+    });
+
+    it('spawns browser window with overridden options', async () => {
       const childWindow = await new Promise<Electron.BrowserWindow>(resolve => {
         browserWindow.webContents.setWindowOpenHandler(() => {
           return {
Repository: denoland/deno
Pull request: bench: fix CI

Fixes bench failures on `main` branch.

Changed files:
filename: cli/bench/http.rs
patch: @@ -49,15 +49,15 @@ pub fn benchmark(
     }
 
     let port = get_port();
-    // deno run -A --unstable <path> <addr>
+    // deno run -A --unstable-net <path> <addr>
     res.insert(
       file_stem.to_string(),
       run(
         &[
           deno_exe.as_str(),
           "run",
           "--allow-all",
-          "--unstable",
+          "--unstable-net",
           "--enable-testing-features-do-not-use",
           path,
           &server_addr(port),