Commit 5f37218
Fix race condition in subscribe() for fast-completing tasks
The watch command was failing in CI when tasks completed quickly because:
- subscribe() would sync() and find task already completed
- Progress data would be deleted on completion
- Watch would never see progress events
Solution: subscribe() now emits initial progress event along with initial
state event, ensuring subscribers capture progress state before deletion.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5aea763 commit 5f37218
2 files changed
+20
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
760 | 779 | | |
761 | 780 | | |
762 | 781 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | | - | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
| |||
263 | 259 | | |
264 | 260 | | |
265 | 261 | | |
266 | | - | |
| 262 | + | |
267 | 263 | | |
268 | 264 | | |
269 | 265 | | |
| |||
0 commit comments