Skip to content

fix(cli): verify task completion to detect partial responses#12

Merged
echobt merged 1 commit intomasterfrom
fix/bounty-issue-1506
Jan 26, 2026
Merged

fix(cli): verify task completion to detect partial responses#12
echobt merged 1 commit intomasterfrom
fix/bounty-issue-1506

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 26, 2026

Summary

This PR fixes an issue where the CLI run command would exit with success status even if the server response was interrupted or incomplete. It now explicitly checks for a TaskComplete event.

Changes

  • Added a completed flag to track if the task successfully finished.
  • Added a check after the event loop to verify completion.
  • If the loop exits without completion or an explicit error, it is now treated as an error condition.
  • Compatible with stable Rust (removed experimental let chains).

Related

Fixes PlatformNetwork/bounty-challenge#1506

Fixes bounty issue #1506

The CLI run command now tracks whether a TaskComplete event was received.
If the event stream ends without completion or an explicit error, it is treated
as a partial response/error condition. This prevents misleading success
status when the server disconnects prematurely.
@echobt echobt force-pushed the fix/bounty-issue-1506 branch from 2385843 to d08da2f Compare January 26, 2026 16:50
@echobt echobt merged commit cadc073 into master Jan 26, 2026
3 of 12 checks passed
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] cortex run Misreports Success When Partial Response Is Returned

2 participants