Repository navigation
Allow disabling TLS verification for opensandbox env - #5204
activatedgeek wants to merge 6 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
06888d3 to
7270dbc
Compare
|
/review |
|
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
RISK — Record representative model-backed smoke-rollout evidence. The new opt-in environment changes environment setup, but the description's verification against a self-signed cluster does not identify a model-backed task or inspected agent/verifier outcome. Base AGENTS.md requires that evidence for behavior-changing environment work. This is a validation gap, not a demonstrated runtime defect.
Could you record the exact command/configuration, Harbor/OpenSandbox SDK versions, and one representative real rollout selecting this subclass with tls_verify: false against the self-signed endpoint? If the reported Harbor commands already performed that rollout, documenting its results is sufficient. No implementation change or reward-profile comparison is requested unless validation exposes a failure.
Acceptance: the model performs a tool interaction, the verifier reports the task's expected outcome, and the sandbox is deleted afterward. A minimal proposed case is a task asking the model to write a fixed marker, with a verifier returning 1.0 for the correct marker. Preserve normal verified-TLS behavior: omitted/default and explicit true must reject an untrusted certificate, while a trusted endpoint remains usable.
The changed module and directly affected configuration, worker, and test paths were reviewed. Tests were not executed. Harbor/OpenSandbox dependency implementations were unavailable in the mounted source, so SDK consumption of _ssl_context could not be independently verified.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| self._tls_verify = tls_verify | ||
| super().__init__(*args, **kwargs) | ||
|
|
||
| def _build_connection_config(self, sdk: dict[str, Any]) -> Any: |
There was a problem hiding this comment.
NOTE — Suggestion: add regression coverage for the TLS option. The inspected general-agent tests do not exercise this subclass. The existing worker HTTP test uses Gym's separate provider, and the native-config test preserves unrelated environment kwargs. Removing this TLS branch therefore would not be caught by those cases. This is a coverage suggestion, not a proven runtime bug.
Could you add focused tests to the general-agent suite using the installed SDK's actual request path? The invariant is that only an explicitly opted-out instance bypasses certificate verification; other superclass connection settings and other instances remain unaffected.
Proposed acceptance checks, not executed: against a local self-signed HTTPS fixture, an SDK request through the returned configuration succeeds with tls_verify=False, while omitted/default and explicit True reject the certificate. A trusted endpoint still succeeds with verification enabled. Check that representative endpoint, credentials, proxy, and timeout settings survive construction, and create an enabled instance after a disabled one to detect shared-state leakage. Retain the existing worker-serialization assertion that environment kwargs survive unchanged. The external constructor/request implementation was unavailable for inspection, so no speculative test patch is supplied.
I was indeed using this earlier, but it led me to the following error on the first step of agent interaction with OpenCode. This was the smallest change which directly uses the OpenSandbox implementation from Harbor without rewriting the whole class. I am not sure if TLS verification should be turned off and whether it would be appropriate for it go into main Harbor releases.
I've added the minimum version in the dependencies and verified that it still works. I'm not sure what a test here will look like. Can you provide additional guidance?
Updated the README. |
Signed-off-by: Sanyam Kapoor <[email protected]>
Signed-off-by: Sanyam Kapoor <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
The new TLS regression test addresses the prior coverage NOTE: it asserts the SSL context on the SDK-created transport for default, enabled, and disabled verification, along with preservation of connection settings. The dependency floor is also reflected by OpenSandbox 1.2.0 in the lockfile. These are source checks, not executed test results.
RISK — Record representative model-backed smoke-rollout evidence. This remains the unresolved finding from review 5709932163. The description and author reply do not identify a model-backed task, inspected tool interaction, verifier outcome, or sandbox deletion. The current README documents configuration rather than a completed rollout. Behavior-changing environment work requires that validation under trusted AGENTS.md. This is a validation gap for the opt-in integration, not a demonstrated runtime defect.
Could you record the exact command, resolved configuration, model, and installed Harbor/OpenSandbox SDK versions for one real rollout selecting the custom environment with tls_verify: false against the self-signed endpoint? Include the inspected agent trajectory, verifier result, and evidence of sandbox deletion. If the reported commands already performed that rollout, documenting its results is sufficient. No implementation change or reward-profile comparison is requested unless validation exposes a failure.
Acceptance and preservation — proposed checks, not executed: A minimal task can ask the model to write a fixed marker, with a verifier returning 1.0 for the correct marker and 0.0 otherwise. Confirm a model tool interaction, the expected verifier and Gym rollout reward, and sandbox deletion afterward. Retain the existing mandatory deletion contract. Preserve the distinct TLS cases: explicit false permits the self-signed endpoint; omitted/default and explicit true reject an untrusted certificate; a trusted endpoint remains usable with verification enabled.
This follow-up checked the earlier findings and their directly affected configuration, worker, test, and dependency paths. The previously reviewed tree was unavailable, so I couldn't independently establish an inter-review source delta and did not restart whole-PR discovery. Tests and rollouts were not executed, and the external Harbor/OpenSandbox implementations were unavailable for inspection.
Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.
0f2f400 to
a852d14
Compare
|
/review reset=True |
|
/ok to test a852d14 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
The TLS regression test addresses the earlier coverage NOTE: it checks the SDK-created transport for omitted/default, enabled, and disabled verification, plus preservation of connection settings. The SDK dependency floor agrees with OpenSandbox 1.2.0 in the lockfile. These are source checks, not executed test results.
RISK — Record representative model-backed smoke-rollout evidence. This remains the unresolved finding from review 5775721323. Selecting the custom environment with tls_verify: false changes sandbox connection setup, but the supplied validation identifies neither a model-backed task nor inspected agent/verifier outcomes. The README addition documents configuration rather than a completed rollout. Trusted AGENTS.md requires representative real smoke rollouts for behavior-changing environment work. This leaves the opt-in integration unvalidated end to end; it is not a demonstrated runtime defect.
Could you record the exact command, resolved configuration, model, and installed Harbor/OpenSandbox SDK versions for one real rollout through this subclass against the self-signed endpoint? Include the inspected agent trajectory, verifier result, Gym reward, and evidence of sandbox deletion. If the reported Harbor commands already performed that rollout, documenting their results is sufficient. No implementation change or reward-profile comparison is requested unless validation exposes a failure.
Acceptance and preservation — proposed checks, not executed:
- Use a minimal task asking the model to write a fixed marker, with a verifier returning
1.0for the correct marker and0.0otherwise. Confirm an actual model tool interaction, the expected verifier and Gym reward, and deletion afterward. Retain the mandatory environment-deletion contract. - Preserve the distinct TLS cases: explicit
falsepermits the self-signed endpoint; omitted/default and explicittruereject an untrusted certificate; a trusted endpoint remains usable with verification enabled. Retain the existing transport-test assertions for credentials, domain, protocol, proxy, timeout, and transport ownership. SDK creation metrics should remain disabled only in the opted-out case.
I reviewed all six changed files and traced the directly affected configuration, worker, transport, and test contracts. The large lockfile received a semantic comparison of dependency versions, metadata, extras, and relevant markers, not independent verification of every artifact hash. Tests, resolver checks, and rollouts were not executed; the external Harbor/OpenSandbox implementations were unavailable for inspection.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
|
Closing in favor of native OpenCode and Harbor task format support which already handles the sandboxing environment. |
What does this PR do?
OpenSandbox clusters may have self-signed certificates. The native Harbor implementation for OpenSandbox environment does not allow disabling TLS verification in OpenSandbox SDK. This PR allows a
tls_verifyoption in a custom environment class while maintaining all other native behavior.Validation
Verified by pointing the Harbor commands to an internal self-signed OpenSandbox cluster.
Rollouts
Rollouts remain the same. N/A
Compatibility and benchmark impact
None. This class is opt-in.
Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).