Refactor request completion and plot image ordering#52
Merged
t-kalinowski merged 4 commits intomainfrom May 7, 2026
Merged
Conversation
4c991c4 to
bcc805c
Compare
Move request completion, sideband state, and worker lifecycle bookkeeping toward the server-owned IPC boundary so backend runtimes report structured events without owning response finalization. Validation: cargo check; cargo build; cargo clippy --all-targets --all-features -- -D warnings; cargo test; cargo +nightly fmt.
Route plot image updates, echo carryover, prompts, and stdout through the timeline so mixed text/image replies keep their visible order across immediate, timed-out, and final-response paths. Validation: cargo check; cargo build; cargo clippy --all-targets --all-features -- -D warnings; cargo test; cargo +nightly fmt.
Keep buffered prompts from triggering Python completion, report idle completion consistently, emit repeated plot images explicitly, and disconnect workers that send invalid sideband messages. Validation: cargo check; cargo build; cargo clippy --all-targets --all-features -- -D warnings; cargo test; cargo +nightly fmt.
Add manual CI dispatch coverage and tighten tests that depend on platform prompts, sandbox timing, explicit plot ordering, and stale bundle replay. Validation: cargo check; cargo build; cargo clippy --all-targets --all-features -- -D warnings; cargo test; cargo +nightly fmt.
bcc805c to
d901a12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactors the server/backend boundary for request completion and plot image ordering. The branch removes the worker-owned
request_endsideband message, uses worker-declared client-waiting prompt events as the completion signal, and keeps response image identity/update grouping owned by the server.Public-facing changes:
Internal-only changes:
request_endfrom the worker-to-server sideband protocol.plot()andshow()calls image-producing while preserving quiet no-op requests.workflow_dispatchsupport to CI.Diff composition
Measured against
main, this PR is1896insertions and460deletions across32files.src/:+839/-315(49.0%of churn)src/:+424/-54(20.3%of churn)tests/:+433/-22(19.3%of churn)+105/-27(5.6%of churn)+24/-0(1.0%of churn)+71/-42(4.8%of churn)Largest files:
src/ipc.rs:+514/-169src/worker_process.rs:+325/-111tests/python_plot_images.rs:+224/-0src/output_timeline.rs:+141/-39src/pending_output_tape.rs:+139/-14Testing
cargo +nightly fmtcargo checkcargo buildcargo clippy --all-targets --all-features -- -D warningscargo testcodex review --base main