Repository navigation
Commit b4bea7f
fix: address review on verify_equivalence mode (coderabbit + multi-persona)
Two real findings on altimate-core-rewrite.ts (the current verify-mode file;
most other review comments targeted the now-deleted standalone tool):
- MAJOR (coderabbit): handle `success === false` explicitly. An
`{ success: false, error: "" }` rewrite payload has a falsy error string and
fell through to the success path, misreporting results. Now fails on an
explicit `success === false` regardless of error string.
- MINOR (coderabbit + multi-persona): dedup/no-op normalization lowercased the
full SQL, which could collapse rewrites differing only by a case-sensitive
string literal / quoted identifier into one — dropping a valid candidate before
verification. Normalize whitespace only; no case-folding.
Already-addressed findings (reviewers were looking at the deleted standalone
tool): per-candidate try/catch (equivalence throw fails closed per candidate, not
the whole tool) and strict boolean validation of `equivalent` (=== true + a
typeof-based "non-boolean" reason) are both present in the current code.
Tests (20): + success:false-with-empty-error regression, + case-sensitive-literal
dedup preservation.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent 01d65e3 commit b4bea7f
2 files changed
Lines changed: 37 additions & 3 deletions
File tree
- packages/opencode
- src/altimate/tools
- test/altimate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
133 | 158 | | |
134 | 159 | | |
135 | 160 | | |
| |||
0 commit comments