next 漏掉空倉庫中分派給自己的 issue(回 null) #43

Closed
opened 2026-09-13 08:44:41 +08:00 by ceo · 2 comments
Member

現象

teai next 對空倉庫(empty=true)中分派給目前帳號、尚待處理的 open issue 視而不見,錯誤輸出 null。

實例:alterminal/colony-tick-demo 為空倉庫,issue #1「初始化項目」分派給 ceo——gitea.py next 找得到,teai next 回 null。

根因

internal/workflow/scan.go 的 iterOrgRepos(issue 掃描用,供 Mine 與 members --has-work)跳過了 repo.Empty 的倉庫。但行為基準 agents/scripts/lib/gitea.py 的 for_all_repositories(list_my_followup_issues 與 for_all_organizations 用)不跳過空倉庫——Gitea 允許空倉庫擁有 open issue(如「初始化項目」型工作),已實測 API 回 200。

Python 只有 _iter_open_pulls(PR 掃描)、_iter_open_issues(stalled)與 milestone overview 才跳過空倉庫;teai 的 iterOpenPulls、stalled(workflow.go)、milestones.go 對應位置正確,僅 issue 掃描被過度套用。

修復方向

iterOrgRepos 移除 repo.Empty 跳過條件(含註解修正),回歸測試:空倉庫中分派給自己的 issue 應被 next/mine 拾取,members --has-work 同步受惠。

## 現象 `teai next` 對空倉庫(empty=true)中分派給目前帳號、尚待處理的 open issue 視而不見,錯誤輸出 `null`。 實例:`alterminal/colony-tick-demo` 為空倉庫,issue #1「初始化項目」分派給 ceo——`gitea.py next` 找得到,`teai next` 回 `null`。 ## 根因 `internal/workflow/scan.go` 的 `iterOrgRepos`(issue 掃描用,供 `Mine` 與 `members --has-work`)跳過了 `repo.Empty` 的倉庫。但行為基準 `agents/scripts/lib/gitea.py` 的 `for_all_repositories`(`list_my_followup_issues` 與 `for_all_organizations` 用)**不跳過空倉庫**——Gitea 允許空倉庫擁有 open issue(如「初始化項目」型工作),已實測 API 回 200。 Python 只有 `_iter_open_pulls`(PR 掃描)、`_iter_open_issues`(stalled)與 milestone overview 才跳過空倉庫;teai 的 `iterOpenPulls`、stalled(workflow.go)、milestones.go 對應位置正確,僅 issue 掃描被過度套用。 ## 修復方向 `iterOrgRepos` 移除 `repo.Empty` 跳過條件(含註解修正),回歸測試:空倉庫中分派給自己的 issue 應被 `next`/`mine` 拾取,`members --has-work` 同步受惠。
ceo self-assigned this 2026-09-13 08:44:41 +08:00
Author
Member

已修復:PR #44(commit d033443)。根因:iterOrgRepos 對 issue 掃描也套用了空倉庫跳過條件,gitea.py 的 for_all_repositories 掃 issue 本來就不跳過——空倉庫可有「初始化項目」型 open issue。已附回歸測試,審核者已請 alex。

已修復:PR #44(commit d033443)。根因:iterOrgRepos 對 issue 掃描也套用了空倉庫跳過條件,gitea.py 的 for_all_repositories 掃 issue 本來就不跳過——空倉庫可有「初始化項目」型 open issue。已附回歸測試,審核者已請 alex。
Author
Member

已修復並開 PR #44,待審核合併。

  • 根因確認:iterOrgRepos(issue 掃描,供 next 第三層與 mine、members --has-work)誤跳過 empty=true 倉庫,與行為基準 gitea.py 的 for_all_repositories 不一致。
  • 修復:移除該跳過條件;PR/stalled/milestone 掃描維持跳過空倉庫不變(與 gitea.py 一致)。
  • 實機驗證:修復前 teai next → null;修復後正確拾取 colony-tick-demo issue #1。詳見 PR 內驗證留言。
已修復並開 PR #44,待審核合併。 - 根因確認:`iterOrgRepos`(issue 掃描,供 `next` 第三層與 `mine`、`members --has-work`)誤跳過 `empty=true` 倉庫,與行為基準 `gitea.py` 的 `for_all_repositories` 不一致。 - 修復:移除該跳過條件;PR/stalled/milestone 掃描維持跳過空倉庫不變(與 `gitea.py` 一致)。 - 實機驗證:修復前 `teai next` → `null`;修復後正確拾取 colony-tick-demo issue #1。詳見 PR 內驗證留言。
alex closed this issue 2026-09-13 08:51:11 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alterminal/teai#43