PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: rsteube/carapace (go)
Issue: xonsh: no values cause fallback to file completion
readd dummy completion value with current prefix to prevent default file completion fallback if no values are returned

Pull request description: xonsh: prevent file completion fallback
fix #369 

Patch:
diff --git a/internal/xonsh/snippet.go b/internal/xonsh/snippet.go
index f149bde..ba9c471 100644
--- a/internal/xonsh/snippet.go
+++ b/internal/xonsh/snippet.go
@@ -22,9 +22,12 @@ def _%v_completer(context):
         from xonsh.completers.tools import RichCompletion
         output, _ = Popen(['%v', '_carapace', 'xonsh', '_', *[a.value for a in context.args], context.prefix], stdout=PIPE, stderr=PIPE).communicate()
         try:
-            return {RichCompletion(c["Value"], display=c["Display"], description=c["Description"], prefix_len=len(context.raw_prefix)) for c in loads(output)}
+            result = {RichCompletion(c["Value"], display=c["Display"], description=c["Description"], prefix_len=len(context.raw_prefix)) for c in loads(output)}
         except:
-            return
+            result = {}
+        if len(result) == 0:
+            result = {RichCompletion(context.prefix, display=context.prefix, description='', prefix_len=len(context.raw_prefix))}
+        return result
 
 
 from xonsh.completers._aliases import _add_one_completer


Test patch:
diff --git a/example/cmd/_test/xonsh.py b/example/cmd/_test/xonsh.py
index a5371b5..c1d4b8a 100644
--- a/example/cmd/_test/xonsh.py
+++ b/example/cmd/_test/xonsh.py
@@ -9,9 +9,12 @@ def _example_completer(context):
         from xonsh.completers.tools import RichCompletion
         output, _ = Popen(['example', '_carapace', 'xonsh', '_', *[a.value for a in context.args], context.prefix], stdout=PIPE, stderr=PIPE).communicate()
         try:
-            return {RichCompletion(c["Value"], display=c["Display"], description=c["Description"], prefix_len=len(context.raw_prefix)) for c in loads(output)}
+            result = {RichCompletion(c["Value"], display=c["Display"], description=c["Description"], prefix_len=len(context.raw_prefix)) for c in loads(output)}
         except:
-            return
+            result = {}
+        if len(result) == 0:
+            result = {RichCompletion(context.prefix, display=context.prefix, description='', prefix_len=len(context.raw_prefix))}
+        return result
 
 
 from xonsh.completers._aliases import _add_one_completer
Repository: ron-rs/ron (rust)
Issue: Parser doesn't handle whitespace ...
between `(` and `[` of a `newtype_struct` wrapping a `seq`:

```rust

#[derive(Debug, Deserialize)]
struct Newtype(Vec<String>);

fn main() {
    let serialized = stringify!(
        Newtype([
            "a",
            "b",
            "c",
        ])
    );
    println!("{}", serialized);
    let deserialized: Result<Newtype, _> = ron::de::from_str(serialized);
    println!("{:#?}", deserialized);


    let serialized = r#"
        Newtype([
            "a",
            "b",
            "c",
        ])
    "#;
    println!("{}", serialized);
    let deserialized: Result<Newtype, _> = ron::de::from_str(serialized);
    println!("{:#?}", deserialized);
}
```

```
Newtype ( [ "a" , "b" , "c" , ] )
Err(
    Parser(
        ExpectedArray,
        Position {
            col: 10,
            line: 1
        }
    )
)

        Newtype([
            "a",
            "b",
            "c",
        ])
    
Ok(
    Newtype(
        [
            "a",
            "b",
            "c"
        ]
    )
)
```

(This is what I actually came here to report when I got sidetracked by the linguist+ronn history dive 😆)
Pull request description: Allow more whitespace inside newtypes
Fixes #102 

Patch:
diff --git a/src/de/mod.rs b/src/de/mod.rs
index 355851bb..161ae5f1 100644
--- a/src/de/mod.rs
+++ b/src/de/mod.rs
@@ -313,6 +313,7 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
         self.bytes.skip_ws()?;
 
         if self.bytes.consume("(") {
+            self.bytes.skip_ws()?;
             let value = visitor.visit_newtype_struct(&mut *self)?;
             self.bytes.comma()?;
 


Test patch:
diff --git a/tests/big_struct.rs b/tests/big_struct.rs
index 2497bd63..bd512194 100644
--- a/tests/big_struct.rs
+++ b/tests/big_struct.rs
@@ -39,8 +39,12 @@ pub struct ImGuiStyleSave {
     pub anti_aliased_shapes: bool,
     pub curve_tessellation_tol: f32,
     pub colors: ImColorsSave,
+    pub new_type: NewType,
 }
 
+#[derive(Serialize, Deserialize)]
+pub struct NewType(i32);
+
 const CONFIG: &str = "(
     alpha: 1.0,
     window_padding: (x: 8, y: 8),
@@ -66,6 +70,7 @@ const CONFIG: &str = "(
     anti_aliased_shapes: true,
     curve_tessellation_tol: 1.25,
     colors: (text: 4),
+    new_type: NewType(     1  ),
 
     ignored_field: \"Totally ignored, not causing a panic. Hopefully.\",
 )";
Repository: coreos/dex (go)
Issue: server: don't throw a 500 when a user doesn't exist
Thanks @kans 
Pull request description: *: don't error out if a username doesn't exist in the backing connector
Instead of throwing a 500 error if a user enters an invalid name,
display the same text box as if the user had entered the wrong
password.

NOTE: An invalid username now returns much quicker than an invalid
password. Consider adding an arbitrary sleep in the future if we
care about masking which was invalid.

cc @rithujohn191 @kans @dghubble 

closes #656

Patch:
diff --git a/connector/ldap/ldap.go b/connector/ldap/ldap.go
index 80f84f2a..841ff110 100644
--- a/connector/ldap/ldap.go
+++ b/connector/ldap/ldap.go
@@ -310,7 +310,9 @@ func (c *ldapConnector) Login(username, password string) (ident connector.Identi
 
 		switch n := len(resp.Entries); n {
 		case 0:
-			return fmt.Errorf("ldap: no results returned for filter: %q", filter)
+			log.Printf("ldap: no results returned for filter: %q", filter)
+			incorrectPass = true
+			return nil
 		case 1:
 		default:
 			return fmt.Errorf("ldap: filter returned multiple (%d) results: %q", n, filter)
@@ -335,6 +337,9 @@ func (c *ldapConnector) Login(username, password string) (ident connector.Identi
 	if err != nil {
 		return connector.Identity{}, false, err
 	}
+	if incorrectPass {
+		return connector.Identity{}, false, nil
+	}
 
 	// Encode entry for follow up requests such as the groups query and
 	// refresh attempts.
@@ -364,7 +369,7 @@ func (c *ldapConnector) Login(username, password string) (ident connector.Identi
 		return connector.Identity{}, false, err
 	}
 
-	return ident, !incorrectPass, nil
+	return ident, true, nil
 }
 
 func (c *ldapConnector) Groups(ident connector.Identity) ([]string, error) {
diff --git a/server/server.go b/server/server.go
index 603a23cb..3f347013 100644
--- a/server/server.go
+++ b/server/server.go
@@ -218,8 +218,9 @@ func (db passwordDB) Login(email, password string) (connector.Identity, bool, er
 	if err != nil {
 		if err != storage.ErrNotFound {
 			log.Printf("get password: %v", err)
+			return connector.Identity{}, false, err
 		}
-		return connector.Identity{}, false, err
+		return connector.Identity{}, false, nil
 	}
 	if err := bcrypt.CompareHashAndPassword(p.Hash, []byte(password)); err != nil {
 		return connector.Identity{}, false, nil


Test patch:
diff --git a/server/server_test.go b/server/server_test.go
index 009a8dc2..d3ba1e3e 100644
--- a/server/server_test.go
+++ b/server/server_test.go
@@ -657,10 +657,10 @@ func TestPasswordDB(t *testing.T) {
 			},
 		},
 		{
-			name:     "unknown user",
-			username: "john@example.com",
-			password: pw,
-			wantErr:  true,
+			name:        "unknown user",
+			username:    "john@example.com",
+			password:    pw,
+			wantInvalid: true,
 		},
 		{
 			name:        "invalid password",