Skip to content

Commit 6b6bf3a

Browse files
authored
fix(ci): repair Mantis desktop scenario dispatch (#109505)
1 parent 1f5c823 commit 6b6bf3a

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/mantis-scenario.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,16 @@ jobs:
106106
gh "${args[@]}"
107107
;;
108108
telegram-desktop-proof)
109-
baseline_ref="$BASELINE_REF"
110-
if [[ -z "$baseline_ref" || "$baseline_ref" == "0bf06e953fdda290799fc9fb9244a8f67fdae593" ]]; then
111-
baseline_ref="main"
109+
if [[ -z "${PR_NUMBER:-}" ]]; then
110+
echo "telegram-desktop-proof requires pr_number." >&2
111+
exit 1
112112
fi
113113
args=(
114114
workflow run mantis-telegram-desktop-proof.yml
115115
--repo "$GITHUB_REPOSITORY"
116116
--ref main
117-
-f "baseline_ref=${baseline_ref}"
118-
-f "candidate_ref=${CANDIDATE_REF}"
117+
-f "pr_number=${PR_NUMBER}"
119118
)
120-
if [[ -n "${PR_NUMBER:-}" ]]; then
121-
args+=(-f "pr_number=${PR_NUMBER}")
122-
fi
123119
gh "${args[@]}"
124120
;;
125121
web-ui-chat-proof)

scripts/test-projects.test-support.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,10 @@ const GITHUB_WORKFLOW_OWNER_TEST_TARGETS = new Map([
526526
["test/scripts/package-acceptance-workflow.test.ts"],
527527
],
528528
[".github/workflows/macos-release.yml", ["test/scripts/package-acceptance-workflow.test.ts"]],
529+
[
530+
".github/workflows/mantis-scenario.yml",
531+
["test/scripts/mantis-telegram-desktop-proof-workflow.test.ts"],
532+
],
529533
[
530534
".github/workflows/mantis-telegram-desktop-proof.yml",
531535
[

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const QA_LAB_RUNTIME_API = "extensions/qa-lab/runtime-api.ts";
1010
const PACKAGE_JSON = "package.json";
1111
const WORKFLOW = ".github/workflows/mantis-telegram-desktop-proof.yml";
1212
const LIVE_WORKFLOW = ".github/workflows/mantis-telegram-live.yml";
13+
const SCENARIO_WORKFLOW = ".github/workflows/mantis-scenario.yml";
1314
const PROMPT = ".github/codex/prompts/mantis-telegram-desktop-proof.md";
1415
const TELEGRAM_PROOF_SKILL = ".agents/skills/telegram-crabbox-e2e-proof/SKILL.md";
1516
const DOCS = ["docs/help/testing.md", "docs/concepts/qa-e2e-automation.md"];
@@ -77,6 +78,17 @@ function filesUnder(root: string): string[] {
7778
}
7879

7980
describe("Mantis Telegram Desktop proof workflow", () => {
81+
it("dispatches from the scenario workflow using the proof workflow input contract", () => {
82+
const run = jobStep(SCENARIO_WORKFLOW, "dispatch", "Dispatch scenario").run ?? "";
83+
const branch = run.match(/telegram-desktop-proof\)([\s\S]*?)\n\s*;;/)?.[1];
84+
85+
expect(branch).toBeDefined();
86+
expect(branch).toContain('if [[ -z "${PR_NUMBER:-}" ]]');
87+
expect(branch).toContain('-f "pr_number=${PR_NUMBER}"');
88+
expect(branch).not.toContain("baseline_ref=");
89+
expect(branch).not.toContain("candidate_ref=");
90+
});
91+
8092
it("uses repository pnpm setup defaults", () => {
8193
const workflow = parse(readFileSync(WORKFLOW, "utf8")) as Workflow;
8294
const liveWorkflow = parse(readFileSync(LIVE_WORKFLOW, "utf8")) as Workflow;

0 commit comments

Comments
 (0)