Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(reaper): 收尾只发生在「轮首一次」,落定延迟实测中位 533s——窗口内的人工 reopen 必被 processed=True 静默覆盖

Đã đóng
#7 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Read run_once in keeper.py: the reaper fires once at startup (:661-662), _process_resource returns early for in-flight items (:425-426), and the write-back at :2119-2121 unconditionally sets processed=True, clobbering the clear-processed enqueue reopen_issues relies on (:900-923). Trace the ordering load_state → _reap_pipelines → save_state to see how a manual reopen in the completion window is lost, then compare against the dispatch/reopen state fields. Done means a reopen recorded after dispatch survives the reap and is redispatched, with a state round-trip regression test; the three proposed fixes are options, so the approach needs deciding first.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无

基线 HEAD = c08c667。

Summary

  • 收尾只在 run_once 开头一次(keeper.py:661-662);在途项在 _process_resource 直接 return(:425-426)。实测 84 个 run:run 结束到「pipeline 完成」日志延迟中位 533s(区间 335-835s)。
  • 收尾无条件覆盖人工处置:keeper.py:2119-2121 一律 it.processed=True; in_flight_since=None;而 reopen_issues 靠清 processed 入队(:900-923)。顺序:load_state(661) 读入 reopen → _reap_pipelines(662) 写回 processed=True → save_state(675)——人工在窗口内 reopen 被静默吃掉(CLI 还打印「keeper 下一轮会重新派发」)。
  • 放大器:轮内同步 agent 调用(patrol,最长 3900s×5 条)可把窗口拉到 >1h。

影响

人工 reopen 白做(今日 #100/#97/#107 被反复 re-screen 即此痕迹);run 期间(1-2.5h)comment 层整体冻结。

建议

① 派发记 dispatch_epoch,reopen 写 manual_reopen_at,收尾见 reopen 晚于 dispatch 则跳过 processed 并直接重派;② 派发闸发现无槽位时先对在途做 pid 探活收尾再判;③ 允许 in-flight 期间处理评论(仅禁同 issue 新 run)。

Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jeffkit/issue-keeper

Tất cả issue của jeffkit/issue-keeper

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.