Commit fc781f8
fix: Include milestones in critical path calculation
Milestones (tasks with zero duration) were incorrectly excluded from
the critical path due to a `duration_days > 0` check.
Before: `is_critical: node.slack == 0 && node.duration_days > 0`
After: `is_critical: node.slack == 0`
This affected both:
- The `is_critical` flag on ScheduledTask
- The `critical_path` vector in Schedule
Milestones with zero slack are now correctly marked as critical and
included in the critical path output.
Fixes the CTL PIII bug where "[7.6] TTG Release" milestone had 0 slack
but wasn't shown as critical.
Tests: Added `milestone_can_be_critical` regression test
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 8c80354 commit fc781f8
2 files changed
+36
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3105 | 3105 | | |
3106 | 3106 | | |
3107 | 3107 | | |
| 3108 | + | |
3108 | 3109 | | |
3109 | 3110 | | |
3110 | | - | |
| 3111 | + | |
3111 | 3112 | | |
3112 | 3113 | | |
3113 | 3114 | | |
| |||
3233 | 3234 | | |
3234 | 3235 | | |
3235 | 3236 | | |
3236 | | - | |
| 3237 | + | |
3237 | 3238 | | |
3238 | 3239 | | |
3239 | 3240 | | |
| |||
3841 | 3842 | | |
3842 | 3843 | | |
3843 | 3844 | | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
3844 | 3873 | | |
3845 | 3874 | | |
3846 | 3875 | | |
| |||
0 commit comments