Commit Graph

1807 Commits

Author SHA1 Message Date
cfdaily 5a80d6c5cd chore(docs): gateway-watchdog.md 改编号 99
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-13 08:58:04 +08:00
pangtong-fujunshi 322263585d Merge PR #53 2026-06-13 00:54:39 +00:00
cfdaily c7b4b262b1 chore(docs): 归档 §13-sim §18 §21 §25 至 archive-3.0
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
- 13-toolchain-and-dev-workflow-simulation.md → archive-3.0/(模拟报告,§16 已覆盖)
- 18-toolchain-e2e-test.md → archive-3.0/(E2E 测试记录,§13 已引用)
- 21-e2e-verification-handler.md → archive-3.0/(Handler 验证,§20 §19 已覆盖)
- 25-gitea-mention-toolchain.md → archive-3.0/(@mention 集成,§13 §16 已覆盖)
2026-06-13 08:53:23 +08:00
pangtong-fujunshi e43d87f3db Merge PR #52 2026-06-13 00:53:09 +00:00
cfdaily b07e311921 chore(docs): 归档 §22 §23 至 archive-3.0,§13 追加 §7.6
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
- 22-cd-production.md → archive-3.0/(部署成功通知草案)
- 23-toolchain-pr-lifecycle.md → archive-3.0/(PR 全生命周期,已由 §13 §16 覆盖)
- §13 §7 新增 §7.6 部署成功通知(草案引用)
2026-06-13 08:51:35 +08:00
pangtong-fujunshi 6ca9b19876 Merge PR #51 2026-06-13 00:50:36 +00:00
cfdaily 98eb15125d chore(docs): 归档 §20 审查文档至 archive-3.0,追加审查历史
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
- review-v3-vs-head-pangtong.md → archive-3.0/
- review-v3-vs-head-simayi.md → archive-3.0/
- step5-audit-report.md → archive-3.0/
- step5-impact-analysis.md → archive-3.0/
- §20 新增 §19 审查与验证历史(关键发现+修复状态汇总)
2026-06-13 08:49:41 +08:00
pangtong-fujunshi a01bedb193 Merge PR #50 2026-06-13 00:35:50 +00:00
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
pangtong-fujunshi 2567ace2bd Merge pull request 'chore(spawner): G1 修正注释 — 只检测 precheck' (#49) from chore/g1-comment-fix into main 2026-06-12 23:11:00 +00:00
cfdaily 8956296b08 chore(spawner): G1 修正注释 — 只检测 precheck
CI / lint (pull_request) Successful in 9s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-13 07:04:44 +08:00
pangtong-fujunshi ac3419b284 Merge PR #48 2026-06-12 23:03:12 +00: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 36ba629b69 fix(spawner): compact 检测 v5 — gateway log 开始标记 + jsonl 结束标记配对
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
- 新增 _find_compact_start_in_gateway_log: 检测 overflow/timeout/precheck 三种开始标记
- 新增 _check_compaction_finished_in_jsonl: 检测 jsonl compaction entry 作为结束标记
- 重写 _check_session_state compact 检测逻辑: 开始+结束配对
- 无开始标记 (threshold/manual) 不阻塞,靠 counter+lock+status 保护
- 超时兜底 15 分钟保留
- 旧方法标记 deprecated 保留
- 427 passed
2026-06-13 00:27:39 +08:00
pangtong-fujunshi 3b7ecaf446 Merge pull request 'fix(toolchain): is_pr detection check value not key' (#47) from fix/is-pr-detection into main 2026-06-12 13:15:58 +00:00
cfdaily a8a1886f27 fix(toolchain): is_pr detection - check value not key existence
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
Gitea Issue API returns pull_request: null for pure Issues (key exists but
value is None). 'pull_request' in issue was always True, causing all Issue
@mention mails to show 'PR #N' instead of 'Issue #N'.

Fix: issue.get('pull_request') is not None
2026-06-12 20:26:02 +08:00
pangtong-fujunshi c7aca6fc72 Merge pull request 'docs: sync §25 design doc help_keywords with actual code' (#46) from docs/25-sync-help-keywords into main 2026-06-12 11:09:53 +00: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
pangtong-fujunshi 88a2409e67 Merge PR #45 2026-06-12 11:08:50 +00:00
cfdaily e7f28cd36e fix(mention): address PR #45 review feedback (M1-M3, S1-S3)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
M1: Remove '帮忙' from help_keywords to fix keyword priority bug
M3: Add unit tests for mention_utils (§25.7)
S1: Merge two 'if action == opened' blocks in _handle_issues
S2: Extract _send_review_mentions helper to deduplicate @mention code
S3: Remove redundant 'import re' inside conditional block
2026-06-12 18:56:54 +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
pangtong-fujunshi 866060e557 Merge PR #44 2026-06-12 10:54:25 +00:00
cfdaily 33c58a7dae fix(auto-deploy): address PR #44 review feedback (M1, M2)
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
M1: Replace nohup with asyncio.sleep - preserves subprocess output/error detection
M2: Use PM2_HOME env check + regex matching instead of fragile string match
S1: pm2_name now has clear purpose for M2's regex-based self-restart detection

405 passed, 3 skipped.
2026-06-12 15:07:43 +08:00
cfdaily d82d29fd79 fix(auto-deploy): prevent self-kill when pm2 restart runs inside webhook handler
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
post_deploy commands that restart the current process (pm2 restart {pm2_name})
now use nohup+sleep to defer execution, allowing the webhook handler to
return normally before the restart happens.

Fix by jiangwei-infra, synced from install dir.
2026-06-12 15:05:06 +08:00
pangtong-fujunshi 0e19ea2009 Merge PR #43 2026-06-12 05:58:43 +00: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
pangtong-fujunshi 5474d0a0e8 Merge PR #42 2026-06-12 05:03:45 +00:00
cfdaily d0e0055a2e fix: review_result 模板加合并提醒
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 10s
CI / notify-on-failure (pull_request) Successful in 1s
Review 通过后模板末尾增加合并提示,防止遗漏合并步骤。
配合 AGENTS.md 流程规则 #6 双保险。
2026-06-12 13:02:46 +08:00
pangtong-fujunshi 9727bf98d9 Merge PR #39: docs: §13/§18/§23 更新 synchronize fallback + merge 通知 2026-06-12 04:53:23 +00: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
pangtong-fujunshi f4fc941bd1 Merge pull request 'fix(toolchain): 注册 pull_request_sync + pull_request_comment event type' (#41) from fix/toolchain-event-type-registration into main 2026-06-12 02:18:04 +00:00
cfdaily c6a0567161 fix(toolchain): 注册 pull_request_sync 和 pull_request_comment event type
CI / lint (pull_request) Successful in 8s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
Gitea 对 PR branch push 发的是独立事件类型 pull_request_sync,
不是 pull_request + action=synchronize。
同时补注册 pull_request_comment(review comment)。
删除 _handle_pull_request 中永远不会触发的 synchronize 分支。
2026-06-12 10:11:49 +08:00
pangtong-fujunshi 3f5b3619c8 Merge pull request 'fix(toolchain): synchronize fallback + merge 通知' (#38) from fix/toolchain-synchronize-fallback-and-merge-notify into main 2026-06-12 00:27:42 +00:00
cfdaily e9bbcf41c9 fix(toolchain): 模板双花括号→单花括号 (仲达 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 08:26:42 +08:00
cfdaily 2c612baa04 fix(toolchain): synchronize fallback + merge 通知 2026-06-12 08:26:42 +08:00
pangtong-fujunshi 98d17292b0 Merge PR #37: §24 v4 compact检测 2026-06-11 16:06:19 +00:00
cfdaily fe541f6c89 fix(spawner): §24 v4 仲达review M1(双staticmethod) + S1(TC11)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-12 00:04:10 +08:00
cfdaily ddc1c7285a fix(lint): remove unused timedelta import
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 10s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-12 00:00:18 +08:00
cfdaily 3f71f53e4a fix(spawner): §24 v4 修正注释缩进 + 仲达评审 M1 数据修正 + S2 证据补充
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 1s
2026-06-11 23:58:29 +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
pangtong-fujunshi 95a8abca96 Merge PR #36: §24 compact detection via gateway log rotation events 2026-06-11 13:47:55 +00: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 caf750fad6 fix(spawner): §24 compact check must run when status=done (compact in progress)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-11 21:18:33 +08:00
cfdaily 7918b12ff7 feat(spawner): §24 compact detection via gateway log rotation events 2026-06-11 21:18:33 +08:00
admin 3441f4325f Merge PR #35: §23 PR 全生命周期通知 2026-06-11 06:10:44 +00: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