Repository navigation
Commit 63a2dea
Fix the eight findings from the second /code-review xhigh pass
Two of these are misses in the previous commit's own fixes.
- The act check moved above the argument *validation* rather than below
it, so five semantic errors (both --skip flags, --db-path missing or
nonexistent, --images-zip-path missing or nonexistent) were still
answered with "act is required" on a machine without act. It now sits
immediately before the act invocation; all five report themselves, and
act is still required once the arguments are good.
- possible_output_names' undetermined case claimed both names, which was
widened from GIFs to every PNG and TIFF by the last commit. It now
claims nothing: optimize_raster repeats the same Image.open and
is_animated access, so whatever makes the probe fail makes process_file
fail too, and the source writes no file at all. Holding two names for
it de-conflicted a real image against an output that never appears.
And the deeper one behind both of the last two rounds' F26-shaped bugs:
optimize_directory now checks that the name process_file actually wrote
was one the planning pass claimed for that source, and fails loudly
otherwise. The prediction lives in a second place from the code it
predicts and has drifted twice, silently both times; this is the missing
connection between the halves.
Also:
- _is_animated_raster reports a probe failure through the logger instead
of swallowing it - it runs for every PNG now, and a systematic failure
would otherwise shift the whole de-confliction pass unexplained.
- outside_fences' `source` is required, not defaulted: the warning is the
entire point of that change, and an optional argument is how a later
call site quietly gets the old silence back.
- The unterminated-fence check runs once on spans[-1]. Only the last span
can be unterminated (fenced_spans appends the run-to-EOF one after its
loop), so checking every span re-split every code block for nothing.
- `animated: Optional[bool]`, and a non-bool argument is refused - the
parameter took a Path one revision ago, and a Path is truthy, so a
stale call reported "animated" for every file with no error.
- The case-handling test asserts the property rather than the
"{stem}-{ext}" naming literal.
6 new tests, and every changed behaviour fails against the previous
commit. 192 + 33 + 189 pass; scripts/ unchanged from base. The real
299-image corpus is byte-for-byte identical again, and the local
workflow under act produces the same database md5 as the last two
rounds - with the new written-vs-claimed check silent across every path
the corpus exercises, including SVG rasterization.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent fa1848f commit 63a2dea
4 files changed
Lines changed: 169 additions & 36 deletions
File tree
- ProcessDocs/ProcessKotlinDocs/ProcessKotlinWebsiteJSON
- tests
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
86 | 97 | | |
87 | 98 | | |
88 | 99 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 100 | | |
93 | 101 | | |
94 | 102 | | |
| |||
Lines changed: 66 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
491 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
492 | 505 | | |
493 | 506 | | |
494 | 507 | | |
495 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
496 | 515 | | |
497 | 516 | | |
498 | 517 | | |
499 | 518 | | |
500 | 519 | | |
501 | 520 | | |
502 | 521 | | |
503 | | - | |
504 | | - | |
| 522 | + | |
| 523 | + | |
505 | 524 | | |
506 | 525 | | |
507 | 526 | | |
508 | 527 | | |
509 | 528 | | |
510 | | - | |
| 529 | + | |
511 | 530 | | |
512 | | - | |
513 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
514 | 542 | | |
515 | 543 | | |
516 | 544 | | |
517 | 545 | | |
518 | 546 | | |
519 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
520 | 551 | | |
521 | 552 | | |
522 | 553 | | |
| |||
635 | 666 | | |
636 | 667 | | |
637 | 668 | | |
| 669 | + | |
638 | 670 | | |
639 | 671 | | |
640 | 672 | | |
| |||
643 | 675 | | |
644 | 676 | | |
645 | 677 | | |
646 | | - | |
| 678 | + | |
647 | 679 | | |
648 | 680 | | |
649 | 681 | | |
| |||
661 | 693 | | |
662 | 694 | | |
663 | 695 | | |
| 696 | + | |
664 | 697 | | |
665 | 698 | | |
666 | 699 | | |
| |||
671 | 704 | | |
672 | 705 | | |
673 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
674 | 728 | | |
675 | 729 | | |
676 | 730 | | |
| |||
Lines changed: 73 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
| 776 | + | |
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
818 | | - | |
819 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
820 | 825 | | |
821 | 826 | | |
822 | 827 | | |
| |||
864 | 869 | | |
865 | 870 | | |
866 | 871 | | |
867 | | - | |
| 872 | + | |
| 873 | + | |
868 | 874 | | |
869 | 875 | | |
870 | 876 | | |
| |||
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | 129 | | |
140 | 130 | | |
141 | 131 | | |
| |||
187 | 177 | | |
188 | 178 | | |
189 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
0 commit comments