Conversation
elezar
left a comment
There was a problem hiding this comment.
Does something like this validate adding a test case?
Are there options to optimise this? |
@elezar it's related to OpenShell/crates/openshell-sandbox-backend/src/boundary_protocol.rs Lines 535 to 536 in 4b2cb7f
|
c510a87 to
1d97d11
Compare
I've added a test |
|
@drew Could we address this at the type/serialization layer instead of increasing the global control-frame limit? These values appear to be PEM text and must be supplied together, so would something like We would still need to handle wire compatibility deliberately, for example by accepting the legacy byte-array representation and negotiating when a sender may use the compact representation. Do you see the 2 MiB increase as a short-term compatibility measure, or should this PR address the representation itself? |
The default macOS system CA bundle (~334 KB) inflates ~3.3x under serde's JSON byte-array encoding, pushing StartAgent past the 1 MiB MAX_CONTROL_FRAME_BYTES limit and failing every VM-backed sandbox create. Add a test that round-trips a 400 KB CA bundle through the frame encoder to pin the invariant. Closes NVIDIA#3453 Signed-off-by: Florent Benoit <fbenoit@redhat.com>
|
Follow-up: these |
edited |
1d97d11 to
8e606f3
Compare
|
I'm OK to do another proposal, as long as I'm able to start my sandbox I pick-up the size increase first, as it was the thing not breaking protocol |
Summary
Raise
MAX_CONTROL_FRAME_BYTESfrom 1 MiB to 2 MiB so that hosts with large CA bundles (e.g. macOS default trust store ~334 KB, which inflates ~3.3× under serde's JSON byte-array encoding) no longer exceed the frame limit duringStartAgent.Related Issue
Closes #3453
Changes
MAX_CONTROL_FRAME_BYTESfrom1024 * 1024to2 * 1024 * 1024inopenshell-sandbox-backendTesting
mise run pre-commitpassesChecklist