Skip to content

Commit 651aab8

Browse files
authored
fix(release): wait for Telegram proc visibility (#104439)
1 parent d5fe0c5 commit 651aab8

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,15 +1777,15 @@ jobs:
17771777
control_pid="$!"
17781778
trap "kill ${control_pid} >/dev/null 2>&1 || true" EXIT
17791779
proc_marker_visible=false
1780-
# The child PID exists before execve publishes command-scoped env.
1780+
# The background child can still expose the shell's pre-exec environment.
17811781
for _ in {1..100}; do
1782-
if tr "\0" "\n" <"/proc/${control_pid}/environ" |
1782+
if tr "\0" "\n" <"/proc/${control_pid}/environ" 2>/dev/null |
17831783
grep -Fxq "OPENCLAW_QA_PROC_CONTROL=visible"; then
17841784
proc_marker_visible=true
17851785
break
17861786
fi
17871787
kill -0 "$control_pid" >/dev/null 2>&1 || break
1788-
sleep 0.01
1788+
sleep 0.05
17891789
done
17901790
[[ "$proc_marker_visible" == "true" ]]
17911791
# Reading the marker is the proof; the probe may exit before cleanup.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,11 @@ describe("release Telegram QA workflow", () => {
535535
expect(source).toContain("runtime_stage=verify-parent-proc-hidden");
536536
expect(source).toContain("runtime_stage=verify-proc-visibility");
537537
expect(source).toContain("for _ in {1..100}; do");
538+
expect(source).toMatch(
539+
/if tr "\\0" "\\n" <"\/proc\/\$\{control_pid\}\/environ" 2>\/dev\/null \|\n\s+grep -Fxq "OPENCLAW_QA_PROC_CONTROL=visible"; then/u,
540+
);
538541
expect(source).toContain("proc_marker_visible=true\n break");
542+
expect(source).toContain("sleep 0.05");
539543
expect(source).toContain('[[ "$proc_marker_visible" == "true" ]]');
540544
expect(source).toMatch(
541545
/kill "\$control_pid" >\/dev\/null 2>&1 \|\| true\n\s+wait "\$control_pid" \|\| true/u,

0 commit comments

Comments
 (0)