Northy1717/SWE-bench-Live huggingface dataset:
Repository: deepset-ai/haystack

Issue:
`ChatMessage.to_openai_dict_format()` ignores the `name` field
**Describe the bug**
`Chat Message`s have an optional `name` field which is handled by `ChatMessage.from_openai_dict_format()` but ignored by `ChatMessage.to_openai_dict_format()`.

**Expected behavior**
I would expect the name to be transmitted to the LLM.

**FAQ Check**
- [x] Have you had a look at [our new FAQ page](https://docs.haystack.deepset.ai/docs/faq)?

**System:**
 - OS:
 - GPU/CPU:
 - Haystack version (commit or version number): v2.10.3
 - DocumentStore:
 - Reader:
 - Retriever:



Discussion:
Hey! Thanks for reporting this inconsistency.

Feel free to open a PR to fix this.
Otherwise, we'll take a look...



Patch:
diff --git a/haystack/dataclasses/chat_message.py b/haystack/dataclasses/chat_message.py
index 925259359f..e885e0565f 100644
--- a/haystack/dataclasses/chat_message.py
+++ b/haystack/dataclasses/chat_message.py
@@ -371,6 +371,10 @@ def to_openai_dict_format(self) -> Dict[str, Any]:
 
         openai_msg: Dict[str, Any] = {"role": self._role.value}
 
+        # Add name field if present
+        if self._name is not None:
+            openai_msg["name"] = self._name
+
         if tool_call_results:
             result = tool_call_results[0]
             if result.origin.id is None:
diff --git a/releasenotes/notes/add-chat-message-name-field-a8ae96fb9ff13f7b.yaml b/releasenotes/notes/add-chat-message-name-field-a8ae96fb9ff13f7b.yaml
new file mode 100644
index 0000000000..065aa89200
--- /dev/null
+++ b/releasenotes/notes/add-chat-message-name-field-a8ae96fb9ff13f7b.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    In the `ChatMessage.to_openai_dict_format` utility method,
+    include the `name` field in the returned dictionary, if present.
+    Previously, the `name` field was erroneously skipped.


Test patch:
diff --git a/test/dataclasses/test_chat_message.py b/test/dataclasses/test_chat_message.py
index 00f8e56066..be1de7e595 100644
--- a/test/dataclasses/test_chat_message.py
+++ b/test/dataclasses/test_chat_message.py
@@ -257,6 +257,12 @@ def test_to_openai_dict_format():
     )
     assert message.to_openai_dict_format() == {"role": "tool", "content": tool_result, "tool_call_id": "123"}
 
+    message = ChatMessage.from_user(text="I have a question", name="John")
+    assert message.to_openai_dict_format() == {"role": "user", "content": "I have a question", "name": "John"}
+
+    message = ChatMessage.from_assistant(text="I have an answer", name="Assistant1")
+    assert message.to_openai_dict_format() == {"role": "assistant", "content": "I have an answer", "name": "Assistant1"}
+
 
 def test_to_openai_dict_format_invalid():
     message = ChatMessage(_role=ChatRole.ASSISTANT, _content=[])
Repository: aws-cloudformation/cfn-lint

Issue:
W3037 erroring on condition in iam policy actions
### CloudFormation Lint Version

1.30.0

### What operating system are you using?

windows

### Describe the bug

[cfn-lint] W3037: {'Fn::If': ['Condition1', 'ec2:*', {'Ref': 'AWS::NoValue'}]} is not a valid action. Must be of the form service:action or '*'

started receiving this error in the last week or 2. I am not sure which release started triggering this but i know there have been a few updates recently related to validating iam actions and resources.

### Expected behavior

conditions should be allowed in policies

### Reproduction template

```
      Policies:
        - PolicyName: 'role-policy'
          PolicyDocument:
            Version: 2012-10-17
            Statement:
              - Effect: Allow
                Action:
                  - !If
                    - Condition1
                    - ec2:*
                    - !Ref AWS::NoValue
                Resource: '*'
```


Discussion:

Patch:
diff --git a/src/cfnlint/rules/resources/iam/Permissions.py b/src/cfnlint/rules/resources/iam/Permissions.py
index b5ca203fc0..35576af1ac 100644
--- a/src/cfnlint/rules/resources/iam/Permissions.py
+++ b/src/cfnlint/rules/resources/iam/Permissions.py
@@ -40,6 +40,8 @@ def validate(
         actions = ensure_list(instance)
 
         for action in actions:
+            if not validator.is_type(action, "string"):
+                continue
             if action == "*":
                 continue
             if ":" not in action:


Test patch:
diff --git a/test/unit/rules/resources/iam/test_iam_permissions.py b/test/unit/rules/resources/iam/test_iam_permissions.py
index f4b9068977..a78a2f1910 100644
--- a/test/unit/rules/resources/iam/test_iam_permissions.py
+++ b/test/unit/rules/resources/iam/test_iam_permissions.py
@@ -30,6 +30,7 @@ def rule():
         ("Invalid string with starting astrisk", "s3:*Foo", 1),
         ("Invalid service", "foo:Bar", 1),
         ("Empty string", "", 1),
+        ("A function", {"Ref": "MyParameter"}, 0),
     ],
 )
 def test_permissions(name, instance, err_count, rule, validator):
Repository: iterative/dvc

Issue:
Show default in `dvc remote list`
`dvc remote list` does not show which is the default. It would be very helpful to add this as another column.


Discussion:

Patch:
diff --git a/dvc/commands/remote.py b/dvc/commands/remote.py
index 4b6921dd75..325eeda255 100644
--- a/dvc/commands/remote.py
+++ b/dvc/commands/remote.py
@@ -110,8 +110,16 @@ def run(self):
 class CmdRemoteList(CmdRemote):
     def run(self):
         conf = self.config.read(self.args.level)
+        default_remote = conf["core"].get("remote")
+
         for name, remote_conf in conf["remote"].items():
-            ui.write(name, remote_conf["url"], sep="\t")
+            if name == default_remote:
+                text = f"{name}\t{remote_conf['url']}\t(default)"
+                color = "green"
+            else:
+                text = f"{name}\t{remote_conf['url']}"
+                color = ""
+            ui.write(ui.rich_text(text, style=color), styled=True)
         return 0
 
 


Test patch:
diff --git a/tests/func/test_remote.py b/tests/func/test_remote.py
index 9604f1807a..da8826dfbc 100644
--- a/tests/func/test_remote.py
+++ b/tests/func/test_remote.py
@@ -115,6 +115,20 @@ def test_show_default(dvc, capsys):
     assert out == "foo\n"
 
 
+def test_list_shows_default(dvc, capsys):
+    default_remote = "foo"
+    other_remote = "bar"
+    bucket_url = "s3://bucket/name"
+    assert main(["remote", "add", default_remote, bucket_url]) == 0
+    assert main(["remote", "add", other_remote, bucket_url]) == 0
+    assert main(["remote", "default", default_remote]) == 0
+    assert main(["remote", "list"]) == 0
+    out, _ = capsys.readouterr()
+    out_lines = out.splitlines()
+    assert out_lines[0].split() == [default_remote, bucket_url, "(default)"]
+    assert out_lines[1].split() == [other_remote, bucket_url]
+
+
 def test_upper_case_remote(tmp_dir, dvc, local_cloud):
     remote_name = "UPPERCASEREMOTE"
Repository: matplotlib/matplotlib

Issue:
[Bug]: set_rticks makes polar autoscale move the origin away from zero
### Bug summary

On polar axes, autoscaling (which only applies on the radial direction) normally avoids moving the origin away from r=0 (unless there's negative radius data).  However, this behavior is lost if set_rticks has been called first.

(split out of #29516)

### Code for reproduction

```Python
import matplotlib.pyplot as plt

ax = plt.figure().add_subplot(projection="polar")
ax.plot([0, 1], [2, 3])  # theta, r
print(ax.get_ylim())  # -> rlim = (0, 3.05), OK: lower r=0 bound forced

ax = plt.figure().add_subplot(projection="polar")
ax.set_rticks([1, 2, 3, 4])
print(ax.get_ylim())  # -> rlim = (0, 4), OK
ax.plot([0, 1], [2, 3])  # theta, r
print(ax.get_ylim())  # -> rlim = (1.95, 3.05), oops: lower r=0 bound lost
```

### Actual outcome

See comments in code.

### Expected outcome

The last autoscaling should also set rlims to (0, 3.05).

### Additional information

_No response_

### Operating system

any

### Matplotlib Version

3.11.0.dev342+g3b54c6abab

### Matplotlib Backend

agg

### Python version

3.13

### Jupyter version

no

### Installation

git checkout


Discussion:

Patch:
diff --git a/lib/matplotlib/projections/polar.py b/lib/matplotlib/projections/polar.py
index 7fe6045039b1..71224fb3affe 100644
--- a/lib/matplotlib/projections/polar.py
+++ b/lib/matplotlib/projections/polar.py
@@ -1292,7 +1292,10 @@ def set_rscale(self, *args, **kwargs):
         return Axes.set_yscale(self, *args, **kwargs)
 
     def set_rticks(self, *args, **kwargs):
-        return Axes.set_yticks(self, *args, **kwargs)
+        result = Axes.set_yticks(self, *args, **kwargs)
+        self.yaxis.set_major_locator(
+            self.RadialLocator(self.yaxis.get_major_locator(), self))
+        return result
 
     def set_thetagrids(self, angles, labels=None, fmt=None, **kwargs):
         """


Test patch:
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
index ff2ad6433e6b..27bcd3fa11a8 100644
--- a/lib/matplotlib/tests/test_polar.py
+++ b/lib/matplotlib/tests/test_polar.py
@@ -506,3 +506,23 @@ def test_polar_errorbar(order):
         ax.errorbar(theta, r, xerr=0.1, yerr=0.1, capsize=7, fmt="o", c="seagreen")
         ax.set_theta_zero_location("N")
         ax.set_theta_direction(-1)
+
+
+def test_radial_limits_behavior():
+    # r=0 is kept as limit if positive data and ticks are used
+    # negative ticks or data result in negative limits
+    fig = plt.figure()
+    ax = fig.add_subplot(projection='polar')
+    assert ax.get_ylim() == (0, 1)
+    # upper limit is expanded to include the ticks, but lower limit stays at 0
+    ax.set_rticks([1, 2, 3, 4])
+    assert ax.get_ylim() == (0, 4)
+    # upper limit is autoscaled to data, but lower limit limit stays 0
+    ax.plot([1, 2], [1, 2])
+    assert ax.get_ylim() == (0, 2)
+    # negative ticks also expand the negative limit
+    ax.set_rticks([-1, 0, 1, 2])
+    assert ax.get_ylim() == (-1, 2)
+    # negative data also autoscales to negative limits
+    ax.plot([1, 2], [-1, -2])
+    assert ax.get_ylim() == (-2, 2)