[DGX Station GB300][Sandbox] Add test seams to deterministically exercise recovery managed-health tri-state and externally-supervised gateway handshake
- Dominant language
- TypeScript
- Stars
- 22.5k
- Forks
- 3.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 715
Description
## Description
Two documented NemoClaw behaviors cannot be exercised deterministically in a black-box QA test because there is no user-facing or test-facing seam to force the required internal state. This enhancement requests lightweight, non-production test seams so the affected paths become executably testable instead of only source-confirmable.
### Gap 1 — Sandbox recovery managed-health tri-state
The post-recreate readiness path (`waitForRecreatedSandboxOpenShellReadyResult`) classifies the managed-health guard as a definitive failure (guard returns `false`) versus inconclusive (guard returns `null`), emitting distinct diagnostics `managed-health-definitive-failure` and `managed-health-inconclusive-timeout`. No user action, CLI flag, or env var forces the guard to return `false` vs `null`, so neither diagnostic can be triggered on demand. Coarse container manipulation does not select the branch: a paused container makes `recover` spin its generic readiness wait loop (and does not honor the recreate budget), and a removed container makes `recover` preserve the registry and defer to `rebuild` rather than entering the tri-state path.
**Requested:** an opt-in, test-only override (e.g. `NEMOCLAW_TEST_FORCE_MANAGED_HEALTH=false|null`) gated so it is inert in production, that forces the guard result for one recreate/rebuild.
### Gap 2 — Externally-supervised gateway health/capability handshake
`attachToExternallySupervisedGateway` probes an externally-supervised health + capability handshake before attaching. The default NemoClaw-managed `openshell-gateway` does not answer this handshake — the attach fails with `GatewayOwnershipError` code `gateway_unreachable` ("running but did not answer"). Because the happy-path attach never succeeds, the dependent scenarios (authority-changed-mid-run and resume-re-probes-ownership) also cannot be exercised.
**Requested:** either a handshake-compliant test gateway/fixture, or a documented way to run the managed gateway in an externally-supervised-compliant mode, so the attach/authority lifecycle can be tested end-to-end.
**Platform scope:** Shared-code testability gap; observed on DGX Station GB300, applies to all platforms.
**Regression:** No — new test infrastructure, not a behavior regression.
## Impact
The DevTest cases for these paths (sandbox recovery tri-state diagnostics; externally-supervised gateway authority Parts A–C) cannot currently be run to a clean PASS/FAIL by black-box execution — only confirmed by reading source. Test seams would let them be validated end-to-end in QA.
## Environment
```text
Device: DGX Station GB300
OS: Ubuntu 24.04.4 LTS
Architecture: aarch64
OpenShell CLI: 0.0.85
NemoClaw: v0.0.98
OpenClaw: 2026.7.1
```
Contributor guide
Assessment
This issue has not been assessed yet.