PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: godaddy/kubernetes-external-secrets (js)

Issue:
2.2.0 Failing with TypeError: Cannot destructure property `versionStage` of 'undefined' or 'null'.
@furikake @Flydiverny 2.2.0 poller is failing for ExternalSecrets WITHOUT the new `versionStage` property with error:
`TypeError: Cannot destructure property `versionStage` of 'undefined' or 'null'.`

I will open a PR if I fix it locally.

Pull request:
Add empty keyOptions for dataFrom case.
Resolves #220.

Patch:
diff --git a/lib/backends/kv-backend.js b/lib/backends/kv-backend.js
index e7820ca..7762e1d 100644
--- a/lib/backends/kv-backend.js
+++ b/lib/backends/kv-backend.js
@@ -60,7 +60,7 @@ class KVBackend extends AbstractBackend {
    */
   _fetchDataFromValues ({ dataFrom, specOptions }) {
     return Promise.all(dataFrom.map(async key => {
-      const value = await this._get({ key, specOptions })
+      const value = await this._get({ key, specOptions, keyOptions: {} })
 
       try {
         return JSON.parse(value)
diff --git a/package-lock.json b/package-lock.json
index b76e85c..7802361 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6805,7 +6805,7 @@
     },
     "sprintf-js": {
       "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
       "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
     },
     "sshpk": {


Test patch:
diff --git a/lib/backends/kv-backend.test.js b/lib/backends/kv-backend.test.js
index 9f4b0eb..a0c5ee2 100644
--- a/lib/backends/kv-backend.test.js
+++ b/lib/backends/kv-backend.test.js
@@ -192,6 +192,7 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { passMeAlong: true }
       })
       expect(dataFromValues).deep.equals([undefined])
@@ -208,10 +209,12 @@ describe('kv-backend', () => {
 
       expect(kvBackend._get.getCall(0).args[0]).to.deep.equal({
         key: 'fakePropertyKey1',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(kvBackend._get.getCall(1).args[0]).to.deep.equal({
         key: 'fakePropertyKey2',
+        keyOptions: {},
         specOptions: { roleArn: 'secretDescriptiorRole' }
       })
       expect(dataFromValues).deep.equals([{ fakePropertyName1: 'fakePropertyValue1' }, { fakePropertyName2: 'fakePropertyValue2' }])
Repository: python-attrs/attrs (python)

Issue:
Poor error message/type for validators.in_ with a string
```python
import attr

@attr.s
class C:
   s = attr.ib(validator=attr.validators.in_('abc'))

C(s=1)  # TypeError: 'in <string>' requires string as left operand, not int
```

`__contains__` behaves a little weirdly for strings, but I still think this error could be improved.

Obvious options would be to catch exceptions and re-raise something with a clearer error message, and/or to deprecate use of strings as the collection here.

Found in attrs=18.1.0 while working on HypothesisWorks/hypothesis#954.

Pull request:
Improve error for in_(a_string) with a non-string value
- [x] Added **tests** for changed code.
- [x] Changes (and possible deprecations) have news fragments in [`changelog.d`](https://github.com/python-attrs/attrs/blob/master/changelog.d).
- [x] Is my first attrs PR :heart_eyes:

Closes #382.

Patch:
diff --git a/changelog.d/383.change.rst b/changelog.d/383.change.rst
new file mode 100644
index 0000000..6600b5b
--- /dev/null
+++ b/changelog.d/383.change.rst
@@ -0,0 +1,2 @@
+``attr.validators.in_()`` now raises a ``ValueError`` with a useful message even if the options are a string and the value is not a string.
+This previously raised a ``TypeError``, like ``1 in "abc"``.
diff --git a/src/attr/validators.py b/src/attr/validators.py
index f8892fc..4904e61 100644
--- a/src/attr/validators.py
+++ b/src/attr/validators.py
@@ -135,7 +135,12 @@ class _InValidator(object):
     options = attrib()
 
     def __call__(self, inst, attr, value):
-        if value not in self.options:
+        try:
+            in_options = value in self.options
+        except TypeError as e:  # e.g. `1 in "abc"`
+            in_options = False
+
+        if not in_options:
             raise ValueError(
                 "'{name}' must be in {options!r} (got {value!r})"
                 .format(name=attr.name, options=self.options, value=value)


Test patch:
diff --git a/tests/test_validators.py b/tests/test_validators.py
index 0e67f99..4d24ce9 100644
--- a/tests/test_validators.py
+++ b/tests/test_validators.py
@@ -243,6 +243,19 @@ class TestIn_(object):
             "'test' must be in [1, 2, 3] (got None)",
         ) == e.value.args
 
+    def test_fail_with_string(self):
+        """
+        Raise ValueError if the value is outside our options when the
+        options are specified as a string and the value is not a string.
+        """
+        v = in_("abc")
+        a = simple_attr("test")
+        with pytest.raises(ValueError) as e:
+            v(None, a, None)
+        assert (
+            "'test' must be in 'abc' (got None)",
+        ) == e.value.args
+
     def test_repr(self):
         """
         Returned validator has a useful `__repr__`.
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 19
Good morning! Here's your coding interview problem for today.

This problem was asked by Facebook.

A builder is looking to build a row of N houses that can be of K different colors. He has a goal of minimizing cost while ensuring that no two neighboring houses are of the same color.

Given an N by K matrix where the nth row and kth column represents the cost to build the nth house with kth color, return the minimum cost which achieves this goal.

Pull request:
Day19
Resolves #41 

Patch:
diff --git a/README.md b/README.md
index f828aa3..3e89e6d 100644
--- a/README.md
+++ b/README.md
@@ -29,3 +29,4 @@ problems from
 * [Day 16](https://github.com/vaskoz/dailycodingproblem-go/issues/35)
 * [Day 17](https://github.com/vaskoz/dailycodingproblem-go/issues/37)
 * [Day 18](https://github.com/vaskoz/dailycodingproblem-go/issues/39)
+* [Day 19](https://github.com/vaskoz/dailycodingproblem-go/issues/41)
diff --git a/day19/problem.go b/day19/problem.go
new file mode 100644
index 0000000..950d0d3
--- /dev/null
+++ b/day19/problem.go
@@ -0,0 +1,34 @@
+package day19
+
+import "math"
+
+// PaintingCosts represents the cost to paint in each of these colors.
+type PaintingCosts []int
+
+// Houses represents a list of houses that can be painting a different color for a price.
+type Houses []PaintingCosts
+
+// MinPaintingCost uses dynamic programming to calculate the cheapest way to paint houses
+// so that no adjacent houses have the same color.
+func MinPaintingCost(houses Houses) int {
+	for i := 1; i < len(houses); i++ {
+		for j := range houses[i] {
+			houses[i][j] += minimum(houses[i-1], j)
+		}
+	}
+	return minimum(houses[len(houses)-1], -1)
+}
+
+// minimum returns the minimum of all the values excluding the value at index 'exclude'.
+func minimum(costs PaintingCosts, exclude int) int {
+	var minimum int64 = math.MaxInt64
+	for i, cost := range costs {
+		if i == exclude {
+			continue
+		}
+		if cost64 := int64(cost); cost64 < minimum {
+			minimum = cost64
+		}
+	}
+	return int(minimum)
+}


Test patch:
diff --git a/day19/problem_test.go b/day19/problem_test.go
new file mode 100644
index 0000000..93fd15e
--- /dev/null
+++ b/day19/problem_test.go
@@ -0,0 +1,26 @@
+package day19
+
+import "testing"
+
+var testcases = []struct {
+	houses   Houses
+	expected int
+}{
+	{Houses{PaintingCosts{2, 4, 5}, PaintingCosts{3, 6, 9}}, 7},
+}
+
+func TestMinPaintingCost(t *testing.T) {
+	for _, tc := range testcases {
+		if result := MinPaintingCost(tc.houses); result != tc.expected {
+			t.Errorf("Expected %v but got %v", tc.expected, result)
+		}
+	}
+}
+
+func BenchmarkMinPaintingCost(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			MinPaintingCost(tc.houses)
+		}
+	}
+}