Skip to content

Commit da3b5ed

Browse files
authored
fix(testbox): remove changed-gate sync residue (#119163)
1 parent b6a445c commit da3b5ed

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎scripts/crabbox-wrapper.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,8 @@ function remoteGitBootstrapForChangedGate(changedGateBase, changedGateAlias) {
24212421
'openclaw_changed_gate_bundle_tmp="$(mktemp /tmp/openclaw-changed-gate.XXXXXX)" || exit 2;',
24222422
"trap 'rm -f \"$openclaw_changed_gate_bundle_tmp\"' EXIT HUP INT TERM;",
24232423
'cp "$openclaw_changed_gate_bundle" "$openclaw_changed_gate_bundle_tmp" || exit 2;',
2424-
'rm -rf -- "$openclaw_changed_gate_bundle" || exit 2;',
2424+
// Interrupted rsync leaves bundle.XXXXXX beside the destination; never expose transport residue to lane classification.
2425+
'rm -rf -- "$openclaw_changed_gate_bundle" "$openclaw_changed_gate_bundle".* || exit 2;',
24252426
"rm -rf .git || exit 2;",
24262427
"git init -q || exit 2;",
24272428
"git remote add origin https://github.com/openclaw/openclaw.git 2>/dev/null || git remote set-url origin https://github.com/openclaw/openclaw.git || exit 2;",

‎test/scripts/crabbox-wrapper.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,11 @@ function expectChangedGateGitBootstrap(remoteCommand: string): void {
663663
);
664664
expect(remoteCommand).toContain("mktemp /tmp/openclaw-changed-gate.XXXXXX");
665665
expect(remoteCommand).toContain('cp "$openclaw_changed_gate_bundle"');
666+
const cleanupIndex = remoteCommand.indexOf(
667+
'rm -rf -- "$openclaw_changed_gate_bundle" "$openclaw_changed_gate_bundle".* || exit 2',
668+
);
669+
expect(cleanupIndex).toBeGreaterThanOrEqual(0);
670+
expect(cleanupIndex).toBeLessThan(remoteCommand.indexOf("rm -rf .git || exit 2"));
666671
expect(remoteCommand).toContain("git init -q || exit 2");
667672
expect(remoteCommand).toContain(`${remoteChangedGateFetch} || exit 2`);
668673
expect(remoteCommand).toContain(

0 commit comments

Comments
 (0)