fix(cli): race condition in thread rm + flaky test #266

Merged
xiaomo merged 1 commits from fix/265-flaky-thread-rm into main 2026-05-15 00:21:17 +00:00

1 Commits

Author SHA1 Message Date
xiaoju 942ff4b1a4 fix(cli): race condition in thread rm + flaky test (#265)
Two fixes:
1. cmdThreadRemove: always call both removeThreadEntry and
   removeThreadHistoryEntries regardless of resolved source,
   preventing race where thread moves from active to history
   between resolve and delete.
2. Test: add waitUntilRunningFileAbsent before thread show/rm,
   matching the pattern used by adjacent test cases.

Verified 5x consecutive runs with 0 failures.

Closes #265
2026-05-14 13:17:04 +00:00