Skip to content

Add allow_net and secrets support across SDKs#426

Merged
DorianZheng merged 15 commits into
mainfrom
codex/sdk-allow-net-secrets
Apr 4, 2026
Merged

Add allow_net and secrets support across SDKs#426
DorianZheng merged 15 commits into
mainfrom
codex/sdk-allow-net-secrets

Conversation

@DorianZheng

Copy link
Copy Markdown
Member

Summary

  • add allow_net and secrets support to the Node and Go SDKs
  • plumb network, allow_net, and secrets through the REST client/server/reference-server path
  • update C raw JSON examples/tests/docs to the current network schema and document the new options across SDK/reference docs

Testing

  • npm test (sdks/node)
  • npx vitest run --project integration tests/skillbox.integration.test.ts (sdks/node)
  • BOXLITE_DEPS_STUB=1 cargo test -p boxlite --lib
  • BOXLITE_DEPS_STUB=1 cargo test -p boxlite-server --lib
  • BOXLITE_DEPS_STUB=1 cargo test -p boxlite-node --lib
  • go test ./... (sdks/go)
  • cmake -S sdks/c/tests -B /tmp/boxlite-c-tests && cmake --build /tmp/boxlite-c-tests --target test_integration

Notes

  • the local pre-push hook still requires the full runtime integration matrix; publishing the branch via GitHub avoided a local disk-space block while keeping the exact commit SHA intact

DorianZheng and others added 15 commits April 2, 2026 22:56
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.
@DorianZheng DorianZheng merged commit aed5598 into main Apr 4, 2026
41 checks passed
@DorianZheng DorianZheng deleted the codex/sdk-allow-net-secrets branch April 4, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants