anchor.diff:    const replFini = () => {
       // Empty the dom element so next [repl] click is clean.
       $('#repl-terminal').empty();
  +  };
  +
  +  const setSessionId = () => {
  +    // If the repl docker container's id was based *only* on the kata-id,
  +    // then creating a new repl could  fail if there was a very recent
  +    // [resume], which caused a repl DELETE request, but the docker daemon
  +    // had not yet actually deleted the repl container.
  +    // So the repl and socket Urls for a repl session have a random suffix.
  +    sessionId = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0,6);
     };
   
     //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
positive.code:     this.socket = new WebSocket(url);
  
      this.socket.onopen = function(_event) {
        console.log('socket opened');
        terminal.attach(that.socket);
        terminal._initialize = true;
      };
  
      this.socket.onclose = function(event) {
        console.log('socket closed');
        terminal.detach(that.socket);
        const NGINX_TIMEOUT_CODE = 1006;
        if (event.code === NGINX_TIMEOUT_CODE) {
          console.log('socket timed out');
          that.start(url, terminal);
        }
      };
  
      this.socket.onerror = function(event) {
        terminal.writeln('Error connecting to REPL');
      };
    };
  
  
negative.code:     });
    };
  
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    const replInit = () => {
      // Trying to put Terminal inside a jQuery dialog is, empirically,
      // very tricksy (because of CSS z-Index issues I think).
      const element = document.getElementById('repl-terminal');
      const terminal = createTerminalIn(element);
      setSessionId();
      createRepl(terminal).then(() => {
        const socket = new SocketMonitor(socketUrl(), terminal);
        resumeButton.unbind().click(() => {
          socket.close();
        });
      });
    };
  