Fix watch cancel confirmation output (canceld -> cancelled) - #32
Merged
Merged
Conversation
The pause/resume/cancel handler built its confirmation with
f"{args.watch_command}d ...", which only spells pause/resume correctly
and printed 'canceld' for cancel. Use an explicit past-tense map so the
output matches the stored state spelling ('cancelled').
Found while running a real PR-watch task locally. Adds output
assertions to the lifecycle CLI test, including a regression check
that 'canceld' never appears.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
nanodot watch cancel <id>printscanceld <id> ...instead ofcancelled. The handler builds its confirmation withf"{args.watch_command}d ...", which happens to spellpause/resumecorrectly but concatenates wrong forcancel. The stored state itself is correct (watch listshowscancelled); this is display-only.Found while running a real PR-watch task locally and recording the full lifecycle (create → first snapshot → pause/resume → cancel → stop).
Fix
Replace the string concatenation with an explicit past-tense map (
pause→paused,resume→resumed,cancel→cancelled), matching the spelling already used by the task store andwatch listoutput.Test
Extended
test_pause_resume_cancel_take_effectto assert the exact confirmation text for all three actions, including a regression check thatcanceldnever appears. Verified the test fails against the old code and passes with the fix; full suite: 515 passed.