You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
keel positions: attributed DCA tranches show a stop distance measured against the stop=0 sentinel #973
Found while reviewing PR #972 (round 1, held H3). Pre-existing.
agent._open_tranche copies Dca.detect's stop=0 sentinel onto every attributed live DCA tranche (live ledger: tranches 4-6 store initial_stop "0"). keel/commands/positions.py (module docstring ~line 25, field docstring ~line 120) says initial_stop is None for a DCA leg, and computes stop_distance = mark - initial_stop (~line 402). For these tranches that makes the distance equal to the mark, which is the "distance measured against a substituted zero" the module docstring warns against. doctor.py ~1813 repeats the "DCA initial_stop absent" claim, although its > 0 guard makes it harmless.
Fix: read the stop through status.recorded_stop (added in #972: zero or below counts as no stop) in positions.py, and correct the docstrings in positions.py and doctor.py.
Activity
Test log isolation, stale references, DCA stop distance, manifest nam…