diff --git a/Partnership/partnership_onboard.sh b/Partnership/partnership_onboard.sh index 295670b..335effd 100755 --- a/Partnership/partnership_onboard.sh +++ b/Partnership/partnership_onboard.sh @@ -418,21 +418,24 @@ echo start-failed exit 1 PHASE2_TRIGGER ) + # Failure patterns are matched first, and they echo a path back. An owner whose + # SCRIPTS_DIR happened to contain the word "triggered" would otherwise satisfy a + # leading *triggered* glob and report success for a launch that never happened. case "$_phase2_out" in - *triggered*) - echo "Phase 2 triggered on $OWNER ✅" - log "Watch on $OWNER: Scheduler tab, or tail -f /var/log/varaverk/Partnership/partnership_onboard.log" - PHASE2_TRIGGERED=true - ;; missing-runner:*) error "Phase 2 not started — no run_job.sh at ${_phase2_out#missing-runner:} on $OWNER" ;; missing-script:*) error "Phase 2 not started — no partnership_onboard.sh at ${_phase2_out#missing-script:} on $OWNER" ;; - *start-failed*) + start-failed) error "Phase 2 launch on $OWNER did not produce a job record — check run_job.sh there" ;; + triggered) + echo "Phase 2 triggered on $OWNER ✅" + log "Watch on $OWNER: Scheduler tab, or tail -f /var/log/varaverk/Partnership/partnership_onboard.log" + PHASE2_TRIGGERED=true + ;; *) warn "Could not auto-trigger Phase 2 on $OWNER" ;;