Add allow_net and secrets support across SDKs#426
Merged
Conversation
Skip the entire test module during collection when boxlite.NetworkSpec is unavailable (native extension not built), preventing AttributeError during pytest collection in CI. Matches existing pattern in test_secret_substitution.py. https://claude.ai/code/session_01KVHFk3e8xxVeAP2rruYUYV
Guard Python test_network_spec.py against missing native extension (matches existing pattern in test_secret_substitution.py). Skip Go integration tests on ErrUnsupported/ErrUnsupportedEngine instead of failing when KVM is not available.
Linux clang-tidy in strict C11 mode requires _XOPEN_SOURCE=500 for nftw, lstat, FTW_DEPTH, and FTW_PHYS. Add the define to CMakeLists.txt compile definitions and clang-tidy invocation flags.
The watchdog pipe was created with libc::pipe() which does not set FD_CLOEXEC. Between pipe creation and the shim's exec(), any child process spawned by the parent (or by threads in the tokio runtime) inherits the pipe write-end. When the parent dies, the inherited write-end keeps the pipe open, so POLLHUP never fires on the shim's watchdog thread — the shim lives forever as an orphan. Evidence: lsof showed Electron (VS Code) holding fd 90 as the write-end of an orphan shim's watchdog pipe, with 127 orphan shim processes exhausting hypervisor handles (libkrun EINVAL). Fix: use pipe2(O_CLOEXEC) on Linux, pipe() + fcntl(FD_CLOEXEC) on macOS. The read-end's CLOEXEC is harmless because pre_exec dup2() clears it on the target fd. Includes regression test that spawns a child process and verifies POLLHUP fires within 100ms after dropping the Keepalive.
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
allow_netandsecretssupport to the Node and Go SDKsnetwork,allow_net, andsecretsthrough the REST client/server/reference-server pathTesting
npm test(sdks/node)npx vitest run --project integration tests/skillbox.integration.test.ts(sdks/node)BOXLITE_DEPS_STUB=1 cargo test -p boxlite --libBOXLITE_DEPS_STUB=1 cargo test -p boxlite-server --libBOXLITE_DEPS_STUB=1 cargo test -p boxlite-node --libgo test ./...(sdks/go)cmake -S sdks/c/tests -B /tmp/boxlite-c-tests && cmake --build /tmp/boxlite-c-tests --target test_integrationNotes