Commit graph

6 commits

Author SHA1 Message Date
Shaojin Wen
90c166585a
feat(release): user-facing bilingual digest for release notes (#9216)
* feat(release): user-facing bilingual digest for release notes

Stable release notes read as a type-bucketed PR list, which users find
hard to scan. The finalize step now asks the model to group changes into
user-facing themes with short intros, mirrors highlights and themes into
a Chinese digest, attaches screenshots found in merged PR bodies (host
allowlist, per-release cap), and collapses the full PR list into an
appendix with normalized titles. Every model failure path keeps today's
v1 output byte-for-byte, and CHANGELOG.md accepts the new v2 marker.

* fix(release): tighten v2 digest fallbacks and changelog skeleton (#9216)

Address review round 1 findings:

- usedAi only counts themes that carry content, so a release whose
  digest has zero model text is no longer reported as AI-generated
- hasChinese is derived from what the Chinese block actually renders,
  not raw model output, so zh-only-on-breaking releases no longer emit
  an empty or English-only section
- a PR repeated inside one theme is deduped instead of discarding the
  whole themes digest with a misleading cross-theme error
- fallback titles in the v2 digest are normalized like the appendix,
  killing the mixed-style look in the degradation case
- normalizeAppendixTitle strips only the conventional types the
  changelog's formatEntry strips, keeping ci/test/security prefixes
- the changelog unwraps the v2 appendix at the same sibling rank as
  v1's Complete Change List instead of nesting it under the previous
  section
- drop a dead summaries max_tokens scaling term and a verbatim copy of
  renderChangeLine's attribution rendering

* fix(release): close digest image breakout and tighten fallback signals (#9216)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(release): drop camo proxy and harden digest text validation (#9216)

* fix(release): neutralize markdown breakouts in digest text and images (#9216)

* fix(release): close classification, image-URL, and text-validation bypasses (#9216)

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
2026-08-17 00:12:04 +00:00
易良
c73b5ed887
ci: run Windows merge queue tests on ECS (#8386)
* ci: run Windows merge queue tests on ECS

* test(channels): skip POSIX mode assertion on Windows

* ci: expose Git Bash on Windows ECS runner

* ci: scope Windows ECS tuning to self-hosted and restore full test:ci

Review feedback on the Windows ECS routing: dropping test:scripts removed the only Windows execution of 9 Windows-only install-script tests, and the job-wide PowerShell default plus narrowed test command changed the kill-switch fallback away from the known-good hosted configuration.

Restore the full npm run test:ci on both paths (bash is available: pre-installed on hosted runners, exposed via the Git Bash PATH entry on ECS) and gate every ECS-specific adjustment on runner.environment: the PowerShell setup step (now also skip_ci-guarded), TEMP/TMP/LC_ALL env writes, and the Linux-style Node setup split that fails with an actionable error naming MAINTAINER_ECS_RUNNER_DISABLED. The windows-2022 fallback is byte-for-byte the pre-ECS job again.

* test: make Windows CI suites platform-aware

* ci: add stale-checkout guard to Windows ECS test job

* test(core): compare canonical directory identity

* ci: add fork guard and review follow-ups to Windows ECS job

* test(core): exercise real directory identity change

* test(core): wait for killed lease process exit

* test(scripts): avoid cmd echo trailing spaces

* test(scripts): use unambiguous cmd echo syntax

* test(cli): avoid sidecar I/O in truncation test

* test: fix Windows script-suite gaps and unify platform gating

- Fix missed trailing-space cmd stub in package-scripts.test.js so the
  'runs prepare steps in order' assertion passes on Windows.
- Add qwen-pr-review-workflow.test.js and pr-self-report-label.test.js to
  the win32 exclude list (both test Linux-only workflows and are not
  portable to Windows).
- Replace local itPosix/describeOnNonWindows consts with vitest's built-in
  it.skipIf/it.runIf/describe.skipIf, matching the codebase idiom.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* test(scripts): restore Windows workflow coverage

* test(scripts): re-exclude Windows-incompatible workflow tests on win32

Re-add pr-self-report-label.test.js and qwen-pr-review-workflow.test.js to
the win32 exclude list. Both fail on a Windows runner for reasons the code
still carries: qwen-pr-review-workflow.test.js calls execFileSync('mkdir'),
which has no executable to resolve there, and pr-self-report-label.test.js
joins PATH with ':', corrupting the ';'-separated Windows PATH so its gh
stub never resolves. Excluding them restores a green Windows gate; Linux CI
remains their authoritative coverage. Document the criterion inline.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* ci: extract checkout-head guard into composite action, pin Windows gate (#8386)

Address review round 2: move the stale-checkout guard shared by the four CI gates into .github/actions/verify-checkout-head so the copies cannot drift, pin the Windows gate kill-switch routing and guard wiring in the script tests, re-enable lint.test.js on Windows via separator normalization and a lazy linter setup in scripts/lint.js, unify the platform skips on it.skipIf(process.platform === 'win32'), and document the queued-run behavior of the ECS kill switch.

* ci: fail fast in Windows gate environment setup (#8386)

* ci: dedupe self-hosted runner steps into actions, pin gate mutations (#8386)

* fix(ci): checkout before repository-local actions in Windows gates (#8386)

* fix(ci): configure Windows runner before bash guard

* test(ci): pin remaining shared-action wiring in script tests (#8386)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

* fix(ci): skip zip-dependent packaging tests when zip is missing (#8386)

* fix(ci): validate full Windows smoke path

* fix(ci): match Windows smoke shell to gate and drop dead runs-on guard (#8386)

* fix(ci): make SIGTERM escalation test Windows-aware and tighten pins (#8386)

The CDP acceptance test asserted a POSIX-only SIGKILL escalation, which
fails deterministically on Windows where kill('SIGTERM') terminates the
child directly — blocking the Windows merge-queue gate. Assert the
platform-appropriate signal instead.

Also address review suggestions: probe `unzip` alongside `zip`, pin the
integration_cli guard's missing step-level `if:`, stop getWorkflowStep
at unnamed steps, pin install-script.test.js out of the win32 excludes,
add the stale-checkout guard to windows-runner-smoke.yml, pin the
Node preflight warning branch and the guard reject path contiguously,
and extend the smoke shell-parity loop to the npm cache step.

* docs(ci): clarify Windows runner trust boundary

---------

Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com>
2026-08-05 12:14:42 +00:00
易良
bfd4c8e519
fix(scripts): slim release-note model prompts and log request timing (#7941) 2026-07-28 15:32:56 +00:00
易良
923e5ab425
fix(scripts): harden retry classification and preserve deadline error context (#7854)
* fix(scripts): harden retry classification and preserve deadline error context

Follow-up to #7535 addressing remaining review suggestions:

- isRetryableModelError: content-validation errors ('Model response did not
  contain message content.') are now non-retryable. These are deterministic
  failures from our own code — retrying the same prompt reproduces the same
  failure. Network-level errors (no HTTP status) remain retryable.
- Deadline-expired errors now include the original error message instead of
  the generic 'budget exhausted', so oncall can see the root cause.
- Added 4 tests: HTTP 429 retry, network error retry, content-validation
  non-retry, deadline error preservation.

* fix(release): preserve last model error across retry budget

* test(release): cover retry budget expiry after backoff

* refactor(release): extract deadline error helper and preserve cause

Consolidate the three identical budget-exhausted throw sites into a single deadlineError() helper so they share one message format and source variable, and attach the last model error as the Error cause so its stack trace survives into CI logs. Also conform the release-notes tests added by this series to Prettier.
2026-07-27 23:48:43 +00:00
Yufeng He
e5df5b22e3
fix(scripts): retry model calls and surface degraded release notes (#7535)
* fix(scripts): retry model calls and surface degraded release notes

The stable-release notes generator fell back to pull-request titles on
any model error and the finalize workflow stayed green with no visible
degradation. Four recent stable releases lost every summary batch and
the highlights call to 60s timeouts without anyone noticing.

The completer now retries each request (default 2 retries, exponential
backoff with jitter) on timeouts, network errors, 429, and 5xx, while
4xx fails immediately. After three consecutive failed summary batches a
circuit breaker stops paying the timeout for the rest and skips the
highlights call, since the model side is down rather than slow.

Fallback warnings are emitted as :⚠️: workflow commands so they
render as run annotations, and a degraded-run block is appended to
GITHUB_STEP_SUMMARY when any fallback occurred, distinguishing fully
degraded (titles only) from partially degraded runs.

Refs #7523

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>

* ci: retrigger after flaky fork-dispatch test failure

* fix(scripts): create the step-summary parent dir before appending

The ubuntu CI shard of this PR failed the summary test with ENOENT on
readFileSync after appendFileSync: the append reached the runner fine,
but the parent of the summary path can be missing there. Create it
recursively first, which is what the function's contract (the note must
land in the summary file) already implies.

* fix(scripts): assert the degraded summary through the fs mock

test-setup.ts no-op mocks appendFileSync for the whole scripts project, so the new test's real-file read could never see the write under test:scripts. Assert on the mock call instead.

* fix(scripts): keep summary-write failures from costing the notes and make the reset test real

appendDegradedStepSummary now runs through tryAppendDegradedStepSummary so a filesystem error on the auxiliary summary cannot kill the release before the notes are written, and the circuit-breaker recovery test's mock returns valid summary payloads so the reset path is actually exercised.

* fix(scripts): escape model-controlled text in workflow commands

Warnings can carry model output (parse errors, PR-derived fields) into
:⚠️: commands. Percent-encode %/CR/LF so a forged ::error:: line
cannot emit a second runner command, and collapse newlines in the
step-summary markdown list so a multi-line warning does not break the
list. Closes the P1 from PR review.

* fix(scripts): bound release-note AI generation time

* fix(scripts): log model request retries to stderr

Retry attempts in createOpenAiCompleter were silent, so an oncall
engineer could not distinguish slow model responses from exponential-
backoff retries in the CI log. Emit a one-line stderr log on each retry
with the attempt count, the triggering error, and the backoff delay.
Plain stderr (not :⚠️:) so transient retries that recover do not
become run annotations.

* fix(scripts): escape retry log workflow commands

---------

Signed-off-by: Yufeng He <40085740+he-yufeng@users.noreply.github.com>
Co-authored-by: 易良 <1204183885@qq.com>
Co-authored-by: yiliang114 <effortyiliang@gmail.com>
2026-07-27 14:55:11 +00:00
易良
ae9e7782d4
feat(release): generate AI-assisted release notes (#6756)
* feat(release): generate AI-assisted release notes

* docs(release): remove AI release notes planning docs

* fix(release): preserve complete AI release notes

* refactor(release): trim AI notes generator surface

* ci: Open autofix issues for main CI failures

* fix(release): harden AI notes review feedback

* fix(release): close AI notes review gaps
2026-07-12 13:00:22 +00:00