Repository navigation
Commit 81f45fa
committed
Pin the arrival boundary, including the assertion that was pinning the bug
The first version of this file asserted the zero-tolerance form as if it were the rule:
/var canUp = y > ledgerTopOffset\(\);/
so 57 assertions were green and one of them was holding the defect in place. That is the other
half of 「a guard that cannot fail is not a guard」 — a guard can pass while naming the wrong thing
as right, and nothing in a green run distinguishes the two. So this fix is not only to add
assertions. It is to take back the one that was asserting the bug.
verify-ledger-jump.mjs 57 -> 61 assertions. Four new ones: the zero-tolerance form cannot come
back; the boundary is rounded UP, with floor and nearest both rejected — nearest rejected even
though it is the rounding this browser actually does; the bottom test is left alone; and the
landing keeps the un-rounded offset, so the same fix cannot be reached a second way by rounding
where a jump ends instead of how 「arrived」 is read.
mutate-ledger-jump.py 53 -> 58 mutations, all caught; file restored byte for byte and green again
afterwards. Two of the five are worth naming. Dropping the boundary is the defect itself, and the
only one here a reader could walk back into by accident: the shorter form reads as the obvious way
to ask 「is there more above」, and nothing in the source says a landing does not land where it was
aimed. Changing it to Math.round is kept precisely because it is CORRECT on this browser — it holds
only for the one rounding rule in force, and a green run says nothing about that. This is also why
what is pinned is 「up」 rather than 「a rounding that works」.
The probe had to change too, for the same shape of reason. Its reader carried its own copy of the
predicate under test, so the first run after the fix reported the landing as 「still more above」
while the product had already answered no — it was measuring its own copy, which would never have
moved no matter what shipped. Verdicts now read the shipped function's own answer, and the old
form is kept in the output only as a contrast.
node tests/run.mjs 57/57. Fixture check OK.1 parent ea1f366 commit 81f45fa
2 files changed
Lines changed: 78 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
193 | 234 | | |
194 | 235 | | |
195 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
208 | 237 | | |
209 | 238 | | |
210 | 239 | | |
| |||
264 | 293 | | |
265 | 294 | | |
266 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
267 | 303 | | |
268 | 304 | | |
269 | 305 | | |
| |||
0 commit comments