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 <qa@openrouter.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-23 22:09:50 -07:00 committed by GitHub
parent e9cbab5b7f
commit 4f141486dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 12 deletions

View file

@ -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

View file

@ -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"