test: strengthen published upgrade survivor lane (#75361)

* test: integrate upgrade survivor baseline controls

* test: gate published upgrade survivor path

* test: preserve upgrade survivor fixture contract

* test: keep upgrade survivor temp state off overlay
This commit is contained in:
Josh Avant
2026-04-30 21:50:36 -05:00
committed by GitHub
parent 6603a174bc
commit ce833acbdb
25 changed files with 1002 additions and 85 deletions

View File

@@ -10,6 +10,7 @@ const LIVE_CLI_TIMEOUT_MS = 20 * 60 * 1000;
const LIVE_PROFILE_TIMEOUT_MS = 20 * 60 * 1000;
const OPENWEBUI_TIMEOUT_MS = 20 * 60 * 1000;
export const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SHARDS = 24;
const upgradeSurvivorCommand = "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:upgrade-survivor";
export const LIVE_RETRY_PATTERNS = [
/529\b/i,
@@ -278,7 +279,7 @@ export const mainLanes = [
weight: 3,
},
),
npmLane("upgrade-survivor", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:upgrade-survivor", {
npmLane("upgrade-survivor", upgradeSurvivorCommand, {
stateScenario: "upgrade-survivor",
timeoutMs: 20 * 60 * 1000,
weight: 3,
@@ -547,7 +548,7 @@ const releasePathPackageUpdateCoreLanes = [
weight: 3,
},
),
npmLane("upgrade-survivor", "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:upgrade-survivor", {
npmLane("upgrade-survivor", upgradeSurvivorCommand, {
stateScenario: "upgrade-survivor",
timeoutMs: 20 * 60 * 1000,
weight: 3,

View File

@@ -319,9 +319,12 @@ export function renderShellSnippet(options = {}) {
const scenario = requireScenario(options.scenario);
const config = scenarioConfig(scenario, options);
const env = scenarioEnv(scenario);
const template = `/tmp/openclaw-${label}-${scenario}-home.XXXXXX`;
const homeTemplate = `openclaw-${label}-${scenario}-home.XXXXXX`;
const lines = [
`OPENCLAW_TEST_STATE_HOME="$(mktemp -d ${shellQuote(template)})"`,
'OPENCLAW_TEST_STATE_TMP_ROOT="${OPENCLAW_TEST_STATE_TMPDIR:-${TMPDIR:-/tmp}}"',
"export OPENCLAW_TEST_STATE_TMP_ROOT",
'mkdir -p "$OPENCLAW_TEST_STATE_TMP_ROOT"',
`OPENCLAW_TEST_STATE_HOME="$(mktemp -d "$OPENCLAW_TEST_STATE_TMP_ROOT/${homeTemplate}")"`,
'export HOME="$OPENCLAW_TEST_STATE_HOME"',
'export USERPROFILE="$OPENCLAW_TEST_STATE_HOME"',
'export OPENCLAW_HOME="$OPENCLAW_TEST_STATE_HOME"',
@@ -360,7 +363,9 @@ export function renderShellFunction() {
*)
label="$(printf "%s" "$label" | tr -cs "A-Za-z0-9_.-" "-" | sed -e "s/^-*//" -e "s/-*$//")"
[ -n "$label" ] || label="state"
OPENCLAW_TEST_STATE_HOME="$(mktemp -d "/tmp/openclaw-$label-$scenario-home.XXXXXX")"
local tmp_root="\${OPENCLAW_TEST_STATE_TMPDIR:-\${TMPDIR:-/tmp}}"
mkdir -p "$tmp_root"
OPENCLAW_TEST_STATE_HOME="$(mktemp -d "$tmp_root/openclaw-$label-$scenario-home.XXXXXX")"
;;
esac
export HOME="$OPENCLAW_TEST_STATE_HOME"