Retire legacy transports for ordinary sandbox commands
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
Part of https://github.com/NVIDIA/NemoClaw/issues/11255.
## Problem
Ordinary sandbox commands still have multiple execution paths. The audited [SSH transport](https://github.com/NVIDIA/NemoClaw/blob/0d286ce3c318ded19377fb42456b2619f7b9581c/src/lib/adapters/sandbox/command-transport.ts#L62-L114) generates temporary configuration and invokes system SSH. A separate [OpenShell exec path](https://github.com/NVIDIA/NemoClaw/blob/0d286ce3c318ded19377fb42456b2619f7b9581c/src/lib/adapters/sandbox/command-transport.ts#L138-L201) can fall back to privileged container execution when its result is inconclusive. Equivalent-looking commands can therefore use different identities, environments, and enforcement.
Existing adapter work is already migrating consumers and tightening fallback policies. This issue is the follow-up retirement of mechanisms made unnecessary by native OpenShell execution, not another implementation of that adapter.
## Scope and code to retire
- Reconcile the current consumer inventory after the relevant adapter changes land; use the audited source only as the starting map.
- Move ordinary agent-owned commands and probes to the established native OpenShell execution contract.
- Remove ordinary SSH subprocess/configuration branches, implicit privileged fallback, and compatibility exports with no remaining production consumers.
- Preserve explicitly owned privileged provisioning, secret validation, and necessary recovery operations as separately named operations with existing authority checks.
- Retain SSH helpers still used by interactive connection, file transfer, or another supported feature. Delete shared helpers only after proving their last consumer is gone.
## Security and compatibility
Preserve named-gateway and sandbox targeting, sanitized host environments, provider custody, and the no-secrets-in-sandbox contract. Transport failure, timeout, malformed output, cancellation, and a remote nonzero exit must remain distinguishable. None may silently authorize a privileged retry or repeat an ambiguous mutation.
Maintain working directory, arguments, stdin, stdout/stderr, exit status, process cleanup, and required runtime environment. A caller that needs privilege or an alternate transport must have its actual operation preserved before its generic fallback is removed; silently losing recovery is not simplification.
## Acceptance criteria
- [ ] Every retired path has a complete caller inventory and a verified native replacement or explicit retained operation.
- [ ] Ordinary commands use the expected sandbox identity and environment across fresh onboarding, status/probes, rebuild, and recovery.
- [ ] Failure and cancellation tests prove no implicit privilege escalation, broader retry, duplicate mutation, or leaked process.
- [ ] Existing interactive, file-transfer, credential-boundary, and exact-target lifecycle behavior remains covered.
- [ ] Net production code decreases, including unused transport helpers and compatibility wiring. Closure requires deletion and preserved behavior, not interface relocation alone.
## Related work
Coordinate with [#10991](https://github.com/NVIDIA/NemoClaw/issues/10991), [#10992](https://github.com/NVIDIA/NemoClaw/issues/10992), and active [PR #11089](https://github.com/NVIDIA/NemoClaw/pull/11089). They own the consumer/adapter migration and existing fallback-policy changes. [#10994](https://github.com/NVIDIA/NemoClaw/issues/10994) owns interactive sessions. Preserve the environment requirements addressed by [PR #10446](https://github.com/NVIDIA/NemoClaw/pull/10446); do not duplicate those fixes here.
## Ownership and delivery
Core NemoClaw maintenance under the parent epic. The NemoClaw maintainers own the affected components; implementation remains unassigned. Apply this change to the existing supported agent/runtime combinations identified by the implementation.
Closure requires an actual net reduction in production code, the removed-function/branch/patch inventory, and passing native behavior plus existing security and recovery coverage. Source links record the audit baseline; inspect the implementation revision before deleting code.
Contributor guide
Assessment
This issue has not been assessed yet.