helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: cmd: set OpenCode default model in config


Changed files:
filename: cmd/launch/opencode.go
patch: @@ -147,6 +147,7 @@ func (o *OpenCode) Edit(modelList []string) error {
 	ollama["models"] = models
 	provider["ollama"] = ollama
 	config["provider"] = provider
+	config["model"] = "ollama/" + modelList[0]
 
 	configData, err := json.MarshalIndent(config, "", "  ")
 	if err != nil {

filename: cmd/launch/opencode_test.go
patch: @@ -49,6 +49,7 @@ func TestOpenCodeEdit(t *testing.T) {
 			t.Fatal(err)
 		}
 		assertOpenCodeModelExists(t, configPath, "llama3.2")
+		assertOpenCodeDefaultModel(t, configPath, "ollama/llama3.2")
 		assertOpenCodeRecentModel(t, statePath, 0, "ollama", "llama3.2")
 	})
 
@@ -157,11 +158,13 @@ func TestOpenCodeEdit(t *testing.T) {
 		o.Edit([]string{"llama3.2", "mistral"})
 		assertOpenCodeModelExists(t, configPath, "llama3.2")
 		assertOpenCodeModelExists(t, configPath, "mistral")
+		assertOpenCodeDefaultModel(t, configPath, "ollama/llama3.2")
 
 		// Then remove one by only selecting the other
 		o.Edit([]string{"llama3.2"})
 		assertOpenCodeModelExists(t, configPath, "llama3.2")
 		assertOpenCodeModelNotExists(t, configPath, "mistral")
+		assertOpenCodeDefaultModel(t, configPath, "ollama/llama3.2")
 	})
 
 	t.Run("preserve user customizations on managed models", func(t *testing.T) {
@@ -338,6 +341,22 @@ func assertOpenCodeModelNotExists(t *testing.T, path, model string) {
 	}
 }
 
+func assertOpenCodeDefaultModel(t *testing.T, path, want string) {
+	t.Helper()
+	data, err := os.ReadFile(path)
+	if err != nil {
+		t.Fatal(err)
+	}
+	var cfg map[string]any
+	if err := json.Unmarshal(data, &cfg); err != nil {
+		t.Fatal(err)
+	}
+	got, _ := cfg["model"].(string)
+	if got != want {
+		t.Fatalf("default model = %q, want %q", got, want)
+	}
+}
+
 func assertOpenCodeRecentModel(t *testing.T, path string, index int, providerID, modelID string) {
 	t.Helper()
 	data, err := os.ReadFile(path)
Repository: vercel/next.js
Pull request: [test] Unflake `use-node-streams-env-precedence` test

CI is slow sometimes ([x-ref](https://github.com/vercel/next.js/actions/runs/23353631446/job/67939293839)), so we're removing the low custom test timeout to allow more time to build the test fixture.

We're also moving the test from `test/e2e` to `test/production` since it's only testing the build output, and doesn't need to be run in dev and deploy modes.

Changed files:
filename: test/production/app-dir/use-node-streams-env-precedence/use-node-streams-env-precedence.test.ts
patch: @@ -1,23 +1,17 @@
 import { nextTestSetup } from 'e2e-utils'
 
 describe('use-node-streams env precedence', () => {
-  const { next, isNextDev, skipped } = nextTestSetup({
+  const { next } = nextTestSetup({
     files: __dirname,
-    skipDeployment: true,
     skipStart: true,
     env: {
       __NEXT_USE_NODE_STREAMS: 'true',
     },
   })
 
-  if (isNextDev || skipped) {
-    it.skip('only testable in start mode', () => {})
-    return
-  }
-
   it('should respect explicit useNodeStreams=false even when env flag is true', async () => {
     const { exitCode, cliOutput } = await next.build()
     expect(exitCode).toBe(0)
     expect(cliOutput).toContain('useNodeStreams')
-  }, 30_000)
+  })
 })
Repository: huggingface/transformers
Pull request: fix: hf-doc-builder insallation was failing

# What does this PR do?

The `dev` extra now indirectly pulls hf-doc-builder so the install step failed.

We also need to update to current main for the latest features

Changed files:
filename: docker/transformers-doc-builder/Dockerfile
patch: @@ -4,7 +4,11 @@ LABEL maintainer="Hugging Face"
 RUN apt update
 RUN git clone https://github.com/huggingface/transformers
 
-RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder ./transformers[dev]
+RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir ./transformers[dev]
+
+# We want to use the latest doc-builder when building docs
+RUN python3 -m pip install -U git+https://github.com/huggingface/doc-builder.git@main
+
 RUN apt-get -y update && apt-get install -y libsndfile1-dev && apt install -y tesseract-ocr
 
 # Torch needs to be installed before deepspeed
@@ -15,4 +19,4 @@ RUN python3 -m pip install -U "itsdangerous<2.1.0"
 
 # Test if the image could successfully build the doc. before publishing the image
 RUN doc-builder build transformers transformers/docs/source/en --build_dir doc-build-dev --notebook_dir notebooks/transformers_doc --clean
-RUN rm -rf doc-build-dev
\ No newline at end of file
+RUN rm -rf doc-build-dev
Repository: rust-lang/rust
Pull request: Suggest similar keyword when visibility is not followed by an item

Fixes rust-lang/rust#153353.

I would appreciate feedback on the following:
- I inlined [`find_similar_kw`](https://github.com/rust-lang/rust/blob/cd14b73b4a41542d921f59e362a5b5005fa4f2ef/compiler/rustc_parse/src/parser/diagnostics.rs#L218-L224) instead of changing its visibility to `pub(super)`. I am happy to switch if it is preferred;
- I didn't add a comment to the new test. Although the rustc-dev-guide specifies that a [comment should be added](https://rustc-dev-guide.rust-lang.org/tests/adding.html#comment-explaining-what-the-test-is-about) to every new test, this is not common in `tests/ui/parser/misspelled_keywords/` and the test seems self-explanatory. Let me know if you would like me to add a comment;

Thank you in advance for your time and input!

Changed files:
filename: compiler/rustc_parse/src/parser/item.rs
patch: @@ -192,7 +192,22 @@ impl<'a> Parser<'a> {
 
             // At this point, we have failed to parse an item.
             if !matches!(vis.kind, VisibilityKind::Inherited) {
-                this.dcx().emit_err(errors::VisibilityNotFollowedByItem { span: vis.span, vis });
+                let mut err = this
+                    .dcx()
+                    .create_err(errors::VisibilityNotFollowedByItem { span: vis.span, vis });
+                if let Some((ident, _)) = this.token.ident()
+                    && !ident.is_used_keyword()
+                    && let Some((similar_kw, is_incorrect_case)) = ident
+                        .name
+                        .find_similar(&rustc_span::symbol::used_keywords(|| ident.span.edition()))
+                {
+                    err.subdiagnostic(errors::MisspelledKw {
+                        similar_kw: similar_kw.to_string(),
+                        span: ident.span,
+                        is_incorrect_case,
+                    });
+                }
+                err.emit();
             }
 
             if let Defaultness::Default(span) = def {

filename: tests/ui/parser/misspelled-keywords/pub-const-fn.rs
patch: @@ -0,0 +1,5 @@
+pub cnst fn code() {}
+//~^ ERROR visibility `pub` is not followed by an item
+//~| ERROR expected item, found `cnst`
+
+fn main() {}

filename: tests/ui/parser/misspelled-keywords/pub-const-fn.stderr
patch: @@ -0,0 +1,22 @@
+error: visibility `pub` is not followed by an item
+  --> $DIR/pub-const-fn.rs:1:1
+   |
+LL | pub cnst fn code() {}
+   | ^^^ the visibility
+   |
+   = help: you likely meant to define an item, e.g., `pub fn foo() {}`
+help: there is a keyword `const` with a similar name
+   |
+LL | pub const fn code() {}
+   |      +
+
+error: expected item, found `cnst`
+  --> $DIR/pub-const-fn.rs:1:5
+   |
+LL | pub cnst fn code() {}
+   |     ^^^^ expected item
+   |
+   = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
+
+error: aborting due to 2 previous errors
+
Repository: huggingface/transformers
Pull request: fix `test_register_result_handler`

# What does this PR do ? 

This PR fixes the `test_register_result_handler`. Not sure how it passed in the past when i added it but since CB returns `generated_tokens` from the same list to avoid copy, len(results[i].generated_tokens) for i =0,1,2 will always be the same after the got all the results. I reworked a bit the test to properly test. 

Changed files:
filename: tests/generation/test_continuous_batching.py
patch: @@ -849,27 +849,24 @@ def test_register_result_handler(self) -> None:
         inputs = get_generation_inputs(user_messages, tokenizer, for_continuous_batching=True)[0]
 
         async def collect_results():
-            results = []
+            token_counts = []
             future = asyncio.get_running_loop().create_future()
 
             def on_result(output):
-                results.append(output)
+                token_counts.append(len(output.generated_tokens))
                 if output.is_finished():
                     future.set_result(True)
 
             request_id = manager.add_request(inputs, max_new_tokens=max_new_tokens, streaming=True)
             manager.register_result_handler(request_id, on_result)
 
             await asyncio.wait_for(future, timeout=30)
-            return results
+            return token_counts
 
-        results = asyncio.run(collect_results())
+        token_counts = asyncio.run(collect_results())
 
         # Streaming via handler: incremental token count, same as request_id_iter
-        self.assertEqual(len(results[0].generated_tokens), 1)
-        self.assertEqual(len(results[1].generated_tokens), 2)
-        self.assertEqual(len(results[2].generated_tokens), 3)
-        self.assertTrue(results[-1].is_finished())
+        self.assertEqual(token_counts, [1, 2, 3])
         # Queue should be empty — everything went through the handler
         self.assertTrue(manager.output_router.output_queue.empty())
Repository: huggingface/transformers
Pull request: Fix pypi release

# What does this PR do?
Commits that got in the release branch to allow pushing

Changed files:
filename: .github/workflows/release.yml
patch: @@ -30,6 +30,9 @@ jobs:
       - run: pip install -e .[torch]
       - run: python -c "from transformers import pipeline; classifier = pipeline('text-classification'); assert classifier('What a nice release')[0]['score'] > 0"
 
+      - run: pip install twine
+      - run: twine check --strict dist/*
+
       - name: Upload build artifacts
         uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02  # v4
         with:
@@ -57,4 +60,6 @@ jobs:
 
       - name: Publish package distributions to TestPyPI
         uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e  # release/v1
+        with:
+          verbose: true
 

filename: setup.py
patch: @@ -85,7 +85,7 @@
     "filelock",
     "fugashi>=1.0",
     "GitPython<3.1.19",
-    "hf-doc-builder @ git+https://github.com/huggingface/doc-builder.git@main",
+    "hf-doc-builder",
     "huggingface-hub>=1.5.0,<2.0",
     "ipadic>=1.0.0,<2.0",
     "jinja2>=3.1.0",
@@ -292,8 +292,10 @@ def finalize_options(self):
         pass
 
     def run(self):
-        if SUPPORTED_PYTHON_VERSIONS[0] != PYTHON_MINOR_VERSION:
-            print(f"Table updated only when running 3.{SUPPORTED_PYTHON_VERSIONS[0]}.x")
+        if SUPPORTED_PYTHON_VERSIONS[0] >= PYTHON_MINOR_VERSION:
+            print(
+                f"Table updated only when running 3.{SUPPORTED_PYTHON_VERSIONS[0]}.x, detected version is {sys.version}."
+            )
             return
 
         entries = "\n".join([f'    "{k}": "{v}",' for k, v in deps.items()])

filename: src/transformers/dependency_versions_table.py
patch: @@ -17,7 +17,7 @@
     "filelock": "filelock",
     "fugashi": "fugashi>=1.0",
     "GitPython": "GitPython<3.1.19",
-    "hf-doc-builder": "hf-doc-builder @ git+https://github.com/huggingface/doc-builder.git@main",
+    "hf-doc-builder": "hf-doc-builder",
     "huggingface-hub": "huggingface-hub>=1.5.0,<2.0",
     "ipadic": "ipadic>=1.0.0,<2.0",
     "jinja2": "jinja2>=3.1.0",
Repository: facebook/react
Pull request: [Flight Reply] Early bailout if backing entry for Blob deserialization is not a Blob

Additional security hardening to bail out early for malformed Server Action payloads.

The `$B` (Blob) case in `parseModelString` returned whatever `FormData.get()` returned without validating its type. Since `FormData.get()` returns either a string or a File/Blob, an attacker could store a large string in a FormData slot and reference it via `$B`, bypassing the `bumpArrayCount` size guard that applies to regular string values. However, this does not lead to a real attack vector because it doesn't produce amplification. For that, it would need to be combined with regular references in nested arrays, which are covered by the [array counting mitigation](https://github.com/facebook/react/pull/35632).

As a defense-in-depth mitigation, this adds an `instanceof Blob` check that rejects non-Blob backing entries. Bumping the array count for Blob size is not necessary because real Blobs are opaque handles — they don't expand during common operations like `JSON.stringify` (which produces `{}`), `.flat()`, or `.toString()`. The data only materializes through explicit reads like `.text()` or `.arrayBuffer()`, and since all references to the same `$B` ID resolve to the same object, there is no memory duplication.

Changed files:
filename: packages/react-server-dom-webpack/src/__tests__/ReactFlightDOMReply-test.js
patch: @@ -744,4 +744,17 @@ describe('ReactFlightDOMReply', () => {
     // has closed but that's a bug in both ReactFlightReplyServer and ReactFlightClient.
     // It just halts in this case.
   });
+
+  it('cannot deserialize a Blob reference backed by a string', async () => {
+    const formData = new FormData();
+    formData.set('1', '-'.repeat(50000));
+    formData.set('0', JSON.stringify(['$B1']));
+    let error;
+    try {
+      await ReactServerDOMServer.decodeReply(formData, webpackServerMap);
+    } catch (x) {
+      error = x;
+    }
+    expect(error.message).toContain('Referenced Blob is not a Blob.');
+  });
 });

filename: packages/react-server/src/ReactFlightReplyServer.js
patch: @@ -1806,7 +1806,10 @@ function parseModelString(
         const blobKey = prefix + id;
         // We should have this backingEntry in the store already because we emitted
         // it before referencing it. It should be a Blob.
-        const backingEntry: Blob = (response._formData.get(blobKey): any);
+        const backingEntry = response._formData.get(blobKey);
+        if (!(backingEntry instanceof Blob)) {
+          throw new Error('Referenced Blob is not a Blob.');
+        }
         return backingEntry;
       }
       case 'R': {

filename: scripts/error-codes/codes.json
patch: @@ -566,5 +566,6 @@
   "578": "Already initialized Iterator.",
   "579": "Invalid data for bytes stream.",
   "580": "Server Function has too many bound arguments. Received %s but the limit is %s.",
-  "581": "BigInt is too large. Received %s digits but the limit is %s."
+  "581": "BigInt is too large. Received %s digits but the limit is %s.",
+  "582": "Referenced Blob is not a Blob."
 }
Repository: nodejs/node
Pull request: deps: V8: cherry-pick b25cd62c7ba2

Backport V8 upstream commit b25cd62c7ba2 using `git node v8 backport`.

refs:
https://github.com/nodejs/node/pull/61601
https://github.com/nodejs/node/pull/62349

original commit: https://github.com/v8/v8/commit/b25cd62c7ba2 @anonrig 

fyi @aduh95 @Renegade334 

Changed files:
filename: common.gypi
patch: @@ -38,7 +38,7 @@
 
     # Reset this number to 0 on major V8 upgrades.
     # Increment by one for each non-official patch applied to deps/v8.
-    'v8_embedder_string': '-node.16',
+    'v8_embedder_string': '-node.17',
 
     ##### V8 defaults for Node.js #####
 

filename: deps/v8/src/objects/string-inl.h
patch: @@ -1221,6 +1221,12 @@ size_t String::Utf8Length(Isolate* isolate, DirectHandle<String> string) {
         reinterpret_cast<const char*>(vec.begin()), vec.size());
   }
 
+  base::Vector<const base::uc16> vec = content.ToUC16Vector();
+  const char16_t* data = reinterpret_cast<const char16_t*>(vec.begin());
+  if (simdutf::validate_utf16(data, vec.size())) {
+    return simdutf::utf8_length_from_utf16(data, vec.size());
+  }
+
   // TODO(419496232): Use simdutf once upstream bug is resolved.
   size_t utf8_length = 0;
   uint16_t last_character = unibrow::Utf16::kNoPreviousCharacter;
Repository: rust-lang/rust
Pull request: add regression test for Redundant memory strores with mut parameters …



<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r? <reviewer name>
-->
<!-- homu-ignore:end -->
Fixs: rust-lang/rust#149762 

r? compiler


Changed files:
filename: tests/assembly-llvm/riscv-redundant-memory-stores.rs
patch: @@ -0,0 +1,33 @@
+//! Regression test for <https://github.com/rust-lang/rust/issues/149762>:
+
+//@ assembly-output: emit-asm
+//@ compile-flags: -Copt-level=3 --target riscv64gc-unknown-linux-gnu
+//@ needs-llvm-components: riscv
+//@ only-riscv64
+
+pub struct SomeComplexType {
+    a: u64,
+    b: u64,
+    c: u64,
+}
+
+// CHECK-LABEL: with_mut_param
+#[no_mangle]
+pub fn with_mut_param(mut a: SomeComplexType) -> SomeComplexType {
+    // CHECK: ld a2, 0(a1)
+    // CHECK-NEXT: ld a3, 8(a1)
+    // CHECK-NEXT: ld a4, 16(a1)
+    // CHECK-NEXT: addi a2, a2, 10
+    // CHECK-NEXT: addi a3, a3, 2
+    // CHECK-NEXT: sd a2, 0(a1)
+    // CHECK-NEXT: sd a3, 8(a1)
+    // CHECK-NEXT: sd a2, 0(a0)
+    // CHECK-NEXT: sd a3, 8(a0)
+    // CHECK-NEXT: sd a4, 16(a0)
+    // CHECK-NEXT: ret
+    a.a += 10;
+    a.b += 2;
+    a
+}
+
+fn main() {}
Repository: vercel/next.js
Pull request: fix: add @deprecated annotation to experimental.useCache

### What?

Add a `@deprecated` JSDoc annotation to `experimental.useCache` in `config-shared.ts`, pointing to `cacheComponents: true` as the successor.

### Why?

`experimental.cacheComponents` already has `@deprecated use top-level cacheComponents instead`, but `experimental.useCache` has no deprecation notice despite `cacheComponents: true` being the documented successor. This causes both developers and AI coding agents to use the old flag, since nothing in the type definitions signals it's deprecated. IDEs and agents rely on JSDoc annotations for guidance.

### How?

Replace the existing JSDoc comment on `experimental.useCache` with `@deprecated use top-level cacheComponents instead`, matching the existing pattern on `experimental.cacheComponents`.

## PR checklist (Fixing a bug)

- One-line JSDoc change, no tests needed

Made with [Cursor](https://cursor.com)

Changed files:
filename: packages/next/src/server/config-shared.ts
patch: @@ -940,6 +940,7 @@ export interface ExperimentalConfig {
 
   /**
    * Enables the use of the `"use cache"` directive.
+   * @deprecated use top-level `cacheComponents` instead
    */
   useCache?: boolean
Repository: facebook/react
Pull request: [DevTools] fix: don't show empty suspended by section

The potential paddings and margins for the empty block are already handled via CSS selectors.

Changed files:
filename: packages/react-devtools-shared/src/devtools/views/Components/InspectedElementSuspendedBy.js
patch: @@ -584,6 +584,9 @@ export default function InspectedElementSuspendedBy({
       break;
   }
 
+  if (groups.length === 0) {
+    return null;
+  }
   return (
     <div>
       <div className={styles.HeaderRow}>
Repository: nodejs/node
Pull request: tools: do not swallow error in `lint-nix` workflow

The workflow is written in a way that if `nix-shell` fails without changing any local file, the error is swallowed. E.g. in https://github.com/nodejs/node/actions/runs/23114271551/job/67137410705, the linter fails with `error: Build failed due to failed dependency` but the workflow exits as green.

<!--
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: .github/workflows/linters.yml
patch: @@ -154,7 +154,12 @@ jobs:
         run: |
           nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run '
             treefmt --quiet --ci
-          ' || git --no-pager diff --exit-code
+          ' && EXIT_CODE="$?" || EXIT_CODE="$?"
+          if [ "$EXIT_CODE" != "0" ]
+          then
+            git --no-pager diff || true
+            exit "$EXIT_CODE"
+          fi
 
   lint-py:
     if: github.event.pull_request.draft == false