feat(exec): add sync: bool mode to POST /exec and Rust support #3111
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 150 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.300
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3111"
general
weight: 0.35
DorianZheng
TL;DR
Add optional
sync: bool(defaultfalse) toPOST /{prefix}/boxes/{box_id}/execacross OpenAPI, reference server, Rust runtime/REST, andboxlite serveto avoid per-call TLS+WS handshakes while staying backward-compatible.Design doc: https://github.com/boxlite-ai/boxlite/issues/3110
Documentation: [docs/reference/README.md](docs/reference/README.md), [openapi/reference-server/README.md](openapi/reference-server/README.md)
How it works
sync: false(default) keeps201 ExecResponse.sync: truerejectstty/stdin, closes stdin, drains stdout/stderr with per-stream caps, returns200 SyncExecResponseor408(5s guest fallback);RestBoxreuses pooled HTTP (timeout+30s);serveexempts active calls from AutoStop.| Loopback TLS 1.3 (N=300) | Mean | p99 | Speedup |
| --- | ---: | ---: | ---: |
|
/exec+ new TLS+WS | 2.289ms | 2.571ms | 1x || Sidecar wrapper | 0.438ms | 0.865ms | 5.2x |
|
POST /exec(sync: true) | 0.083ms | 0.096ms | 27.6x |Verification
make test:unit:openapi→ 52 passedBOXLITE_DEPS_STUB=1 make test:unit:rust FILTER=sync_exec→ 7 passedBOXLITE_DEPS_STUB=1 make test:unit:cli→ passed (stubbed deps; no VM tests)