From 5e183dda18f2d6b28ecee28337f6b3bb9f7c98ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E8=89=AF?= <1204183885@qq.com> Date: Mon, 20 Jul 2026 15:27:24 +0800 Subject: [PATCH] test(autofix): sync workflow assertions with split model vars (#7297) The autofix workflow now plumbs QWEN_AUTOFIX_MODEL (with a QWEN_PR_REVIEW_MODEL fallback) into the report steps, and the prepare step documents the verification gate's git diff --quiet check in a comment. Update the two stale assertions so they match the workflow again without dropping their original intent. --- scripts/tests/qwen-autofix-workflow.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/tests/qwen-autofix-workflow.test.js b/scripts/tests/qwen-autofix-workflow.test.js index f6db66e895..a070010bc4 100644 --- a/scripts/tests/qwen-autofix-workflow.test.js +++ b/scripts/tests/qwen-autofix-workflow.test.js @@ -2219,7 +2219,9 @@ describe('qwen-autofix workflow', () => { reviewAddressReportStep, publishPrStep, ]) { - expect(step).toContain("MODEL: '${{ vars.QWEN_PR_REVIEW_MODEL }}'"); + expect(step).toContain( + "MODEL: '${{ vars.QWEN_AUTOFIX_MODEL || vars.QWEN_PR_REVIEW_MODEL }}'", + ); expect(step).toContain('MODEL_DISPLAY="${MODEL:-default}"'); expect(step).toContain(footer); } @@ -2360,7 +2362,10 @@ describe('qwen-autofix workflow', () => { ), ); expect(prepareBranchAndFeedbackStep).not.toContain('git clean'); - expect(prepareBranchAndFeedbackStep).not.toContain('git diff --quiet'); + // The prepare step must not gate the unconditional build-output restore on + // a diff check; `git diff --quiet` only appears in a comment documenting + // the verification gate, never as an executed guard here. + expect(prepareBranchAndFeedbackStep).not.toContain('if git diff --quiet'); }); it('clears persistent autofix workdirs before agent steps run', () => {