每日备份 2026-06-10 12:57:13

This commit is contained in:
root-backup committed 2026-06-10 12:57:14 +08:00
1 parent fda2ccb8c2
commit 3d2e638c6a
244 files changed
+58890 -3

No files matched your search

@@ -0,0 +1,213 @@
# Errors
Error logs and failure patterns for **skill-self-evolution-enhancer**.
**Categories**: timeout | context_overhead | missing_data | workflow_error
**Statuses**: pending | in_progress | resolved | wont_fix | promoted
## Status Definitions
| Status | Meaning |
|--------|---------|
| `pending` | Not yet addressed |
| `in_progress` | Actively being worked on |
| `resolved` | Issue fixed or workaround found |
| `wont_fix` | Decided not to address |
| `promoted` | Elevated to evolution rules |
## Error Entry Format
```markdown
## [ERR-YYYYMMDD-XXX] category
**Logged**: ISO-8601 timestamp
**Priority**: low | medium | high | critical
**Status**: pending
**Area**: 领域
### Summary
One-line description
### Details
Full context
### Root Cause
Likely cause if known
### Workaround
What was tried or could be tried
### Metadata
- Source: error_log | user_report | test
- Tags: tag1, tag2
- Recurrence-Count: 1
---
```
## [ERR-20260326-001] cron_timeout_context_overhead
**Logged**: 2026-03-26T04:14:00Z
**Priority**: high
**Status**: resolved
**Area**: cron任务调度
### Summary
cron agentTurn timeout设置120s但实际超时,原因是session上下文大(205k)导致agent处理慢
### Details
- 脚本 `evolution-report.sh` 本身执行仅需 4秒
- 但 cron agentTurn 报告超时 120028ms(连续3次)
- session 状态显示: `unknown/205k (?%)` 说明上下文很大
- 日志分析显示脚本实际在 4s 内完成
### Root Cause
timeoutSeconds 设置的是 cron job 的硬性超时,但 OpenClaw agent 处理大上下文时初始化+推理本身就耗时很长,与实际脚本执行时间无关
### Workaround
将 `timeoutSeconds` 从 120 降到 60(脚本只需4s,60s足够让agent初始化完成)
已对 `dbd84977`(GitHub进化猎手)和 `b0afa4db`(日志清理)应用修复
### Metadata
- Source: heartbeat_analysis
- Tags: cron, timeout, context-size, self-healing
- Recurrence-Count: 3
- See Also: HEARTBEAT.md
---
## [ERR-20260326-002] resource_guard_cpu_parsing_bug
**Logged**: 2026-03-26T09:25:00Z
**Priority**: high
**Status**: resolved
**Area**: 资源监控
### Summary
资源守卫脚本CPU解析bug:int($2)对"4.5"返回0,显示95%而非5%
### Details
- `top -bn1 | grep "Cpu(s)"` 输出: `4.5 us, 0.0 sy, 0.0 ni, 95.5 id`
- 脚本用 `awk '{print int($2)}'` 取字段2,得到 `4.5`,但 `int("4.5")` 在awk中返回 0
- 导致 CPU 显示为 idle 字段值(95%),实际是空闲95%,使用仅5%
### Root Cause
awk int()函数对含小数点的字符串处理有误,且脚本逻辑不对:应该用 idle 计算使用率,而非直接取us字段
### Workaround
修改为 `cpu_usage=$(top -bn1 | grep "Cpu(s)" | awk '{print int($8)}')` 然后 `cpu_usage=$((100 - cpu_usage))`
### Metadata
- Source: heartbeat_false_alarm
- Tags: monitoring, awk, parsing
- Recurrence-Count: 1
- File: /home/yh6788/.openclaw/scripts/resource-guard.sh
---
## [ERR-20260326-002] camoufox_browse_headless_crash
**Logged**: 2026-03-26T14:01:00Z
**Priority**: high
**Status**: resolved
**Area**: 浏览器自动化
### Summary
camoufox browse.py 硬编码 headless=False,在服务器上会卡住等待用户输入
### Details
- 原脚本最后有 input("Press Enter to close..."),headless模式下无法交互
- 原脚本没有 headless 参数选项
- camoufox 安装在 ~/.local/lib/python3.13/site-packages/,不在 venv 里
### Root Cause
脚本设计假设在有GUI环境运行,未考虑服务器无头模式
### Workaround
修复后的 browse.py:
1. 添加 --headless 参数
2. 无DISPLAY时自动启用headless
3. headless模式下跳过等待用户输入
4. 添加 USER_SITE 路径到 sys.path
### Metadata
- Source: self_discovery
- Tags: camoufox, headless, server
- Recurrence-Count: 1
- See Also: camoufox/scripts/browse.py
---
## [ERR-20260327-001] log_cleaner_timeout
**Logged**: 2026-03-27T18:35:00Z
**Priority**: high
**Status**: resolved
**Area**: cron任务调度
### Summary
日志清理脚本本身只需1.3秒,但cron timeout 60秒仍超时
### Root Cause
同GitHub进化猎手问题:agent初始化(含session加载、context初始化)耗时远超脚本执行时间
### Workaround
将timeout从60s降到30s,脚本仅需1.3s,30s足够agent初始化完成
### Metadata
- Source: heartbeat_check
- Tags: cron, timeout, agent-initialization
- Recurrence-Count: 2
- See Also: ERR-20260326-001
---
## [ERR-20260327-001] cron_timeout_agent_context_overhead_v2
**Logged**: 2026-03-27T03:05:00Z
**Priority**: high
**Status**: resolved
**Area**: cron任务调度
### Summary
降低cron timeout反而导致更多超时:agent加载205k上下文需要60-120s
### Details
- 脚本本身执行只需 1.2 秒
- 但 agent 加载 205k 上下文需要 60-120s
- 60s timeout: 持续超时
- 180s timeout: 足够agent初始化完成
### Root Cause
OpenClaw agentTurn timeout 指的是 agent 整个执行周期,不是脚本执行时间。agent 需要时间初始化大上下文 session。
### Workaround
对于简单脚本任务,timeout 应设置为 120-300s,保证 agent 有足够时间初始化后再执行脚本
### Metadata
- Source: heartbeat_analysis
- Tags: cron, timeout, context-size, agent-overhead
- Recurrence-Count: 2
- See Also: ERR-20260326-001
---
## 2026-03-27 日志清理超时问题
**问题**: log-cleaner.sh 连续2次 timeout(cron 设置 60s)
**根因**: 逐文件循环 `stat` + 条件判断,大目录极慢
**解决方案**: 改用 `find -mtime +N -print -delete` 批量操作,timeout 提升至 120s
**进化**: 脚本已优化,cron 已更新
## 日志清理脚本超时问题 (2026-03-27)
**问题**: 日志清理cron任务连续2次超时(timeout)
**根因**: 脚本扫描目录包含node_modules等大目录,导致1.5GB数据遍历超时
**解决方案**:
- 排除目录:node_modules、.cache、.npm、.pnpm-store、.git
- 聚焦日志目录:workspace/sleep-learning、logs、token-monitor/logs
- 不再扫描整个workspace和openclaw根目录
**验证**: 修复后执行耗时0秒,正常完成
@@ -0,0 +1,163 @@
# Learnings
Corrections, insights, and best practices for **skill-self-evolution-enhancer**.
**Categories**: correction | insight | knowledge_gap | best_practice
**Statuses**: pending | in_progress | resolved | wont_fix | promoted
## [LRN-20260326-001] insight
**Logged**: 2026-03-26T04:14:00Z
**Priority**: high
**Status**: resolved
**Area**: 自进化冷启动
### Summary
learnings文件初始为空时,需要从heartbeat/cron日志/执行输出中主动提取进化素材
### Details
skill自进化需要真实错误数据驱动,但冷启动时.learnings/是空白模板
解决方案:从系统日志(cron状态、资源使用)、执行输出(stderr/stdout)、用户反馈中主动提取
### Suggested Action
在HEARTBEAT.md中增加"每次心跳检查时提取一条可进化的错误/改进项"规则
### Metadata
- Source: heartbeat_automation_session
- Tags: cold-start, self-evolution, data-driven
- Recurrence-Count: 1
---
## [LRN-20260327-001] insight
**Logged**: 2026-03-27T08:04:00Z
**Priority**: medium
**Status**: resolved
**Area**: GitHub进化猎手-克隆超时
### Summary
GitHub进化猎手在心跳/cron环境中克隆大型仓库容易超时,需要优化分析策略
### Details
心跳/cron环境网络受限,克隆⭐49306的deer-flow和⭐20811的agentscope均超时失败
解决方案:改用web_fetch读取README+API分析结构,不依赖git clone
### Suggested Action
修改github-intel.sh,增加"克隆前先web_fetch README预览"逻辑,对⭐>20000项目改用API+README分析
### Metadata
- Source: github-intel-cron-20260327
- Tags: network-timeout, github-analysis, optimization
- Recurrence-Count: 1
---
## [LRN-20260327-002] insight
**Logged**: 2026-03-27T08:04:00Z
**Priority**: high
**Status**: in_progress
**Area**: 重大突破性项目发现
### Summary
本期发现2个⭐>20000的突破性项目,需要深度研究
### Details
发现两个突破性项目:
1. **bytedance/deer-flow** (⭐49306) - SuperAgent框架,集成sandbox/memories/tools/skill/subagents/message gateway
2. **agentscope-ai/agentscope** (⭐20811) - "Build and run agents you can see, understand and trust"
这两个项目代表了当前Agent架构的最新方向,值得深入研究代码结构
### Suggested Action
下次有充足时间时,手动克隆这两个项目分析代码结构
### Metadata
- Source: github-intel-cron-20260327
- Tags: breakthrough-project, deer-flow, agentscope, agent-framework
- Recurrence-Count: 1
---
## [LRN-20260327-004] best_practice
**Logged**: 2026-03-27T12:04:00Z
**Priority**: high
**Status**: resolved
**Area**: GitHub进化猎手-本期深度分析
### Summary
本期分析3个高价值项目:last30days-skill、superpowers、dexter
### Details
从 **mvanhorn/last30days-skill** (⭐11702) 学到:
1. **Open Claw原生适配**: 明确说明"Designed for Open Claw and similar always-on AI environments",提供open variant
2. **Watchlist + briefings模式**: SQLite持久化研究数据,支持自然语言查询历史,支持定时cron触发
3. **多信号并行 + 质量排序**: 10个平台并行搜索,双向文本相似度 + 参与度速度归一化
4. **Comparative Mode**: "X vs Y"模式并行3次研究 + 并排对比
从 **obra/superpowers** (⭐117412) 学到:
1. **Subagent驱动开发**: dispatching-parallel-agents + 两阶段review (spec compliance → code quality)
2. **Skills自动触发**: agent在执行任务前自动检查相关skills,无需手动调用
3. **brainstorming skill**: Socratic设计澄清,在写代码前先确认真正需求
4. **git-worktrees隔离**: 每个任务在独立branch的worktree执行,避免污染主分支
5. **skills库生态**: 测试/调试/协作/元技能分类,writing-skills指导创建新skill
从 **virattt/dexter** (⭐19354) 学到:
1. **自验证循环**: 执行任务后检查结果,迭代直到confidence足够
2. **Scratchpad调试日志**: 每个query生成JSONL文件,记录tool调用和LLM推理过程
3. **Task Planning自动分解**: 复杂query自动拆解为结构化研究步骤
4. **Loop Detection**: 内置循环检测和step limits防止无限执行
5. **WhatsApp Gateway**: 通过WhatsApp与agent交互
### Suggested Action
1. 考虑为OpenClaw skills增加watchlist/briefings持久化模式
2. 引入superpowers的"执行前先brainstorm"流程
3. 学习dexter的scratchpad日志机制用于调试
4. last30days-skill的"对比模式"可作为GitHub进化的分析模板
### Metadata
- Source: github-intel-cron-20260327-deep-analysis-2
- Tags: last30days-skill, superpowers, dexter, agent-framework
- Recurrence-Count: 1
---
## [LRN-20260327-003] best_practice
**Logged**: 2026-03-27T08:29:00Z
**Priority**: high
**Status**: resolved
**Area**: GitHub进化猎手-多源情报融合设计模式
### Summary
oh-my-claudecode的团队协作模式揭示了multi-agent编排的最佳实践
### Details
从oh-my-claudecode (⭐13148)学到:
1. **Team Pipeline架构**: team-plan → team-prd → team-exec → team-verify → team-fix 循环
2. **Deep Interview技能**: Socratic追问 + 数学模糊度门控 (ambiguity ≤ 20%才允许执行)
3. **tmux CLI Workers**: 真实终端窗口作为worker,支持多agent并行
4. **AGENTS.md规范**: 用guidance_schema_contract定义角色契约,operating_principles + delegation_rules
从last30days-skill (⭐11242)学到:
1. **多信号质量排序**: 8个平台并行搜索,双向文本相似度 + 参与度速度归一化 + 跨平台收敛检测
2. **Polymarket预测市场集成**: 用真钱 bets 作为信号源,比Reddit更可靠
3. **Per-project .env配置**: 项目级环境变量隔离
4. **自动归档**: 每次运行保存到 ~/Documents/ 构建个人研究库
从agentscope (⭐20827)学到:
1. **"可观测的Agent"理念**: Build and run agents you can see, understand and trust
2. **A2A协议支持**: Agent间标准通信协议
3. **VNC-powered GUI沙箱**: 运行时可视化调试
4. **OTel生产部署**: K8s + Docker内置支持
### Suggested Action
将team pipeline分阶段架构引入OpenClaw skill编排;考虑增加"模糊度门控"机制在执行危险操作前要求用户确认
### Metadata
- Source: github-intel-cron-20260327-deep-analysis
- Tags: multi-agent, orchestration, team-pipeline, skill-design
- Recurrence-Count: 1