Commit e93e24e
Code review fixes/pr 105 (#114)
* Fix inconsistent string representation for failed result with no errors
Improves the __str__ method of OperationResult to return "Failed" instead of
"Failed : " when there are no errors. Also removes the extra space before
the colon for consistency.
Addresses code review Comment 1.
Co-Authored-By: Claude <noreply@anthropic.com>
* Return defensive copy of errors list to protect singleton
The errors property now returns a copy of the internal errors list to
protect the singleton instance returned by success() from accidental
modification. Updated docstring to document this behavior.
Addresses code review Comment 2.
Co-Authored-By: Claude <noreply@anthropic.com>
* Use explicit None check for timestamp validation
Changed timestamp validation from falsy check (if not self.timestamp)
to explicit None check (if self.timestamp is None) for safer and more
intentional validation behavior. Updated error message and test accordingly.
Addresses code review Comment 3.
Co-Authored-By: Claude <noreply@anthropic.com>
* Move local imports to top of file
Moved OperationError, OperationResult, ChatMessageRequest, and
get_chat_history_endpoint imports from inside the send_chat_history
method to the top of the file with the other imports. Removed the
misleading comment about circular dependencies as there is no cycle
in the import graph.
Addresses code review Comment 4.
Co-Authored-By: Claude <noreply@anthropic.com>
* Change endpoint URL log level from INFO to DEBUG
Detailed operational information like endpoint URLs should be logged
at DEBUG level rather than INFO level. INFO level is reserved for
higher-level operation status messages.
Addresses code review Comment 5.
Co-Authored-By: Claude <noreply@anthropic.com>
* Use consistent async test pattern for validation tests
Converted validation tests from synchronous methods using asyncio.run()
to async methods with @pytest.mark.asyncio decorator for consistency
with the other tests in the test suite.
Addresses code review Comment 7.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Johan Broberg <johanb@microsoft.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent a79f8d9 commit e93e24e
6 files changed
Lines changed: 39 additions & 40 deletions
File tree
- libraries
- microsoft-agents-a365-runtime/microsoft_agents_a365/runtime
- microsoft-agents-a365-tooling/microsoft_agents_a365/tooling
- models
- services
- tests
- runtime
- tooling
- models
- services
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
| 93 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
520 | 525 | | |
521 | 526 | | |
522 | 527 | | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
| |||
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
563 | | - | |
| 562 | + | |
564 | 563 | | |
565 | 564 | | |
566 | 565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 132 | + | |
134 | 133 | | |
135 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
139 | | - | |
| 141 | + | |
140 | 142 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 143 | + | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 152 | + | |
154 | 153 | | |
155 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | | - | |
| 172 | + | |
171 | 173 | | |
172 | | - | |
173 | | - | |
174 | | - | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | | - | |
| 191 | + | |
191 | 192 | | |
192 | | - | |
193 | | - | |
194 | | - | |
| 193 | + | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 210 | + | |
213 | 211 | | |
214 | 212 | | |
215 | 213 | | |
| |||
0 commit comments