Skip to content

Commit f379cae

Browse files
committed
fix(ci): support frozen Matrix QA profiles
1 parent f84ee79 commit f379cae

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

‎.github/workflows/qa-live-transports-convex.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,16 +404,25 @@ jobs:
404404
mkdir -p "${output_dir}"
405405
406406
matrix_help="$(pnpm openclaw qa matrix --help 2>&1)"
407-
if ! grep -Fq -- "--shard <index/total>" <<<"${matrix_help}"; then
408-
echo "Selected target predates profile-free Matrix catalog sharding; update the target revision." >&2
409-
exit 1
407+
if grep -Fq -- "--shard <index/total>" <<<"${matrix_help}"; then
408+
matrix_selection=(--shard "${{ matrix.shard }}/5")
409+
else
410+
legacy_profiles=(transport media e2ee-smoke e2ee-deep e2ee-cli)
411+
shard_index="${{ matrix.shard }}"
412+
if (( shard_index < 1 || shard_index > ${#legacy_profiles[@]} )); then
413+
echo "Invalid Matrix shard index for legacy profile fallback: ${shard_index}" >&2
414+
exit 1
415+
fi
416+
legacy_profile="${legacy_profiles[shard_index - 1]}"
417+
echo "Selected target predates profile-free Matrix catalog sharding; using legacy profile '${legacy_profile}'."
418+
matrix_selection=(--profile "${legacy_profile}")
410419
fi
411420
412421
pnpm openclaw qa matrix \
413422
--repo-root . \
414423
--output-dir "${output_dir}" \
415424
--provider-mode mock-openai \
416-
--shard "${{ matrix.shard }}/5" \
425+
"${matrix_selection[@]}" \
417426
--fast
418427
419428
- name: Upload Matrix QA artifacts

‎test/scripts/package-acceptance-workflow.test.ts‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ describe("package artifact reuse", () => {
26362636
'--shard "${{ matrix.shard }}/5"',
26372637
);
26382638
expect(workflowStep(matrixJob, "Run Matrix live lane").run).toContain(
2639-
"Selected target predates profile-free Matrix catalog sharding",
2639+
'matrix_selection=(--shard "${{ matrix.shard }}/5")',
26402640
);
26412641
expect(readWorkflow(QA_LIVE_TRANSPORTS_WORKFLOW).jobs?.run_live_matrix_sharded).toBeUndefined();
26422642
expect(releaseTelegramWorkflow).toContain(
@@ -2645,10 +2645,28 @@ describe("package artifact reuse", () => {
26452645
expect(workflowStep(matrixJob, "Run Matrix live lane").run).not.toContain("for attempt in");
26462646
expect(qaWorkflow).not.toContain("Matrix live lane failed on attempt");
26472647
expect(qaWorkflow).not.toContain("OPENCLAW_QA_MATRIX_CANARY_TIMEOUT_MS");
2648-
expect(qaWorkflow).not.toContain("--profile");
2648+
expect(qaWorkflow).toContain('matrix_selection=(--profile "${legacy_profile}")');
26492649
expect(qaWorkflow).not.toContain("--fail-fast");
26502650
});
26512651

2652+
it("keeps modern Matrix shards and legacy profile partitions coverage-equivalent", () => {
2653+
const matrixJob = workflowJob(QA_LIVE_TRANSPORTS_WORKFLOW, "run_live_matrix");
2654+
const run = workflowStep(matrixJob, "Run Matrix live lane").run;
2655+
2656+
expect(run).toContain('grep -Fq -- "--shard <index/total>"');
2657+
expect(run).toContain('matrix_selection=(--shard "${{ matrix.shard }}/5")');
2658+
expect(run).toContain(
2659+
"legacy_profiles=(transport media e2ee-smoke e2ee-deep e2ee-cli)",
2660+
);
2661+
expect(run).toContain('legacy_profile="${legacy_profiles[shard_index - 1]}"');
2662+
expect(run).toContain('matrix_selection=(--profile "${legacy_profile}")');
2663+
expect(run).toContain('"${matrix_selection[@]}" \\');
2664+
expect(run).toContain(
2665+
"Selected target predates profile-free Matrix catalog sharding; using legacy profile",
2666+
);
2667+
expect(matrixJob.strategy?.matrix?.shard).toEqual([1, 2, 3, 4, 5]);
2668+
});
2669+
26522670
it("runs live transport lanes nightly while release checks stay gated", () => {
26532671
const releaseWorkflow = readFileSync(RELEASE_CHECKS_WORKFLOW, "utf8");
26542672
const qaWorkflow = readFileSync(QA_LIVE_TRANSPORTS_WORKFLOW, "utf8");

0 commit comments

Comments
 (0)