























@@ -51,7 +51,7 @@ describe("Mantis Telegram Desktop proof workflow", () => {
51515252const agent = workflowStep("Run Codex Mantis Telegram agent");
5353expect(agent.env?.OPENCLAW_TELEGRAM_USER_DRIVER_SCRIPT).toBe(
54-"scripts/e2e/telegram-user-driver.py",
54+"${{ github.workspace }}/scripts/e2e/telegram-user-driver.py",
5555);
5656expect(agent.env?.OPENCLAW_TELEGRAM_USER_CRABBOX_BIN).toBe("/usr/local/bin/crabbox");
5757expect(agent.env?.CRABBOX_COORDINATOR).toContain(
@@ -66,4 +66,24 @@ describe("Mantis Telegram Desktop proof workflow", () => {
6666"OPENCLAW_TELEGRAM_USER_CRABBOX_BIN OPENCLAW_TELEGRAM_USER_CRABBOX_PROVIDER OPENCLAW_TELEGRAM_USER_DRIVER_SCRIPT",
6767);
6868});
69+70+it("checks the Telegram user driver before leasing credentials", () => {
71+const proofScript = readFileSync(PROOF_SCRIPT, "utf8");
72+const startSession = proofScript.slice(
73+proofScript.indexOf("async function startSession"),
74+proofScript.indexOf("async function sendSessionProbe"),
75+);
76+const defaultProof = proofScript.slice(proofScript.indexOf("async function main"));
77+78+expect(startSession).toContain("requireUserDriverScript(opts);");
79+expect(startSession).toContain("leaseCredential({ localRoot, opts, root })");
80+expect(defaultProof).toContain("requireUserDriverScript(opts);");
81+expect(defaultProof).toContain("leaseCredential({ localRoot, opts, root })");
82+expect(startSession.indexOf("requireUserDriverScript(opts);")).toBeLessThan(
83+startSession.indexOf("leaseCredential({ localRoot, opts, root })"),
84+);
85+expect(defaultProof.indexOf("requireUserDriverScript(opts);")).toBeLessThan(
86+defaultProof.indexOf("leaseCredential({ localRoot, opts, root })"),
87+);
88+});
6989});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。