Skip to content

Commit a4ee15a

Browse files
authored
fix(release): validate Telegram launcher syntax (#104455)
1 parent 08da0d3 commit a4ee15a

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎.github/workflows/openclaw-release-telegram-qa.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ jobs:
17771777
control_pid="$!"
17781778
trap "kill ${control_pid} >/dev/null 2>&1 || true" EXIT
17791779
proc_marker_visible=false
1780-
# The background child can still expose the shell's pre-exec environment.
1780+
# The background child can still expose the shell pre-exec environment.
17811781
for _ in {1..100}; do
17821782
if tr "\0" "\n" <"/proc/${control_pid}/environ" 2>/dev/null |
17831783
grep -Fxq "OPENCLAW_QA_PROC_CONTROL=visible"; then

‎test/scripts/openclaw-release-telegram-qa-workflow.test.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,23 @@ describe("release Telegram QA workflow", () => {
585585
expect(source).toContain('if [[ "${1:-}" == "--root-terminate-uid" ]]');
586586
});
587587

588+
it("keeps the generated SUT launcher valid bash", () => {
589+
const createSutStep = workflowStep(
590+
workflowJob("run_telegram"),
591+
"Create isolated Telegram SUT identity and launcher",
592+
);
593+
const launcherSource = createSutStep.run?.match(
594+
/<<'LAUNCHER'\n([\s\S]*?)\nLAUNCHER(?:\n|$)/u,
595+
)?.[1];
596+
expect(launcherSource).toBeTruthy();
597+
598+
const result = spawnSync("bash", ["-n"], {
599+
encoding: "utf8",
600+
input: launcherSource,
601+
});
602+
expect(result.status, result.stderr).toBe(0);
603+
});
604+
588605
it("arms the boundary preload only in the gateway main thread", () => {
589606
const createSutStep = workflowStep(
590607
workflowJob("run_telegram"),

0 commit comments

Comments
 (0)