Commit ee855dc
committed
fix(notion-fetch): correct skip reason logic to detect impossible conditions
Fix logic bug in skip reason detection where unreachable branches
were incorrectly labeled as "should not skip" instead of being
identified as logic errors.
Problem:
- Inside `if (!needsProcessing)` block, we know ALL conditions
for needsProcessing are FALSE due to boolean OR logic
- Previous labels like "should not skip" were misleading since
those branches are mathematically unreachable
- Would never detect actual logic bugs in needsProcessing calculation
Solution:
- Change impossible condition messages to "🔴 ERROR:" prefix
- Add clear comments explaining unreachability
- Document that ONLY "unchanged since [timestamp]" is valid
- If ERROR appears in logs, indicates bug in needsProcessing logic
Benefits:
- Proper detection of logic bugs (if they exist)
- Clear distinction between valid skip (cache hit) vs impossible cases
- Better debugging when investigating Issue #95
Related: ISSUE_95_PLAN.md Phase 1 review1 parent 3859501 commit ee855dc
1 file changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
716 | 722 | | |
717 | 723 | | |
718 | | - | |
719 | | - | |
| 724 | + | |
| 725 | + | |
720 | 726 | | |
721 | | - | |
| 727 | + | |
| 728 | + | |
722 | 729 | | |
723 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
724 | 733 | | |
725 | | - | |
| 734 | + | |
| 735 | + | |
726 | 736 | | |
727 | 737 | | |
728 | 738 | | |
729 | 739 | | |
730 | | - | |
| 740 | + | |
| 741 | + | |
731 | 742 | | |
| 743 | + | |
732 | 744 | | |
733 | 745 | | |
734 | 746 | | |
| |||
0 commit comments