Commit Graph

15 Commits

Author SHA1 Message Date
cfdaily 9ec601d747 [moz] feat: Runaway Guard per-task dispatch 上限
CI / lint (pull_request) Successful in 8s
CI / test (pull_request) Successful in 29s
CI / frontend (pull_request) Successful in 12s
CI / notify-on-failure (pull_request) Successful in 1s
§15 Runaway Guard — per-task dispatch_count 上限,防止无限循环 dispatch

问题:mail/toolchain task 走 handler auto-working(跳过 claim),不受
claim_timeout 3 次重试兜底保护。如果反复 spawn 但永远到不了 done/failed,
会无限循环消耗资源(实际案例:2026-06-15 mention 重复投递事件)。

设计:
- tasks 表新增 dispatch_count 字段
- 每次 ticker 成功 dispatch 时递增
- dispatch_count >= 10 时自动标 failed(reason=runaway_guard)
- 覆盖所有非终态(pending/working/claimed)
- 参考 Hermes v0.13 §3 Per-Task 重试上限

改动文件:
- src/blackboard/db.py: _safe_add_column dispatch_count
- src/blackboard/models.py: Task dataclass 加 dispatch_count
- src/daemon/ticker.py: dispatch 递增 + _check_timeouts runaway guard
- docs/design/15-runaway-guard.md: 设计文档
- tests/integration/test_ticker_integration.py: E13 测试 3 个

测试:456 passed, 3 skipped
2026-06-16 23:10:27 +00:00
cfdaily d58e38d58f fix(lint): 修复 PR #14 引入的 lint 回退 (119→0)
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
PR #14 从旧分支复制文件导致回退了 PR #10 的 lint 修复。
修复内容:
- autoflake 移除未使用导入/变量
- autopep8 修复缩进/空格
- 手动修复 F821(pathlib→Path), F541(f-string), F841(未使用变量)
- 所有修复均通过 flake8 --max-line-length=120 --extend-ignore=E501 检查 (0 errors)
2026-06-09 23:53:29 +08:00
cfdaily f7fbdac89c chore: simayi-approved changes - lint fixes, toolchain improvements, healthz
All changes reviewed and APPROVED in PR #12 (Review ID: 40):
- toolchain_routes: webhook repo/org format compat, content dedup (sha256), closed issue filter
- dispatcher: inform mail crash 误标 done 修复
- ticker: cleanup and improvements
- healthz endpoint
- conftest: integration/e2e deselect markers
- docs: design docs, test-guide updates
- various lint/whitespace fixes across 30 files
2026-06-09 23:41:53 +08:00
cfdaily 09a0928bbc fix: resolve all flake8 lint errors (118 → 0)
CI / lint (push) Successful in 8s
CI / lint (pull_request) Successful in 5s
CI / test (push) Failing after 8s
CI / test (pull_request) Failing after 8s
CI / notify-on-failure (push) Successful in 1s
CI / notify-on-failure (pull_request) Successful in 3s
2026-06-09 16:43:41 +08:00
cfdaily 2343f44ff3 auto-sync: 2026-05-29 01:10:52 2026-05-29 01:10:52 +08:00
cfdaily 5494b7f0dd auto-sync: 2026-05-21 20:48:25 2026-05-21 20:48:25 +08:00
cfdaily a737fe5563 auto-sync: 2026-05-18 23:23:29 2026-05-18 23:23:29 +08:00
cfdaily 777d7a4bdf auto-sync: 2026-05-18 18:07:44 2026-05-18 18:07:44 +08:00
cfdaily 4863b8fafb auto-sync: 2026-05-18 18:07:23 2026-05-18 18:07:23 +08:00
cfdaily e645fc2483 auto-sync: 2026-05-18 11:35:05 2026-05-18 11:35:05 +08:00
cfdaily 8dc25226aa auto-sync: 2026-05-18 00:22:40 2026-05-18 00:22:40 +08:00
cfdaily 0b1951b04f auto-sync: 2026-05-18 00:20:37 2026-05-18 00:20:37 +08:00
cfdaily 9b407a5ae6 auto-sync: 2026-05-18 00:20:25 2026-05-18 00:20:25 +08:00
cfdaily aadd2e621f auto-sync: 2026-05-17 21:14:40 2026-05-17 21:14:40 +08:00
cfdaily 78233c9fbe auto-sync: 2026-05-17 00:34:41 2026-05-17 00:34:41 +08:00