Repository navigation
Conversation
|
Polaris did not reach code analysis. The job failed during action initialization because GitHub intentionally withholds repository secrets from fork PRs. Maintainer edits are enabled; this check needs an upstream maintainer to run the branch from a trusted Failed job: https://github.com/nuclia/hyperforge/actions/runs/33825876621/job/100878306192 |
|
Consolidation commit (
Local verification: 288 passed/1 skipped (full non-api suite), 14 passed in agents/restricted, ruff + ty + mypy clean. CI matches; Polaris still needs a trusted-ref rerun for the fork-PR secret limitation noted earlier. |
cc9315b to
4b3d4f6
Compare
a5c4c05 to
c74cb59
Compare
Rebased onto main after nuclia#123 (pluggable sandbox auth and ToolCallContext) landed; the branch already absorbed that foundation, so conflicts were resolved in favor of the combined final state. - Capability-scoped Code Mode tool factory (create_codemode_tool) with result projection, source/result/output/nested-call limits, nested event ancestry, execution admission, and tool inheritance controls - Hardened local/remote sandbox execution with authenticated transport, bounded protocol handling, runtime/memory ceilings, cancellation cleanup, and configurable socket/metrics exposure - Fix test_sandbox_rejects_concurrent_session to read the socket path from SANDBOX_SOCKET env instead of the import-time settings singleton - Apply ruff format to codemode/sandbox.py, tools/codemode.py, test_codemode.py
4eaa97e to
e5ed3a8
Compare
vangheem
left a comment
There was a problem hiding this comment.
Can we remove the current_tool_call context var? I don't think that's necessary right?
Preserve restricted agent sandbox compatibility
|
Superseded by the split stack:
The hardening PR targets the foundation branch in the contributor fork because this account cannot create an upstream base branch. Once #137 merges, the hardening branch can be proposed directly against upstream |
Summary
Security
Testing
make lintuv run pytest tests/codemode/test_model.py tests/codemode/test_protocol.py tests/harness_sdk/test_codemode.py tests/harness_sdk/test_harness.py -q(137 passed, 1 skipped)uv run pytest tests/ --ignore=tests/api --ignore=tests/standalone --ignore=tests/test_next.py -q(278 passed, 1 skipped)uv run pytest tests/test_sandbox.py -qinagents/restricted(14 passed)git diff --checkKnown limitation
make all-testswas attempted, but the API/standalone fixtures could not complete locally because port8000is occupied by existing Docker Desktop and SSH listeners. Those unrelated processes were left untouched; the broad Hyperforge run above excludes only the affected API, standalone, and recorded-network test paths.Behavior changes
Local Code Mode worker transport (pool and isolated-process modes) now uses the bounded JSON worker protocol instead of pickle. Values crossing the worker boundary must be JSON worker values; previously picklable types such as
bytes, sets, and dataclasses are rejected before transport. The remote sandbox path already had this contract.The sandbox metrics server is disabled by default and binds to
127.0.0.1when enabled. SetSANDBOX_METRICS_ENABLED=true(andSANDBOX_METRICS_HOST/SANDBOX_METRICS_PORTas needed) to restore scraping.Sandbox connections presenting an invalid token are closed during the handshake without a protocol-level error message; clients now see "Sandbox connection closed unexpectedly" instead of a token-specific error.
Rebased onto main after Make codemode sandbox token optional #114 (optional sandbox token): the generic sandbox service and
SandboxRunner.remotekeep main's token-optional behavior; scoped Code Mode (create_codemode_tool) still fails closed and requires bothSANDBOX_SOCKETandSANDBOX_TOKEN.