Commit 94f3e63
fix: /answer command sends swapped question/answer strings to the LLM (#2495)
* fix: /answer command sends swapped question/answer strings to the LLM
* test(pr_reviewer): make /answer swap regression test behavioral
Replace the inspect.getsource source-text assertion (brittle to formatting,
and its runtime half only re-tested _get_user_answers, not the __init__ unpack
where the bug was) with a behavioral test: drive the real PRReviewer.__init__
with external collaborators stubbed and assert the user's question and answer
land in self.vars under the correct keys. Verified it fails on the swapped
unpack and passes with the fix. Also adds the missing trailing newline.
---------
Co-authored-by: naorpeled <me@naor.dev>1 parent f226fee commit 94f3e63
2 files changed
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments