wassh: start opting in 0.5% of runs to WASM

Start gathering more feedback from the wild.

Bug: https://crbug.com/1298695
Change-Id: I86156c8d7ad1e5c240430f09cadff283555e91f1
Reviewed-on: https://chromium-review.googlesource.com/c/apps/libapps/+/3907386
Reviewed-by: Emil Mikulic <easy@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/nassh/js/nassh_command_instance.js b/nassh/js/nassh_command_instance.js
index 41014f2..4e0593c 100644
--- a/nassh/js/nassh_command_instance.js
+++ b/nassh/js/nassh_command_instance.js
@@ -1157,6 +1157,14 @@
   // Make sure the selected ssh-client version is somewhat valid.
   if (options['--ssh-client-version']) {
     this.sshClientVersion_ = options['--ssh-client-version'];
+  } else if (!this.isSftp && this.sshClientVersion_ === 'pnacl') {
+    if (lib.f.randomInt(0, 1000) < 5) {
+      this.io.println(sgrText(
+          'Opting in to WASM for this session.  Please report issues.\n\r' +
+          'Use --ssh-client-version=pnacl to temporarily opt-out.\n\r',
+          {bold: true}));
+      this.sshClientVersion_ = 'wasm';
+    }
   }
   if (!this.sshClientVersion_.match(/^[a-zA-Z0-9.-]+$/)) {
     this.io.println(localize('UNKNOWN_SSH_CLIENT_VERSION',
diff --git a/nassh/js/nassh_plugin_wasm.js b/nassh/js/nassh_plugin_wasm.js
index c2ee354..7aef895 100644
--- a/nassh/js/nassh_plugin_wasm.js
+++ b/nassh/js/nassh_plugin_wasm.js
@@ -63,7 +63,7 @@
     }
 
     this.terminal_.io.print(
-        ' «««This is a WIP -- see https://crbug.com/1298699 for KIs»»»');
+        ' «««This is in alpha -- see https://crbug.com/1312115 for KIs»»»');
 
     const settings = {
       executable: this.executable_,