From 756ca42a2ce39df54ed81829ec4aa8b1c138799f Mon Sep 17 00:00:00 2001 From: li-xiu-qi Date: Mon, 17 Aug 2026 14:24:59 +0800 Subject: [PATCH 1/5] ci: add release to PR title type whitelist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发版 PR 想用 release: 前缀,但白名单没有 release,只能伪装成 chore:。 加 release 进白名单,让发版 PR 能名正言顺。description 本来就支持中文, 此举不引入中文 type,下游 Conventional Commits 工具链不受影响。 --- .github/workflows/pr-title-checker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title-checker.yml b/.github/workflows/pr-title-checker.yml index d0b2798a..e0896de6 100644 --- a/.github/workflows/pr-title-checker.yml +++ b/.github/workflows/pr-title-checker.yml @@ -19,8 +19,8 @@ jobs: TITLE="${{ github.event.pull_request.title }}" # Conventional Commits regex: type(scope): description - # Types: feat, fix, test, refactor, chore, style, docs, perf, build, ci, revert - if [[ ! "$TITLE" =~ ^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert)(\(.+\))?:\ .+ ]]; then + # Types: feat, fix, test, refactor, chore, style, docs, perf, build, ci, revert, release + if [[ ! "$TITLE" =~ ^(feat|fix|test|refactor|chore|style|docs|perf|build|ci|revert|release)(\(.+\))?:\ .+ ]]; then echo "::error title=Invalid PR Title::PR title does not follow Conventional Commits format." echo "Title: $TITLE" echo "Expected format: type(scope): description" From 825c29165f5d1f62573b2164e4213f30c2e8384a Mon Sep 17 00:00:00 2001 From: li-xiu-qi Date: Mon, 17 Aug 2026 14:45:33 +0800 Subject: [PATCH 2/5] ci: tolerate 403 when posting auto-review comment on fork PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 跨 fork PR 触发的 workflow,GITHUB_TOKEN 只读,发评论会 403。此前无容错, 导致外部贡献者的 PR 即使 lint 全过也必然红叉。403 时改用 core.warning 把 review 正文打进 job 日志,不让 job 失败;missing 文件的真红逻辑保留。 --- .github/workflows/pr-auto-review.yml | 49 ++++++++++++++++++---------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pr-auto-review.yml b/.github/workflows/pr-auto-review.yml index 1cfcd4bc..42b273ad 100644 --- a/.github/workflows/pr-auto-review.yml +++ b/.github/workflows/pr-auto-review.yml @@ -215,28 +215,41 @@ jobs: body += "✅ All automated checks passed. No issues found.\n"; } - const { data: comments } = await github.rest.issues.listComments({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - }); - - const botComment = comments.find(c => c.user.type === 'Bot' && c.body.includes('## PR Auto Review')); - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: body - }); - } else { - await github.rest.issues.createComment({ + // 发评论包在 try/catch 里:跨 fork PR 触发的 workflow,GITHUB_TOKEN 是 + // 只读的(GitHub 安全机制),发评论会 403 Resource not accessible by + // integration。此前这步没容错,导致任何外部贡献者的 PR——哪怕所有 lint + // 全过——auto-review 都必然红叉(2026-08-17 实测 PR #163 复现)。 + // 403 时不让 job 失败,改成把 review 正文打进 job 日志,结论仍可读。 + try { + const { data: comments } = await github.rest.issues.listComments({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: body }); + + const botComment = comments.find(c => c.user.type === 'Bot' && c.body.includes('## PR Auto Review')); + + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: body + }); + } else { + await github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: body + }); + } + } catch (e) { + if (e.status === 403) { + core.warning('无法在 PR 上发评论(跨 fork PR,GITHUB_TOKEN 只读)。review 结果见下方 job 日志:\n\n' + body); + } else { + throw e; + } } // 评论已经发出去之后才失败,顺序不能颠倒:先 setFailed 会让 PR 上只剩一个 From 302c3706c5d5342e66e7ca6ba9926c75f6f64341 Mon Sep 17 00:00:00 2001 From: li-xiu-qi Date: Mon, 17 Aug 2026 16:03:43 +0800 Subject: [PATCH 3/5] ci: fix Windows pyproject.toml UnicodeDecodeError in desktop build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows runner Python 默认 cp1252 读 pyproject.toml 遇 0x8d 字节崩溃, 导致 Sync version from tag 步骤失败。两处 open 加 encoding='utf-8'。 --- .github/workflows/ci-desktop.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-desktop.yml b/.github/workflows/ci-desktop.yml index 0411eb7d..0843ac5f 100644 --- a/.github/workflows/ci-desktop.yml +++ b/.github/workflows/ci-desktop.yml @@ -80,10 +80,13 @@ jobs: python3 -c " import os, re version = os.environ['BASE_VERSION'] - with open('pyproject.toml', 'r') as f: + # Windows runner 的 Python 默认 locale 编码是 cp1252,读含非 ASCII 字节 + # (如 0x8d)的 pyproject.toml 会 charmap 解码崩溃。2026-08-17 实测 + # v0.4.35-beta.1 桌面构建正是死在这里。显式指定 utf-8。 + with open('pyproject.toml', 'r', encoding='utf-8') as f: content = f.read() content = re.sub(r'^version = \".*?\"', f'version = \"{version}\"', content, count=1, flags=re.MULTILINE) - with open('pyproject.toml', 'w') as f: + with open('pyproject.toml', 'w', encoding='utf-8') as f: f.write(content) " From 0794d34642b39de45ee7bcfd0c743d6266d628d6 Mon Sep 17 00:00:00 2001 From: li-xiu-qi Date: Mon, 17 Aug 2026 15:21:53 +0800 Subject: [PATCH 4/5] docs: rename changelog to v0.4.35-beta.1 for release --- .../{v0.4.35_2026-08-16.md => v0.4.35-beta.1_2026-08-17.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/changelog/{v0.4.35_2026-08-16.md => v0.4.35-beta.1_2026-08-17.md} (99%) diff --git a/docs/changelog/v0.4.35_2026-08-16.md b/docs/changelog/v0.4.35-beta.1_2026-08-17.md similarity index 99% rename from docs/changelog/v0.4.35_2026-08-16.md rename to docs/changelog/v0.4.35-beta.1_2026-08-17.md index 2a6cb327..ae987767 100644 --- a/docs/changelog/v0.4.35_2026-08-16.md +++ b/docs/changelog/v0.4.35-beta.1_2026-08-17.md @@ -1,4 +1,4 @@ -# Changelog v0.4.35 - 2026-08-16 +# Changelog v0.4.35-beta.1 - 2026-08-17 ## li-xiu-qi From 61cc7d7e225ffcd836baa71066d194b5a7e46b88 Mon Sep 17 00:00:00 2001 From: li-xiu-qi Date: Mon, 17 Aug 2026 15:24:28 +0800 Subject: [PATCH 5/5] chore(release): bump version to 0.4.35-beta.1 --- apps/backend/pyproject.toml | 2 +- apps/desktop/package.json | 2 +- apps/web/package.json | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/backend/pyproject.toml b/apps/backend/pyproject.toml index 4d12f17a..9a7e851e 100644 --- a/apps/backend/pyproject.toml +++ b/apps/backend/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiasys-backend" -version = "0.4.34" +version = "0.4.35-beta.1" description = "AIASys agent backend" readme = "README.md" requires-python = ">=3.12" diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 2d91062f..6b696415 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,7 +1,7 @@ { "name": "aiasys-desktop", "private": true, - "version": "0.4.34", + "version": "0.4.35-beta.1", "description": "Electron desktop shell for AIASys", "homepage": "https://aiasys.ai", "author": "AIASys ", diff --git a/apps/web/package.json b/apps/web/package.json index 6000f264..7f4abd32 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,7 +1,7 @@ { "name": "aiasys-web", "private": true, - "version": "0.4.34", + "version": "0.4.35-beta.1", "type": "module", "scripts": { "dev": "vite", diff --git a/package.json b/package.json index 2dd06168..281fe7ba 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "aiasys", "private": true, - "version": "0.4.33" + "version": "0.4.35-beta.1" }