TOOLS-4148 Rewrite all the bsondump tests in Go and delete the JS tests for this#923
Conversation
629d309 to
314536f
Compare
2d4c1a3 to
8602a4d
Compare
314536f to
af5f557
Compare
951bc97 to
7a3fa74
Compare
6cbeff6 to
5c182e0
Compare
7a3fa74 to
be4d1de
Compare
5c182e0 to
6a8bc27
Compare
6a8bc27 to
ce94d63
Compare
be4d1de to
13b1165
Compare
FGasper
left a comment
There was a problem hiding this comment.
Looks like the refactor reduced coverage in one test and imprudently skipped another.
| badFiles := []string{ | ||
| "testdata/bad_cstring.bson", | ||
| "testdata/bad_type.bson", | ||
| "testdata/invalid_field_name.bson", | ||
| "testdata/partial_file.bson", | ||
| "testdata/random_bytes.bson", | ||
| } |
There was a problem hiding this comment.
The refactoring of these tests makes it kind of hard to compare with the originals.
It might be nice if the AI privileged line-for-line translation rather than trying to refactor.
There was a problem hiding this comment.
It can do that, but do we really want that? If a human did this work I'm sure they'd do this same refactor. The way the JS test was written is just wrong. It should have used a loop!
There was a problem hiding this comment.
I agree that the original test’s copy-paste-ness was excessive.
The refactor, though, makes it hard to ensure that the test was ported faithfully. I found one spot in this PR where Claude dropped something earlier; verifying that there isn’t something else is easier when the Go code resembles the JS.
There was a problem hiding this comment.
I’m not blocking on this, btw … but it might be a good parameter to give the AI in future translations.
There was a problem hiding this comment.
If you think the existing set of PRs are a lot to review, imagine effectively doubling the number of PRs by breaking it up into "rewrite the JS test exactly into Go" and then "rewrite that into sane Go code". Is that a tradeoff we really want? I think the real problem with this PR is that I should've just done one test at a time.
ce94d63 to
93cafd5
Compare
13b1165 to
aae3a48
Compare
aae3a48 to
66aa6b5
Compare
93cafd5 to
d6504ac
Compare
d93b762 to
a7a8c12
Compare
94cbc99 to
a0ef32f
Compare
a7a8c12 to
8887a8d
Compare
8887a8d to
f183501
Compare
a0ef32f to
b457216
Compare
b457216 to
9db3a63
Compare
f183501 to
4e2c586
Compare
9db3a63 to
de8522d
Compare
4e2c586 to
1563a49
Compare
de8522d to
3f6ec50
Compare
1563a49 to
f440194
Compare
f440194 to
beca1d3
Compare
A few of the JS tests were not ported, per the plan in docs/superpowers
beca1d3 to
3f1896d
Compare
3f6ec50 to
4243504
Compare
4243504 to
41037a4
Compare

A few of the JS tests were not ported, per the plan in docs/superpowers