cfdaily
3b9ad83405
fix(lint): F541 f-string 无占位符去掉 f 前缀
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 1s
2026-06-13 23:40:56 +08:00
cfdaily
c89863a288
feat: §17 ToolchainHandler 强约束实现(Step 1-4)
...
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 1s
Step 1: 基础设施
- prompt_composer.py: PromptContext 新增 action_type + action_steps 字段
- spawner.py: handler 路径提取 action_type/action_steps 传入 PromptContext
- db.py: comments CHECK 约束加入 action_report
Step 2: ToolchainHandler 强化
- ToolchainContextSection: 加 steps 渲染 + action_hint(按 action_type)
- ToolchainApiSection: 改为 action_report 提交指引 + Gitea 协作指引
- ToolchainConstraintsSection: 5 条强约束 + Red Flags 防self-rationalization
- verify_completion: action_report → output → comment 三层 fallback
- review_merged 始终通过(纯通知)
- infrastructure_failure 始终通过(防递归)
- 修复 LENGTH(content) → LENGTH(body) bug
- on_failure 三分路: 业务→Gitea PR comment / 系统→Gitea Issue / 基础设施→toolchain task
Step 3: toolchain_routes 改造
- 新增 _toolchain_db_path() + _send_toolchain_task()
- 所有 8 个 handler 改为 _send_toolchain_task
- _send_mail 保留但不再被 toolchain handler 调用
- _send_deploy_failure_mail → _send_deploy_failure_task
Step 4: 测试
- 29 个单元测试全部通过
- 全量 456 passed, 3 skipped, 0 failures
2026-06-13 23:36:44 +08:00
pangtong-fujunshi
90f4e3284c
Merge PR #64 : §17 toolchain/mail 完全分离——Gitea 为唯一协作媒介
2026-06-13 15:09:33 +00:00
cfdaily
946f7e1848
fix(design): §17 M1 §5.2 三分路展开 + M2 约束编号 #5 + S1/S2 一致性
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 23:08:50 +08:00
cfdaily
409e4ee51d
fix(design): §17 清理 3 处遗留 Mail 引用
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-13 23:04:30 +08:00
cfdaily
d1c0984082
refactor(design): §17 toolchain/mail 完全分离——Gitea 为唯一协作媒介
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 23:03:06 +08:00
pangtong-fujunshi
5be32bd0b8
Merge PR #63 : §17 ToolchainHandler 强约束设计
2026-06-13 14:10:19 +00:00
cfdaily
71bab93308
fix(design): §17 M1 verify_completion 列名 content→body(司马懿 Review)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-13 22:09:18 +08:00
cfdaily
023de9862f
feat(design): §17 ToolchainHandler 强约束设计(取代 action Mail 类型)
...
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
- 新增 17-toolchain-handler-enforcement.md 完整设计文档
- 标记 17-action-mail-type.md 为 SUPERSEDED
- 方向修正:让 toolchain 事件回归 ToolchainHandler(§14 已有架构)
2026-06-13 22:04:08 +08:00
pangtong-fujunshi
626e13c0d1
Merge PR #62 : feat(design): §17 action Mail 类型设计 v2.0
2026-06-13 13:37:58 +00:00
cfdaily
6a7fe37d93
fix(design): §17 Review 反馈修复(M1+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
2026-06-13 21:37:11 +08:00
cfdaily
5bc53192d6
feat(design): §17 action Mail 类型设计 v2.0
...
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
新增 action Mail 类型(inform/request/action 三分),解决工具链事件
被 inform 语义导致流程断链的问题。
核心设计:
- 五层 Prompt 架构(L0 语义层 → L4 约束层)
- 10 个场景完整提示词设计(8 action + 1 inform + 1 补充)
- Steps API 调用级别,信息层与指令层严格分离
- 两个维度完整性验证(Webhook event × 流程流转)
- 防降级三层设计(语义层 + 结构层 + Red Flag 表)
- action_report comment 验证机制
参考优秀实践:Hermes Tool-Use Enforcement、Superpowers Red Flags、
moziplus L1/L2/L3 三层上下文模型
2026-06-13 21:30:35 +08:00
pangtong-fujunshi
2c2d8b55c9
Merge PR #61 : fix(docs): 文件路径引用修正
2026-06-13 06:46:52 +00:00
cfdaily
cb81251111
fix(docs): 24-compact-detection-fix → 15-compact-detection-fix 路径引用修正
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 14:45:34 +08:00
pangtong-fujunshi
a8a7164335
Merge PR #60 : fix synchronize dispatch
2026-06-13 06:44:07 +00:00
cfdaily
fe7f914681
fix: _handle_pull_request 补充 synchronize action dispatch
...
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
姜维排查发现 _handle_pull_request 只处理 opened/closed,
Gitea 发 pull_request + action=synchronize 时被静默丢弃。
_handle_pr_synchronize 已存在但未被 dispatch 到。
修复:加 elif action == synchronize dispatch。
pull_request_sync 注册保留作为双保险。
2026-06-13 14:42:38 +08:00
cfdaily
eccb4d2723
docs: 设计文档编号重排(20→14, 24→15) + 已完成文档状态标注更新
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-13 10:12:39 +08:00
pangtong-fujunshi
9e2145171a
Merge PR #57
2026-06-13 01:36:24 +00:00
cfdaily
67cad2dd96
fix: _REASON_MAP 补 agent_error 条目(G2)
...
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
spawner 会产生 agent_error reason,之前缺映射走到 _default 显示'未知原因'。
2026-06-13 09:35:15 +08:00
pangtong-fujunshi
79da0bd07e
Merge PR #56
2026-06-13 01:34:39 +00:00
cfdaily
a116f7e6c0
fix: 注释拼写 must_hives → must_haves
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
2026-06-13 09:33:59 +08:00
cfdaily
7fb4d988ec
fix: lint 修复 + api_error 测试更新
...
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 8s
CI / notify-on-failure (pull_request) Successful in 0s
- mail_notify: f-string 反斜杠修复、行过长修复、unused import
- test_classify_outcome: api_error should_retry 改 True
2026-06-13 09:29:52 +08:00
cfdaily
f4dd9ff78d
feat(daemon): Mail 失败通知 v2.0 — api_error retry + 通知增强
...
CI / lint (pull_request) Failing after 7s
CI / test (pull_request) Has been skipped
CI / notify-on-failure (pull_request) Successful in 1s
P1: api_error rate_limit/500/503 改为可恢复 retry(should_retry=True,60s cooldown)
P2: 通知模板动态化(reason 人话翻译 + detail 信息 + 重试情况 + AI Native 知识库)
设计文档:§20.7 (20-task-type-architecture.md)
2026-06-13 09:27:17 +08:00
pangtong-fujunshi
6520e78c0b
Merge PR #55
2026-06-13 01:23:33 +00:00
cfdaily
0169823b72
chore(docs): 合并 mail-failure-notification 到 §20,更新设计方案
...
CI / lint (pull_request) Successful in 6s
CI / test (pull_request) Successful in 9s
CI / notify-on-failure (pull_request) Successful in 0s
- mail-failure-notification.md → archive-3.0/
- §20 新增 §20 Mail 失败通知机制(v2.0 AI Native)
- 失败场景与重试耗时完整表
- reason 人话翻译映射
- 通知模板增强(detail 传入 + 重试情况)
- api_error rate_limit 待改为可恢复 retry
- §18→§21,§19→§22 编号顺延
2026-06-13 09:22:32 +08:00
pangtong-fujunshi
77252c39c6
Merge PR #54
2026-06-13 00:59:11 +00:00
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