Skip to content

fix(sdk): don't report a job as finished until its logs and artifacts are final - #193

Merged
owbone merged 1 commit into
mainfrom
owbone/job-complete-status
Oct 9, 2026
Merged

owbone merged 1 commit into
mainfrom
owbone/job-complete-status

Conversation

@owbone

@owbone owbone commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

#180 started reporting the backend's in-between complete and fail job states as Status.Completed and Status.Failed. The backend holds a job in those states while it shuts the machine down and is still collecting the job's logs and artifacts; it only marks the job completed or failed once they're final. So waiting for Completed and then reading job.logs or the job's artifacts can return incomplete results.

This reports complete and fail as Status.Stopping instead. stop_job() still doesn't request a stop for them (it skips that for Stopping jobs, which is what #180 wanted), and now waits for the job to settle as completed or failed.

— Claude Opus 5.5, on direct instruction; text not reviewed

… are final

#180 reported the backend's in-between "complete" and "fail" states as
Completed and Failed. The backend holds those while it shuts the machine
down and collects the job's logs and artifacts, so waiting for Completed
and then reading them could return incomplete results. Report them as
Stopping instead. stop_job() still won't request a stop for them, since it
skips that for Stopping jobs, and now waits for the job to settle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@owbone
owbone marked this pull request as ready for review October 9, 2026 15:47
@owbone
owbone enabled auto-merge (squash) October 9, 2026 15:52
@owbone
owbone merged commit 8fc0219 into main Oct 9, 2026
39 checks passed
@owbone
owbone deleted the owbone/job-complete-status branch October 9, 2026 16:52
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.

3 participants