Commit 393f4b3
committed
Generate repeated condition codes once
A condition code maps 1:1 to a <code>.wnd filename, so a repeated code (for
example an "EWM True [50, 50]" row or two "- EWM50" lines) can only describe the
same output. generate_all now generates each distinct code once, preserving
first-seen order.
This fixes a P1 in atomic mode: the duplicate path was staged twice, so the
second os.replace raised FileNotFoundError after one file had already been
committed, breaking the advertised all-or-nothing behaviour. It also keeps the
non-atomic result count honest.
Adds regression tests for repeated codes in both atomic and non-atomic paths.1 parent f84ba05 commit 393f4b3
3 files changed
Lines changed: 39 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
606 | 618 | | |
607 | 619 | | |
608 | 620 | | |
| |||
656 | 668 | | |
657 | 669 | | |
658 | 670 | | |
659 | | - | |
| 671 | + | |
660 | 672 | | |
661 | 673 | | |
662 | 674 | | |
| |||
677 | 689 | | |
678 | 690 | | |
679 | 691 | | |
680 | | - | |
| 692 | + | |
| 693 | + | |
681 | 694 | | |
682 | 695 | | |
683 | 696 | | |
| |||
725 | 738 | | |
726 | 739 | | |
727 | 740 | | |
728 | | - | |
| 741 | + | |
729 | 742 | | |
730 | 743 | | |
731 | 744 | | |
| |||
| 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 | + | |
0 commit comments