From fc381f95c11d4bb6d0263f56a8fccd352262ca1f Mon Sep 17 00:00:00 2001 From: wenshao Date: Sat, 18 Jul 2026 06:04:13 +0800 Subject: [PATCH] docs(autofix): make bot PR comments bilingual with collapsed Chinese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Files the workflow posts verbatim as PR comments (address-summary.md, no-action.md, e2e-report.md) must now end with a complete collapsed Chinese translation (
中文说明…), mirroring the repository's PR-body convention, so the bot's review reports and E2E reports read natively for both audiences. failure.md/handoff.md stay English-only without a details block: handoff comments embed a byte-truncated excerpt, and a severed
tag would swallow the rest of the rendered comment. Contract test pins the rule (bilingual instruction present, the three files named, the truncation-safety exclusion stated). 51/51. --- .qwen/skills/autofix/SKILL.md | 26 ++++++++++++++++++--- scripts/tests/qwen-autofix-workflow.test.js | 16 +++++++++++++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.qwen/skills/autofix/SKILL.md b/.qwen/skills/autofix/SKILL.md index 37501256f56..aed53067736 100644 --- a/.qwen/skills/autofix/SKILL.md +++ b/.qwen/skills/autofix/SKILL.md @@ -50,6 +50,24 @@ owns the model-driven decisions, code changes, and pre-commit verification. infra failure IS worth reporting: quote the exact command and its real output in `/failure.md` rather than skipping the check or guessing at the cause (e.g. do not claim "node_modules is incomplete" unless you saw it fail). +- Bilingual PR-comment outputs: any file the workflow posts VERBATIM as a PR + comment — `address-summary.md`, `no-action.md`, and `e2e-report.md` — must be + written in English and END with a complete collapsed Chinese translation of + its content, mirroring the repository's PR-body convention: + + ```markdown +
+ 中文说明 + + …完整逐段翻译… + +
+ ``` + + Translate the whole body, section by section; do not summarize or omit. + Keep `failure.md` and `handoff.md` English-only WITHOUT a details block: + handoff comments embed a byte-truncated excerpt of them, and a severed + `
` tag would swallow the rest of the comment when rendered. - Never ask the user a question in this headless workflow. If blocked, write `/failure.md` with what you learned and stop. @@ -108,7 +126,8 @@ Implement the selected issue in the checked-out repository: 8. Ensure `git status --short` shows only intended files, then create one Conventional Commit, e.g. `fix(core): summary (#)`. 9. Write all required outputs: - - `/e2e-report.md` + - `/e2e-report.md` (bilingual per Shared Rules — it is posted + verbatim as a PR comment) - `/pr-title.txt` - `/pr-body.md` using `.qwen/skills/prepare-pr/SKILL.md` @@ -146,6 +165,7 @@ Finish with exactly one outcome: tests for touched packages (plus `npm run generate:settings-schema`, staging the regenerated schema, if a settings source changed), commit once only after they pass, then write `/address-summary.md` with each feedback point, - decision, changes, conflict notes, and verification results. -- No change: write `/no-action.md`. + decision, changes, conflict notes, and verification results (bilingual per + Shared Rules). +- No change: write `/no-action.md` (bilingual per Shared Rules). - Cannot confidently proceed: write `/failure.md` and do not commit. diff --git a/scripts/tests/qwen-autofix-workflow.test.js b/scripts/tests/qwen-autofix-workflow.test.js index f0592557de7..af964d7f6cf 100644 --- a/scripts/tests/qwen-autofix-workflow.test.js +++ b/scripts/tests/qwen-autofix-workflow.test.js @@ -444,6 +444,22 @@ describe('qwen-autofix workflow', () => { expect(skill).toContain('drop one silently'); }); + it('requires bilingual bodies for files posted verbatim as PR comments', () => { + const skill = readAutofixSkill(); + // Comment bodies mirror the repository's PR-body convention: English + // content ending with a complete collapsed Chinese translation. + expect(skill).toContain('中文说明'); + expect(skill).toMatch( + /`address-summary\.md`, `no-action\.md`, and `e2e-report\.md`/, + ); + // failure/handoff excerpts are byte-truncated into handoff comments; a + // severed
tag would swallow the rest of the comment, so those + // two files must stay English-only. + expect(skill).toContain( + 'Keep `failure.md` and `handoff.md` English-only WITHOUT a details block', + ); + }); + it('includes issue-level comments in review feedback scanning', () => { const reviewScanStep = workflow.match(