fix(transition): advance DEADLINE repeater on terminal transition (v0.6.1) - #18
miles-on-nightshift wants to merge 3 commits into
Conversation
miles-on-nightshift
left a comment
There was a problem hiding this comment.
CTO pr-review (2026-09-23)
Code review: LGTM. The logic change is correct and minimal — transition() now checks deadline when scheduled has no repeater, and _advance_repeater() correctly parameterises which attribute to advance via timestamp_attr. SCHEDULED-first ordering matches Emacs behaviour. Test coverage is solid: habit (.+1d), plain advance (+1w), and no-repeater terminal all verified; existing SCHEDULED test suite passes without regression (284 tests).
Blocker fixed: All 4 Python-version CI runs failed on ruff I001 — missing blank line between stdlib and third-party imports in the new test (line 296). Fixed and pushed in 643c940. CI should rerun now.
Ready to approve once CI is green.
|
CI green across all 4 Python versions (3.10–3.13). PR is ready for merge by @plur9. |
SCHEDULED was the only planning timestamp checked for a repeater cookie. Tasks that carry the repeater on DEADLINE (e.g. nvim-orgmode habit trackers that use DEADLINE as a workaround for missing org-habit support) transitioned to DONE and terminated. `transition()` now checks SCHEDULED first, then DEADLINE. `_advance_repeater()` accepts a `timestamp_attr` parameter so it reads and writes the right attribute. When both carry a repeater, SCHEDULED wins (Emacs behaviour). Closes #17. Bumps to v0.5.5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
643c940 to
9d5eeef
Compare
|
Rebased onto main (v0.6.0 → v0.6.1 version bump). CI re-running. Ready to merge once green — fixes the DEADLINE repeater bug reported by @Amperture. |
…-23) v0.6.0 shipped today; the CHANGELOG was left with (unreleased). Add the v0.6.1 entry for the DEADLINE-repeater fix (#17) so the PR description matches the code.
|
CTO pr-review (2026-09-24) Code is correct. Test coverage is solid: habit (.+1d), plain advance (+1w), no-repeater terminal — all 3 paths covered. The The commit headline reads "v0.5.5" but LGTM — ready to merge. @plur9 approve and merge when convenient. |
Summary
transition()now checks both SCHEDULED and DEADLINE for a repeater cookie_advance_repeater()parameterised withtimestamp_attrto advance the right planning timestampRoot cause
transition()only testedraw_node.scheduledfor a repeater. Tasks with the cookie onDEADLINEtransitioned toDONEand terminated rather than recurring.Reported by @Amperture: nvim-orgmode habit tracker uses
DEADLINEas a workaround for missingorg-habitsupport.Test plan
test_transition_recurring_advances_deadline—.+1dhabit,+1wplain advance, no-repeater terminal all verifiedtest_transition_recurring_advances_scheduled— no regression (284 tests pass)Version
Bumps to v0.6.1 (v0.6.0 shipped 2026-09-23 before this fix landed).
Closes #17.
🤖 Generated with Claude Code