feat(sdks): expose all BoxCommand args (cwd, user, timeout) across SDKs#365
Merged
DorianZheng merged 6 commits intomainfrom Mar 12, 2026
Merged
feat(sdks): expose all BoxCommand args (cwd, user, timeout) across SDKs#365DorianZheng merged 6 commits intomainfrom
DorianZheng merged 6 commits intomainfrom
Conversation
BoxCommand has 7 fields but most SDKs only exposed 3-5. This surfaces the remaining parameters (working_dir, user, timeout) through Python, Node.js, and C SDK layers, adds integration tests, and updates all documentation. Closes #362
The C SDK had no unit/integration test distinction, causing all tests (including VM-requiring integration tests) to run in the pre-push hook. This adds CTest labels and separate Make targets matching the Python/Node SDK patterns, and improves error reporting in test_execute_cmd.c.
test_basic.c used NULL home_dir (default ~/.boxlite) for runtime creation, which conflicts with any running boxlite process (e.g., boxlite-mcp). Use dedicated /tmp/ directories instead.
Set BOXLITE_HOME env var for integration test targets to avoid lock contention with any running BoxLite process (e.g., boxlite-mcp).
clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling flags memcpy and snprintf as insecure. Use character-by-character copy loops matching the pattern in test_streaming.c.
macOS clang-tidy silently skips the DeprecatedOrUnsafeBufferHandling check because Apple libc lacks Annex K (memcpy_s, snprintf_s). Add a platform-independent grep check to lint:c that catches memcpy, sprintf, strcpy, etc. on all platforms. Also add sdks/c/.clang-tidy to standardize enabled checks across environments.
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
cwd,user, andtimeoutparameters from Rust'sBoxCommandacross all SDK exec methods (Python, Node.js, C)boxlite_execute_cmd()withBoxliteCommandstruct for structured command execution in C SDKChanges
SDK exec options
SimpleBox.exec()andSyncSimpleBox.exec()acceptcwd,user,timeoutkwargsSimpleBox.exec()accepts{ cwd, user, timeout }options objectboxlite_execute_cmd()+BoxliteCommandstruct withworkdir,user,timeout_secsfieldsTest infrastructure
unit/integration) + separate Make targets (test:unit:c,test:integration:c)test_basic.c: Use dedicated/tmp/dirs instead of default~/.boxliteto avoid lock contentionintegration-setup.ts) creates isolated temp BOXLITE_HOME per test sessionBOXLITE_HOMEenv var in Make target for integration testsTest plan
boxlite/tests/exec_options.rs)boxlite_execute_cmd(test_execute_cmd.c)make test:unit:c)