Skip to content

fix(task-list): keep descriptions with line breaks on one line - #799

Merged
rng1995 merged 8 commits into
NVIDIA:mainfrom
dhananjay6561:fix/task-list-multiline-content
Nov 20, 2026
Merged

rng1995 merged 8 commits into
NVIDIA:mainfrom
dhananjay6561:fix/task-list-multiline-content

Conversation

@dhananjay6561

Copy link
Copy Markdown
Contributor

Summary

The task-list reference helper stores one task per line in its Markdown state file, but add wrote the description as given. A description with a line break was split across two lines that the loader can't parse, so the task was reported as added and then disappeared: list showed No tasks, start --task_id task_1 failed, and the next add reused task_1. add_multiple lost items with a bare \r the same way, because the file is read back with universal newlines.

Descriptions now have their whitespace collapsed to single spaces before they are stored, in both add and add_multiple:

Fixes #798.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Tested on macOS 26.6.2 arm64, Python 3.14.7, on top of upstream 620ac2d8.

  • pytest -n 0 tests/test_reference_skill_scripts.py: 22 passed. Against the unchanged tasks.py, the 4 new cases fail.
  • Full make test left to CI here; a local full run on macOS stalled in an unrelated Docker transfer cancellation test.
  • ruff check src tests: all checks passed; ruff format --check clean on the changed files.
  • python -m build: sdist and wheel built.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 05:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@dhananjay6561

Copy link
Copy Markdown
Contributor Author

Hi @rng1995 @chrisknvidia, small task-list fix for #798 when you get a chance. A description with a line break was saved across two lines and the task vanished on the next command. Happy to change anything.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! Reviewed normalization before persistence in both add paths, blank-content rejection, and reload/status handling. All 22 reference-script tests passed, including multiline/CRLF descriptions and status-word persistence. No actionable issues found.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a clean fix. I reproduced the problem on main (a description with a newline is written across two lines, list then shows No tasks, start --task_id task_1 fails and the next add reuses task_1; add_multiple loses the item with a bare carriage return the same way) and confirmed the branch fixes all three cases plus the whitespace-only add. The four new test cases fail against the unchanged tasks.py and pass with it, the status-word cases from #680 still round-trip unchanged, and nothing else in the repo depends on the old behaviour. No conflicts with main, sign-off on every commit, changelog entry in place. One non-blocking nit inline about the wording; otherwise good to go once CI runs.

@rng1995

rng1995 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@dhananjay6561 - Please address review comments, respond to it and resolve the merge conflicts for the PR to merge. Thanks!

Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
Copilot AI balanced review requested due to automatic review settings November 20, 2026 00:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@rng1995
rng1995 enabled auto-merge (squash) November 20, 2026 00:37
@rng1995
rng1995 merged commit f867b7f into NVIDIA:main Nov 20, 2026
36 of 37 checks passed
@dhananjay6561

Copy link
Copy Markdown
Contributor Author

hi @rng1995 , Apologies, I missed this. Thanks for merging though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Task-list helper loses a task whose description contains a line break

4 participants