Commit Graph

600 Commits

Author SHA1 Message Date
cfdaily f62004e6a7 chore(docs): 清理 design 目录重复文件,归档至 archive
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
- 27 个与 archive/archive-2.0 完全相同的外层文件删除
- spawner-monitor-design.md 外层更新版覆盖 archive 后删除
- test-plan-v2.6.md 外层版覆盖 archive 后删除
- §24 设计文档新增 §8 实验验证章节
- archive 独有文件保留不动
2026-06-13 08:32:28 +08:00
cfdaily 6c6e884ce3 fix(spawner): Review M1/M2 — 删除 overflow/timeout 死代码,只保留 precheck;更新设计文档 v5
CI / lint (pull_request) Successful in 8s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
M1: overflow/timeout 标记不含 sessionKey,被前置过滤跳过是死代码。
    precheck 总在 overflow 之前触发且含 sessionKey,已覆盖 overflow 场景。
    删除 overflow/timeout 分支,只保留 precheck route=compact_then_truncate。

M2: §24 设计文档新增 v5 章节描述(方案概述、三种触发路径分析、为什么只依赖 precheck)。
2026-06-13 07:01:54 +08:00
cfdaily 387fa3214f docs: sync §25 design doc help_keywords with actual code
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 1s
2026-06-12 19:09:23 +08:00
cfdaily f25af64f00 feat(toolchain): §25 Gitea @mention end-to-end integration
New files:
- src/api/mention_utils.py: extract_mentions(), infer_intent(),
  _build_response_guidance(), AGENT_ALIAS mapping
- templates/toolchain/mention.md: @mention notification template
  with context API + response guidance by intent type

Modified:
- src/api/toolchain_routes.py: S1-S5 handler changes
  - S1: Issue body @mention on opened
  - S2+S4: _handle_issue_comment control flow refactored
    (guard clause → positive if, CI + @mention independent paths)
  - S3: PR body @mention on opened
  - S5: Review body @mention on submitted
  - New _send_mention_mails() with auto-flow suppression
- src/daemon/toolchain_templates.py: register mention template

Design: docs/design/25-gitea-mention-toolchain.md (v2.0)
Tests: 405 passed, 3 skipped
2026-06-12 18:56:54 +08:00
cfdaily 73454c0787 refactor(auto-deploy): YAML config + post_deploy list + deploy failure mail
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 1s
- New config/deploy-targets.yaml: centralized deploy target config
- Rewrite auto-deploy in _handle_pr_closed to use YAML config
- Add _send_deploy_failure_mail helper (reuses deploy_failure template)
- Support post_deploy command list (not just pm2 restart)
- Docs-only changes skip post_deploy
- Add pyyaml to pyproject.toml dependencies
- Update design doc §23 with new architecture
2026-06-12 13:57:55 +08:00
cfdaily b80290fe78 fix: address PR #43 review feedback (M1-M3, S1)
M1: git pull in dev dir + rsync to install dir (install dir has no .git)
M2: use asyncio.create_subprocess_exec instead of subprocess.run
M3: add repo whitelist (only sanguo/sanguo_moziplus_v2 triggers auto-deploy)
S1: notify jiangwei-infra on rsync/pm2 restart failure
2026-06-12 13:57:55 +08:00
cfdaily 9bb1e9dc64 feat(toolchain): auto-deploy on PR merge (git pull + pm2 restart) (#43)
- Add auto-deploy logic in _handle_pr_closed after mail notification
- git pull origin main in install dir on merge
- Smart restart: only restart pm2 when src/templates/frontend/*.py changed
- Pure docs changes: pull only, no restart
- Deploy failure logged but does not block mail notification
- Update design doc §23 with auto-deploy section
2026-06-12 13:57:55 +08:00
cfdaily 5d24183c14 docs: 修正最后一处 pr_merged → review_merged (仲达 M1)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 1s
2026-06-12 12:39:54 +08:00
cfdaily 7b32994c75 docs: 修正模板文件名 pr_merged → review_merged 2026-06-12 12:39:54 +08:00
cfdaily 40efa1c623 docs: §13/§18/§23 更新 synchronize fallback + merge 通知 2026-06-12 12:39:54 +08:00
cfdaily 3c2c0f3175 fix(spawner): §24 v4 compact检测 - trajectory prompt.submitted 替换 gateway rotation
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-11 23:57:09 +08:00
cfdaily bcb8ced17a fix(spawner): address PR#36 review feedback (M1+M2+S1+S2)
CI / lint (pull_request) Successful in 8s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-11 21:40:09 +08:00
cfdaily 7918b12ff7 feat(spawner): §24 compact detection via gateway log rotation events 2026-06-11 21:18:33 +08:00
cfdaily a4bb752d71 feat(toolchain): add PR synchronize and review comment notifications
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
- pull_request.synchronize: notify reviewer to re-review after push
- pull_request_review COMMENTED: notify PR author of review comments
- New templates: review_updated.md, review_comment.md
- Idempotency: add review ID to content dedup key
- Design doc: docs/design/23-toolchain-pr-lifecycle.md
2026-06-11 14:00:44 +08:00
cfdaily d98fae007f docs: §21 handler 注册后 E2E 验证报告
CI / lint (pull_request) Failing after 8s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 3s
Mail/Toolchain 核心流程全部通过:
- Mail: inform auto-working → auto-done 
- Toolchain Issue 指派: webhook → Mail 
- Toolchain PR Review: webhook → Review 请求 → Review 结果 
- CI 失败重复 Mail 问题确认(org+repo webhook 双触发,已知)

Task review 路径待明天验证。
2026-06-11 08:08:20 +08:00
cfdaily 25863634c2 fix: v3.0→HEAD review 修复 — handler 注册 + review verdict + skill 全文注入
基于庞统+司马懿背靠背 review,修复 6 个问题:

P0 致命:
- A1: _legacy_on_complete 补回 review verdict 处理(approved→done,非 approved→@mention assignee)
- A2: 添加 TaskTypeRegistry.register() 启动初始化(注册 Task/Mail/Toolchain handler)

P1 中等:
- B11-1: RoleSkillSection 从索引提示改为全文注入(对齐设计 §2.3 + BootstrapBuilder 行为)
- A8: retry prompt is_mail 硬编码改走 TaskTypeRegistry handler 判断

P2 低:
- _mail_* 4 个方法添加 DEPRECATED 注释
- ticker.py handler check_completion 代码块缩进对齐(28→24 空格)

测试:394 passed, 0 failed
Review reports: docs/design/review-v3-vs-head-{pangtong,simayi}.md
2026-06-11 08:08:20 +08:00
cfdaily 8d72a1fa19 feat: Step 5 引擎接入 + H1-H3/S3 修复 + 审计 D1/D2/D5 修复
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 3s
引擎接入(dispatcher/spawner/ticker → handler 统一路由):
- dispatcher: guardrail/on_checks_passed/on_complete → handler 查询
- spawner: _build_prompt/_build_api_section → handler.build_prompt
- ticker: 虚拟项目扫描/assignee/claimed/review/幻觉门控 → handler 判断

Handler 缺陷修复:
- H1: _mark_task_status 加 3 次重试(防 DB 锁)
- H2: review @mention 加 comment_type='review'
- H3: review 非 approved 保持 review 状态(不标 working)
- S3: 通知链接改 Gitea(PR/Issue/Commit)

审计修复:
- D1: pre_spawn 返回值未检查 → 加 if not 抛 RuntimeError
- D2: PromptContext 缺 from_agent/mail_type → 从 must_haves 解析
- D5: _check_reply 查错表 → 恢复查 tasks 表找 in_reply_to

旧方法保留未删(deprecated),确认稳定后再清理。
2026-06-10 22:33:03 +08:00
cfdaily cc974bf258 fix: S1-S4 建议项修复 — 类型标注精确化+BaseTaskHandler标注后续PR+token预算说明
CI / lint (pull_request) Failing after 8s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 2s
2026-06-10 16:38:00 +08:00
cfdaily 0e4d12898d fix: M1-M4 修复 Protocol 签名与设计文档对齐 + §14 去重
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 3s
2026-06-10 15:41:54 +08:00
cfdaily 86504faf1f docs: 20-task-type-architecture.md v3.0 - §14-§18 五层架构+BaseTaskHandler+执行流程+决策记录 2026-06-10 15:41:54 +08:00
cfdaily 1c6b66dc63 docs: 20-task-type-architecture.md v2.1 - 修复 review M1-M3 必修项
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 3s
2026-06-10 12:41:43 +08:00
cfdaily 3fa6040b93 docs: 20-task-type-architecture.md v2.0 - 新增 §11-§13 PromptSection 模式 2026-06-10 12:41:43 +08:00
cfdaily 1485719b0e docs: add 20-task-type-architecture.md - TaskTypeRegistry + Handler 架构重构设计 2026-06-10 12:41:43 +08:00
cfdaily b00d43c8ac docs(#13): merge #19 context layers into #13, delete standalone #19
§19 上下文四层改造方案(原独立文档 #19)合并到 #13 工具链设计文档末尾。
v3.1 → v3.3。两个专题本就是一个整体,分开维护增加认知负担。
2026-06-10 12:41:43 +08:00
cfdaily fc9b66b905 docs(#08): update A13 revised - exit=0 always completed
CI / lint (pull_request) Failing after 9s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 4s
Merge old A12/A13 into single A13 revised: trust exit_code=0
regardless of stdout/JSON output. Old logic caused inform Mail
infinite retry loop.
2026-06-09 23:41:53 +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 a1a4d7c5a7 docs: #19 adopt simayi review suggestions (v1.1) 2026-06-09 23:41:53 +08:00
cfdaily 149921fb5f docs: add #19 toolchain context layers design
CI / lint (push) Successful in 7s
CI / test (push) Successful in 14s
CI / lint (pull_request) Successful in 7s
CI / notify-on-failure (push) Successful in 0s
CI / test (pull_request) Successful in 14s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-09 22:25:17 +08:00
cfdaily 89f105910e auto-sync: 2026-06-08 21:36:58
Deploy / ci (push) Failing after 6s
Deploy / deploy (push) Has been skipped
Deploy / notify-deploy-failure (push) Successful in 1s
2026-06-08 21:36:58 +08:00
cfdaily 6b8f5ba6e3 auto-sync: 2026-06-08 21:36:43
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 21:36:43 +08:00
cfdaily dbf24d2088 auto-sync: 2026-06-08 20:00:46
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 20:00:46 +08:00
cfdaily 4ff68ff70c auto-sync: 2026-06-08 18:32:04
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 18:32:04 +08:00
cfdaily 46142c86c1 auto-sync: 2026-06-08 18:30:41
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 18:30:41 +08:00
cfdaily 208c32d9cf auto-sync: 2026-06-08 12:55:14
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 12:55:14 +08:00
cfdaily 9161fb4ecd auto-sync: 2026-06-08 12:54:59
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 12:54:59 +08:00
cfdaily 510ac758cf auto-sync: 2026-06-08 12:53:37
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 12:53:37 +08:00
cfdaily 8e7361dbba auto-sync: 2026-06-08 12:49:11
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 12:49:11 +08:00
cfdaily b326608dd8 auto-sync: 2026-06-08 09:07:59
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 09:07:59 +08:00
cfdaily c0c9bf7dd2 auto-sync: 2026-06-08 09:07:48
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 09:07:48 +08:00
cfdaily 9e48340f3c auto-sync: 2026-06-08 09:07:33
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 09:07:33 +08:00
cfdaily b970184f3e auto-sync: 2026-06-08 08:54:47
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 08:54:47 +08:00
cfdaily ee132da056 auto-sync: 2026-06-08 08:54:22 (catch-all)
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 08:54:22 +08:00
cfdaily 4bea7573e8 auto-sync: 2026-06-08 08:54:18
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 08:54:18 +08:00
cfdaily e09bf36b74 auto-sync: 2026-06-08 00:03:30
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-08 00:03:30 +08:00
cfdaily a4581fef6c auto-sync: 2026-06-07 23:31:00
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 23:31:00 +08:00
cfdaily e1da581916 auto-sync: 2026-06-07 23:28:57
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 23:28:57 +08:00
cfdaily 88edeb3785 auto-sync: 2026-06-07 23:28:40
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 23:28:40 +08:00
cfdaily e7fa37afc5 auto-sync: 2026-06-07 23:01:29
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 23:01:29 +08:00
cfdaily a6e8480b1c auto-sync: 2026-06-07 20:52:35
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 20:52:35 +08:00
cfdaily e24bf26431 auto-sync: 2026-06-07 20:27:19 (catch-all)
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions
2026-06-07 20:27:19 +08:00