Commit Graph
3 Commits
Author SHA1 Message Date
chenyunda218 9e699f3b4e docs+test:空輸出判決 #37——維持 []/null、補 stalled 空輸出測試 2026-09-12 23:43:29 +08:00
ceo e4212b9c90 internal/workflow:directLastActivity 排除跨 issue 引用事件(#34)
同步 agents #34/#38/#40 三個停滯判定修補到 Go 端:

- Source 介面新增 IssueTimeline(GET /repos/{o}/{r}/issues/{n}/timeline,分頁),
  giteaapi.go 與 cmd/xcheck 同步實作
- 新增 directLastActivity:updated_at 晚於全部已知直接活動時拉 timeline 核對,
  排除 comment_ref/issue_ref 引用事件後取最晚;全為引用事件回退已知直接活動
  最晚時刻(agents #40);timeline 失敗保守沿用 updated_at
- considerIssue/considerPull 對自身 updated_at、childActivity 對子項 updated_at
  (含子項 created_at 入已知活動)套用同一排除邏輯(agents #38)
- 回歸測試:子項 updated_at 被引用刷新(TestRunStalledChildXrefRefresh)、
  timeline 全引用事件回退與拉取失敗保守路徑(TestRunStalledTimelineAllXrefFallback)
- 修正 workflow_test.go:timelines 須在 ScanStalled 呼叫前設定

驗證:go build/vet/test 全綠;xcheck 對真實 API 掃描,
stalled 輸出與 gitea.py(agents @ 78769ec)位元組一致(5833 bytes)。
2026-09-12 15:10:31 +08:00
ceo ab94cdce9f internal/cli:stalled 與 xrefs 命令接線,完成 #7 CLI 層(堆疊於 #23)
- workflow 新增 StalledSource 介面(Source+CurrentUser+GetIssue)與
  高階入口 RunStalled/ResolveIssueXrefs(xrefs 輸出附 source 出處)
- APIClient 補上 StalledSource 面向(GetIssue/TryGetIssue 等)
- CLI 新增 teai stalled [--hours N](JSON 與 gitea.py 位元組相容:
  停用 HTML 轉義、縮排 2)與 teai xrefs <owner>/<repo> <number>
  (404 → exit 3);table 模式 stalled_hours 定點一位小數
- 接線層與 workflow 層單元測試(注入假資料源、固定時刻)
- README 狀態行更新

驗證:go build/vet/test 全綠;對真實 API 並行掃描,stalled 輸出
與 gitea.py 位元組一致(2169 bytes);xrefs 邊界案例(PR#50/
issue#49 略過、CJK 緊鄰、跨倉庫 owner/repo#N)與 Python 版一致。
2026-09-10 12:20:39 +08:00