@@ -128,7 +128,6 @@ SYSTEMCTL_SHIM_LOG="$ARTIFACT_ROOT/systemctl-shim.log"
128128SYSTEMCTL_SHIM_PID_FILE=" $ARTIFACT_ROOT /systemctl-shim.pid"
129129SYSTEMCTL_SHIM_DAEMON_LOG=" $ARTIFACT_ROOT /systemctl-shim-gateway.log"
130130CONFIG_COVERAGE_JSON=" $ARTIFACT_ROOT /config-recipe.json"
131- RESTART_AUTHORED_CONFIG=" $RUNTIME_ROOT /restart-authored-openclaw.json"
132131export OPENCLAW_UPGRADE_SURVIVOR_CONFIG_COVERAGE_JSON=" $CONFIG_COVERAGE_JSON "
133132rm -f " $SUMMARY_JSON " " $CONFIG_COVERAGE_JSON "
134133: > " $PHASE_LOG "
@@ -483,24 +482,12 @@ configure_clawhub_fixture() {
483482 export OPENCLAW_CLAWHUB_URL=" http://127.0.0.1:$( cat " $port_file " ) "
484483}
485484
486- park_update_restart_authored_config () {
487- # Establish only the authenticated service target. The candidate update must
488- # receive the untouched migration specimen and own plugin consent/convergence.
489- node " ${OPENCLAW_UPGRADE_SURVIVOR_CONFIG_PARKING_HELPER:- scripts/ e2e/ lib/ upgrade-survivor/ config-parking.mjs} " \
490- park-restart-probe " $OPENCLAW_CONFIG_PATH " " $RESTART_AUTHORED_CONFIG " 18789
491- }
492-
493485assert_prepublish_fixture_idle () {
494486 [ -n " ${OPENCLAW_PREPUBLISH_PLUGIN_REGISTRY_DIR:- } " ] || return 0
495487 node " ${OPENCLAW_UPGRADE_SURVIVOR_CLAWHUB_FIXTURE_SERVER:- scripts/ e2e/ lib/ clawhub-fixture-server.cjs} " \
496488 assert-no-requests " $OPENCLAW_CLAWHUB_URL "
497489}
498490
499- restore_update_restart_authored_config () {
500- node " ${OPENCLAW_UPGRADE_SURVIVOR_CONFIG_PARKING_HELPER:- scripts/ e2e/ lib/ upgrade-survivor/ config-parking.mjs} " \
501- restore " $OPENCLAW_CONFIG_PATH " " $RESTART_AUTHORED_CONFIG "
502- }
503-
504491configure_plugin_registry () {
505492 local fixture_root=" $ARTIFACT_ROOT /plugin-registry"
506493 local package_dir=" $fixture_root /package"
@@ -846,6 +833,10 @@ initialize_state() {
846833 export OPENCLAW_UPGRADE_SURVIVOR_BASELINE_VERSION=" $baseline_version "
847834}
848835
836+ seed_state () {
837+ node scripts/e2e/lib/upgrade-survivor/assertions.mjs seed
838+ }
839+
849840apply_baseline_config_recipe () {
850841 local tsx_import=" ${OPENCLAW_UPGRADE_SURVIVOR_TSX_IMPORT:- tsx} "
851842 local recipe_runner=(
@@ -898,37 +889,37 @@ prepare_update_restart_probe() {
898889 fi
899890 echo " Preparing configured-auth gateway for automatic update restart."
900891 install_update_restart_systemctl_shim
901- seed_update_restart_probe_device_auth
902- local probe_status=0
903- local doctor_log=" ${SYSTEMCTL_SHIM_DAEMON_LOG} .doctor"
904- park_update_restart_authored_config || probe_status=$?
905- if [ " $probe_status " -eq 0 ]; then
906- migrate_update_restart_probe_device_auth " $doctor_log " " $COMMAND_TIMEOUT " || {
907- probe_status=$?
908- echo " baseline probe device identity migration failed" >&2
909- openclaw_e2e_print_log " $doctor_log " >&2
910- }
911- fi
892+ local probe_status=0 restore_status=0
893+ local authored_config=" $RUNTIME_ROOT /baseline-authored-openclaw.json"
894+ local parking_helper=" ${OPENCLAW_UPGRADE_SURVIVOR_CONFIG_PARKING_HELPER:- scripts/ e2e/ lib/ upgrade-survivor/ config-parking.mjs} "
895+ # Bootstrap only service auth; authored plugins must reach the actual updater unchanged.
896+ # The canonical path stays installed in the unit, with reload off until update owns restart.
897+ node " $parking_helper " \
898+ park-restart-probe " $OPENCLAW_CONFIG_PATH " " $authored_config " 18789 || probe_status=$?
912899 if [ " $probe_status " -eq 0 ]; then
913900 write_update_restart_service_env || probe_status=$?
914901 fi
915902 if [ " $probe_status " -eq 0 ]; then
916903 run_update_restart_probe_gateway install 18789 " $COMMAND_TIMEOUT " legacy-ready-log-ok || probe_status=$?
917904 fi
905+ if [ " $probe_status " -eq 0 ]; then
906+ local STATUS_JSON=" $ARTIFACT_ROOT /baseline-status.json" STATUS_ERR=" $ARTIFACT_ROOT /baseline-status.err"
907+ check_gateway_status || probe_status=$?
908+ fi
918909 if [ " $probe_status " -eq 0 ]; then
919910 assert_prepublish_fixture_idle || probe_status=$?
920911 fi
921- # Restoring authored reload settings can restart the baseline immediately.
922- # Keep it offline through specimen seeding, migration, and explicit plugin consent.
912+ # The installed baseline must be offline before restoring authored config or seeding state.
923913 stop_update_restart_probe_gateway " $COMMAND_TIMEOUT " || return " $? "
924- local restore_status=0
925- restore_update_restart_authored_config || restore_status=$?
926- if [ " $probe_status " -ne 0 ]; then
927- return " $probe_status "
914+ if [ -e " $authored_config " ]; then
915+ node " $parking_helper " restore " $OPENCLAW_CONFIG_PATH " " $authored_config " || restore_status=$?
928916 fi
929917 if [ " $restore_status " -ne 0 ]; then
930918 return " $restore_status "
931919 fi
920+ if [ " $probe_status " -ne 0 ]; then
921+ return " $probe_status "
922+ fi
932923}
933924
934925assert_baseline_state () {
@@ -1124,6 +1115,10 @@ repair_fixture_plugin_consent() {
11241115 phase prepare-recovery-service run_update_restart_probe_gateway start 18789 " $COMMAND_TIMEOUT "
11251116 local preparation_status=$?
11261117 [ " $preparation_status " -eq 0 ] || return " $preparation_status "
1118+ local STATUS_JSON=" $ARTIFACT_ROOT /prepared-status.json" STATUS_ERR=" $ARTIFACT_ROOT /prepared-status.err"
1119+ phase prepared-gateway-auth check_gateway_status
1120+ local auth_status=$?
1121+ [ " $auth_status " -eq 0 ] || return " $auth_status "
11271122 phase recovery-update-restart update_candidate 1
11281123 local recovery_status=$?
11291124 [ " $recovery_status " -eq 0 ] || return " $recovery_status "
@@ -1308,12 +1303,7 @@ phase configure-clawhub-fixture configure_clawhub_fixture
13081303phase prepare-update-restart-probe prepare_update_restart_probe
13091304# Start the published baseline before adding migration specimens: its startup
13101305# guards correctly reject them, and baseline Doctor would consume candidate proof.
1311- phase seed-migration-state node scripts/e2e/lib/upgrade-survivor/assertions.mjs seed
1312- if [ " $SCENARIO " = " cron-scheduled-authority" ]; then
1313- # Baseline roster writes must precede ownerless migration specimens: the
1314- # published CLI correctly refuses topology changes while those jobs exist.
1315- phase seed-cron-state node scripts/e2e/lib/upgrade-survivor/assertions.mjs seed-cron
1316- fi
1306+ phase seed-state seed_state
13171307phase install-baseline-plugin-dependencies install_baseline_plugin_dependencies
13181308phase seed-legacy-plugin-dependency-debris seed_legacy_plugin_dependency_debris
13191309phase assert-legacy-plugin-dependency-debris assert_legacy_plugin_dependency_debris_present
0 commit comments