feat(cli): add bounded graceful server shutdown
Open
@fsiino-nvidia is already working on this.
Since Nov 7, 2025.
- #353 by @fsiino-nvidia — closed without merging
CLI
core-infra
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 349
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 318
Description
Priority
Wave 3 — user-facing lifecycle control. Implement after #3160 establishes durable local ownership and a bounded shutdown API.
Problem
Users need a supported way to stop Gym services without tracking terminals or killing individual PIDs. The command must consume #3160 rather than create a second process-discovery and termination path.
Essential scope
- Stop all locally owned services or a selected service.
- Use #3160's one graceful deadline and explicit force escalation.
- Report graceful, timed-out, force-terminated, already-stopped, and unresolved-remote-cleanup results.
- Make repeated stop safe.
- Document graceful versus forced local shutdown and the limits of remote cleanup.
Dependencies
Hard dependency on #3160's durable process ownership and shutdown API. Remote release state is consumed when #2609/#3037 provides it but does not block the local command.
Acceptance criteria
- Users can stop all services or one selected service through
gym env. - Graceful shutdown uses one overall deadline.
- Force escalation is explicit and never the first default action.
- Repeating stop is safe when services are already stopped.
- Local exit and unresolved remote cleanup are reported separately.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.