Skip to content

Commit 7f111b4

Browse files
committed
fix(ci): route Mantis desktop teardown through the recorder wrapper
Cleanup invoked the internal recorder executable as mantis-sut, which is deliberately kept out of the docker group and cannot read the recorder-owned session file; teardown therefore failed and blocked safe_to_release. The cleanup step already runs as the recorder user, so call the public wrapper whose exec shim cds into the session root.
1 parent 1159f69 commit 7f111b4

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎.github/workflows/mantis-telegram-desktop-proof.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,10 @@ jobs:
934934
abort --lane "$lane" || result=1
935935
fi
936936
done
937-
sudo -u mantis-sut /usr/local/lib/mantis-toolchain/telegram-desktop-recorder \
937+
# Teardown goes through the public wrapper: this step already runs as the
938+
# recorder user, and the internal exec shim cds into the session root where
939+
# the recorder-owned session file lives. mantis-sut can do neither.
940+
/usr/local/bin/openclaw-telegram-desktop-recorder \
938941
teardown --session desktop-recorder.json || result=1
939942
if sudo test -f "$lock"; then
940943
echo "Mantis harness lock remained after cleanup." >&2

‎test/scripts/mantis-telegram-desktop-proof-workflow.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,15 @@ describe("Mantis Telegram Desktop proof workflow", () => {
281281
expect(abandoned.run).toContain('sudo kill -TERM -- "-$lane_pgid"');
282282
expect(abandoned.run).toContain('sudo kill -KILL -- "-$lane_pgid"');
283283
expect(abandoned.run).toContain('abort --lane "$lane"');
284-
expect(abandoned.run).toContain("teardown --session desktop-recorder.json");
284+
// Teardown must route through the public wrapper (Docker access lives with the
285+
// recorder user); a direct mantis-sut invocation of the internal exec cannot
286+
// stop the desktop container or read the recorder-owned session file.
287+
expect(abandoned.run).toMatch(
288+
/\/usr\/local\/bin\/openclaw-telegram-desktop-recorder \\\n\s*teardown --session desktop-recorder\.json/u,
289+
);
290+
expect(abandoned.run).not.toContain(
291+
"sudo -u mantis-sut /usr/local/lib/mantis-toolchain/telegram-desktop-recorder",
292+
);
285293
expect(abandoned.run?.indexOf("teardown --session desktop-recorder.json")).toBeLessThan(
286294
abandoned.run?.lastIndexOf('echo "safe_to_release=true"') ?? -1,
287295
);

0 commit comments

Comments
 (0)