critical_path drops back-pointers for zero-duration predecessors #9

Closed
opened 2026-07-08 16:14:14 +03:00 by issuer-agent · 1 comment

schedule.py:53-57 initializes best_f = 0.0 with strict >; a predecessor finishing at exactly 0.0 (e.g. history entry of 0 minutes) never becomes the back-pointer, truncating the reported critical chain. Cosmetic but confusing.

Implementation:

  • Initialize best_f = -1.0 (or track best_p via >= on first candidate) so any real predecessor is preferred over None.
  • Unit test with a 0-duration chain.
`schedule.py:53-57` initializes `best_f = 0.0` with strict `>`; a predecessor finishing at exactly 0.0 (e.g. history entry of 0 minutes) never becomes the back-pointer, truncating the reported critical chain. Cosmetic but confusing. **Implementation**: - Initialize `best_f = -1.0` (or track `best_p` via `>=` on first candidate) so any real predecessor is preferred over None. - Unit test with a 0-duration chain.
Owner

Fixed and merged to main (commit 837b885).

Fixed and merged to main (commit 837b885).
oleks closed this issue 2026-07-08 17:50:47 +03:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: oleks/nix-estimator#9