From 4f141486dcf2870f0134e31f0366d06b7f09f2d2 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Mon, 23 Mar 2026 22:09:50 -0700 Subject: [PATCH] refactor: remove dead code and stale references (#2940) - fix misplaced interactive_provision comment block in interactive.sh: the comment was positioned before _report_ux_issues but described the interactive_provision function; moved it to be adjacent to its function - apply interactive E2E improvements already in main working tree: e2e.sh: add verify_agent call after interactive_provision to wait for .spawnrc before running input tests (aligns interactive with headless flow) -- qa/code-quality Co-authored-by: spawn-qa-bot Co-authored-by: Claude Sonnet 4.6 --- sh/e2e/e2e.sh | 11 ++++++++--- sh/e2e/lib/interactive.sh | 18 +++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/sh/e2e/e2e.sh b/sh/e2e/e2e.sh index 44a30a21..94e99374 100755 --- a/sh/e2e/e2e.sh +++ b/sh/e2e/e2e.sh @@ -243,10 +243,15 @@ run_single_agent() { ( local _inner_status="fail" if [ "${INTERACTIVE_MODE}" -eq 1 ]; then - # AI-driven interactive mode: provision + verify in one step + # AI-driven interactive mode: harness drives the CLI through PTY. + # After harness exits (on "Starting agent..." marker), the install is still + # running on the remote VM. Run verify_agent to wait for .spawnrc before + # the input test — same as headless mode. if interactive_provision "${agent}" "${app_name}" "${LOG_DIR}"; then - if run_input_test "${agent}" "${app_name}"; then - _inner_status="pass" + if verify_agent "${agent}" "${app_name}"; then + if run_input_test "${agent}" "${app_name}"; then + _inner_status="pass" + fi fi fi else diff --git a/sh/e2e/lib/interactive.sh b/sh/e2e/lib/interactive.sh index 060c8fab..c1ec72c2 100644 --- a/sh/e2e/lib/interactive.sh +++ b/sh/e2e/lib/interactive.sh @@ -8,15 +8,6 @@ # Requires: ANTHROPIC_API_KEY (for the AI driver), plus normal cloud creds. set -eo pipefail -# --------------------------------------------------------------------------- -# interactive_provision AGENT APP_NAME LOG_DIR -# -# Runs spawn interactively with AI driving the prompts. On success, the -# instance is provisioned AND the agent is installed — equivalent to -# provision_agent + verify_agent in the headless flow. -# -# Returns 0 on success, 1 on failure. -# --------------------------------------------------------------------------- # --------------------------------------------------------------------------- # _report_ux_issues RESULT_JSON AGENT CLOUD # @@ -99,6 +90,15 @@ ${example} fi } +# --------------------------------------------------------------------------- +# interactive_provision AGENT APP_NAME LOG_DIR +# +# Runs spawn interactively with AI driving the prompts. On success, the +# instance is provisioned AND the agent is installed — equivalent to +# provision_agent + verify_agent in the headless flow. +# +# Returns 0 on success, 1 on failure. +# --------------------------------------------------------------------------- interactive_provision() { local agent="$1" local app_name="$2"