fix(server): keep exec in HashMap during output streaming for TTY sessions#392
Merged
Conversation
…sions stream_output was removing the execution from the HashMap, making all subsequent send_input, send_signal, and resize_tty calls fail with "execution not found". This broke interactive TTY sessions entirely. Fix: clone the execution instead of removing it, and defer cleanup to after the process exits. Also adds coordinator REST API integration tests and includes boxlite-server in make test/fmt/lint targets.
DorianZheng
added a commit
that referenced
this pull request
Mar 18, 2026
…ml (#392) Make the coordinator's utoipa-generated OpenAPI spec fully match the hand-written spec at openapi/rest-sandbox-open-api.yaml. - Extract wire types into handlers/types.rs with ToSchema derives for all 30 OpenAPI schemas (Box, ExecRequest, Snapshot, ImageInfo, etc.) - Add #[utoipa::path] annotations to all 16 existing proxy handlers - Add 17 stub handlers (501) for unimplemented endpoints (snapshots, clone, export, import, files, images, TTY WebSocket) - Implement get_box_metrics via existing gRPC GetMetrics - Register all paths, schemas, tags, and security schemes in ApiDoc - Add SecuritySchemeAddon for BearerAuth + OAuth2 client credentials - Rename path parameter namespace → prefix to match spec - Add OpenAPI conformance test suite (6 structural tests) - Add comprehensive unit tests for types serde (37), error helpers (9), proto conversion (3), and integration tests (32)
DorianZheng
added a commit
that referenced
this pull request
Mar 18, 2026
…ml (#394) * feat(server): align utoipa OpenAPI spec with rest-sandbox-open-api.yaml (#392) Make the coordinator's utoipa-generated OpenAPI spec fully match the hand-written spec at openapi/rest-sandbox-open-api.yaml. - Extract wire types into handlers/types.rs with ToSchema derives for all 30 OpenAPI schemas (Box, ExecRequest, Snapshot, ImageInfo, etc.) - Add #[utoipa::path] annotations to all 16 existing proxy handlers - Add 17 stub handlers (501) for unimplemented endpoints (snapshots, clone, export, import, files, images, TTY WebSocket) - Implement get_box_metrics via existing gRPC GetMetrics - Register all paths, schemas, tags, and security schemes in ApiDoc - Add SecuritySchemeAddon for BearerAuth + OAuth2 client credentials - Rename path parameter namespace → prefix to match spec - Add OpenAPI conformance test suite (6 structural tests) - Add comprehensive unit tests for types serde (37), error helpers (9), proto conversion (3), and integration tests (32) * fix(make): narrow Cargo.lock change detection to avoid unnecessary tests Cargo.toml and Cargo.lock changes previously triggered tests for ALL Rust components (rust cli ffi server). This caused the pre-push hook to run CLI VM integration tests for unrelated changes like adding a dev-dependency to boxlite-server. Now: workspace-root Cargo.toml and Cargo.lock only trigger the `rust` base component. Per-crate Cargo.toml changes are already detected by the directory-prefix rules (e.g., boxlite-server/Cargo.toml matches the ^boxlite-server/ rule which emits `server`).
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
stream_outputwas removing the execution from theexecutionsHashMap, making all subsequentsend_input,send_signal, andresize_ttycalls fail with "execution not found". Now clones the execution instead and defers cleanup to after process exit.boxlite-serverto make targets: Change detection (make/changes.mk), test (make test:unit:server), and inclusion intest:unit:rust.Test plan
cargo test -p boxlite-server— 25 tests pass (13 unit + 12 integration)cargo clippy -p boxlite-server --tests -- -D warnings— cleanmake test:unit:server— works/bin/shwith TTY, verify interactive I/O works