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) " 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 上只剩一个 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" 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/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 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" }