Skip to content

fix(task-list): preserve status words inside task descriptions - #680

Merged
rng1995 merged 8 commits into
NVIDIA:mainfrom
pqminh27:fix/task-list-status-roundtrip
Nov 17, 2026
Merged

rng1995 merged 8 commits into
NVIDIA:mainfrom
pqminh27:fix/task-list-status-roundtrip

Conversation

@pqminh27

@pqminh27 pqminh27 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A task description containing a status word such as (completed) was truncated during reload and could change the saved task status. Anchor the serialized status suffix to the end of the row so the full description and actual status survive persistence. Regression coverage includes trailing status words and completed/cancelled tasks.

Fixes #678.

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 (failures and tested base below)
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Tested on macOS arm64, Python 3.13.15. Current head dcbcfbd2 includes upstream 4ecad335; all earlier PR commits, including maintainer commits, are preserved through merge commits.

  • uv run --no-sync pytest -n 0 tests/test_reference_skill_scripts.py: 18 passed.
  • uv run --no-sync make lint, uv run --no-sync make build, and git diff --check origin/main: passed on the current head.
  • PYTEST_ADDOPTS='-n 2' uv run --no-sync make test: 36,500 passed, 124 skipped, 12 failed, with one Harbor deprecation warning. This full run was based on ccac29e4, before the final upstream merge that changes only README and changelog text. All 11 Harbor failures in tests/test_harbor_local_environment.py exactly match untouched ccac29e4 (43 passed, 11 failed, 4 deselected), involving macOS AppleDouble ._ files.
  • The additional full-suite failure was test_dynamic_bridge_ignores_prebound_old_port_and_checker_authenticates_health: fixed port 18080 was occupied during concurrent suite runs. The test passed when rerun alone on this branch; untouched ccac29e4 reproduces the exact bind error with that port occupied. No bridge code was changed.

The full suite is not green; the failures above are outside this patch. Hosted CI on the new head is pending and may require maintainer approval for fork workflows.

Release Impact

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

@pqminh27
pqminh27 force-pushed the fix/task-list-status-roundtrip branch from 789b292 to fc746e1 Compare November 16, 2026 18:16

@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.

Reviewed commit fc746e16 with an independent secondary code review. No additional scoped findings. Requiring the status suffix at the end of the serialized row preserves embedded and repeated status words without changing the actual task status.

Validation: 16 focused tests passed, plus actual file-backed add/list/reload and start/complete/cancel/clear CLI controls. Exact-base comparisons reproduced the earlier description corruption. The rebased reference script and target tests are byte-identical to the initially reviewed version, and the checks were repeated on this head. Hosted CI has now started and remains pending; the full local repository suite and native Windows were not rerun for this review.

@pqminh27
pqminh27 force-pushed the fix/task-list-status-roundtrip branch 2 times, most recently from 6a9c24c to 0375e02 Compare November 16, 2026 19:47
@pqminh27
pqminh27 marked this pull request as ready for review November 16, 2026 20:23

@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.

Independent review of 0375e021: no actionable issues found in the changed code. Focused validation and its scope are recorded inline.

@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.

Reviewed at 0375e021. No issues found.

Checked: _save_state always writes ({status}) as the last token of the row, so the $ anchor matches every row it writes. The lazy (.+?) now runs to the final status suffix. Rows with CRLF endings still load because of line.strip(). No other copy of this pattern exists in the repo. Focused tests pass locally (16 passed).

Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
@pqminh27
pqminh27 force-pushed the fix/task-list-status-roundtrip branch from 0375e02 to c12aa1f Compare November 16, 2026 20:56

@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 for the fix. The earlier reviews had no open points, and the head since then is only a rebase onto current main; tasks.py and the test are identical to the version that was already reviewed.

I re-checked it. _save_state always writes the status as the last token of the row, so anchoring with $ matches every row it writes, and the lazy (.+?) now runs to the final suffix. On main, "Check (completed)" comes back as "Check" with status completed, and a status word in the middle of a description truncates it the same way. With this change the text and the real status survive add, start, complete and cancel round trips, including descriptions that end in a status word or contain several. The new test fails on main for all four status words and passes here, and the other reference-skill tests still pass.

One small nit is inline and not blocking.

Heads up that #677 adds its CHANGELOG line in the same spot as this one, so whichever lands second will need a quick rebase.

Comment thread tests/test_reference_skill_scripts.py Resolved
pqminh27 and others added 7 commits November 17, 2026 08:25
…roundtrip

Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
…roundtrip

Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
…roundtrip

Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
…roundtrip

Signed-off-by: pqminh27 <minh8a1hb@gmail.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
@rng1995
rng1995 enabled auto-merge (squash) November 17, 2026 16:16
@rng1995
rng1995 merged commit ee5cc60 into NVIDIA:main Nov 17, 2026
38 of 39 checks passed
@rng1995

rng1995 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks for your contribution, @pqminh27.

Reviewed cb5825ad7c01. No additional actionable issues found. Anchoring the serialized status suffix preserves status-shaped words inside descriptions while allowing the final saved suffix to determine the actual task status. The additional completed/cancelled round-trip cases requested in the earlier review are included.

Validation: 18 reference-skill script tests passed, covering persistence and status transitions.

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 task text and changes saved status when descriptions contain status words

3 participants