Repository navigation
feat: make Shell input and output limits configurable - #401
Merged
Merged
Conversation
## Problem Fixed Shell input and output ceilings prevent operators from sizing larger command text, captures, and sourced scripts for their workloads. ## Solution Add optional positive byte counts at limits.shell.max_input and limits.shell.max_output. Preserve the 256 KiB input and 64 KiB output defaults and existing timeout behavior. Persist explicit sizes under record version 30 and retain existing versions when sizes are omitted. Apply the settings whenever the broker constructs Shell, including later calls. Document current source-loading semantics and separate transport limits. ## Tests Full Core package tests passed with all features, including site_manifest. The shell_size_limits tests cover validation and serialization; explicit_shell_sizes_require_their_record_version and shell_sizes_beside_an_agent_ingress_store_the_shell_size_version cover persistence compatibility. raised_input_limits_survive_repeated_calls_on_one_program and both configured_shell_* integration tests cover runtime enforcement. Independent mutation checks made each new regression test fail. All-feature build, no-default-features build, formatting, and workspace Clippy passed. The deterministic runner recorded 129 passing cases and 12 declared Linux-only skips; two unchanged host TCP timing assertions failed in its original unit stage. The full 103-test harness unit target passed on retry without code changes. The full deterministic script was not repeated. The examples gate found no scripted examples. Linux was not built locally.
|
Assessment: Approve I re-reviewed Checked and held
Thanks for adding a regression test that fails without the fix. |
5 tasks done
Keep this PR focused on Shell limit configuration. PR #403 owns the vendored Shell guard and its newline regression test. Restore the configuration tests' single-line repeated calls while retaining finite and unlimited values. Remove the multiline-enforcement claim from the configuration design page.
|
Assessment: Approve I re-reviewed Checked and held
|
opieter-aws
approved these changes
Nov 11, 2026
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.
Description
Box currently uses fixed Shell input and output limits. This change lets applications configure each limit independently to match their workload and resource requirements.
Expose optional byte counts as
limits.shell.max_inputandlimits.shell.max_output. Positive values bound bytes;0disables the corresponding Shell limit. Omission retains the defaults of 256 KiB input and 64 KiB output.The stored settings reach every hosted Shell call. Explicit sizes use record version 31; configurations that omit them keep their existing version. Older Core builds reject the new keys and record version. Shell still uses
max_outputto bound source-file reads. Its separate transport budgets remain in force, including when a Shell limit is disabled. The docs explain the memory implication of larger or unlimited settings.Related PR #403 fixes an existing Shell bug that bypasses the input limit for submissions containing a newline. It is independent of this configuration change; neither PR requires the other to merge first. The configuration reference documents that limitation.
Type of Change
New feature
Testing
python3path is absent, and the filesystem refuses non-UTF-8 pathnames.Checklist