This repository has been archived on 2026-08-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw/agents/haonan/workspace/memory/2026-02-27.md
T

55 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-02-27 知识库 Bug 排查
## 问题描述
用户报告:knowledge-base 代理爬取了错误的知乎文章
- 提供的 URL ID: 1925232264591156410
- 实际爬取的 URL ID: 1894054073625461813
## 根因定位
问题出在 `zhihu_article_crawler.py` 脚本中:
```python
# 问题代码
if "ZHIHU_SPECIFIED_ID_LIST" not in config_content or "[]" in config_content:
# 只在配置为空时更新
new_config = config_content.replace(...)
```
MediaCrawler 配置文件 `~/work/MediaCrawler/config/zhihu_config.py` 中保存了旧 ID:
```python
ZHIHU_SPECIFIED_ID_LIST = [
"https://zhuanlan.zhihu.com/p/1894054073625461813",
]
```
由于条件判断问题,新 URL 没有被更新进去,导致每次都爬取旧的 ID。
## 待修复
- 修改 `zhihu_article_crawler.py`,强制每次更新配置中的 ID 列表
## 2026-02-27 后续
### 修复并提交 (20:20)
- 修复 `zhihu_article_crawler.py`,强制更新 MediaCrawler 配置
- 提交到 kb-skills 仓库 (commit 727cfc1)
### Git 仓库迁移失误 (20:42)
- 错误:将 knowledge-base 仓库从根目录移到 archive/
- 错误:使用 `git push --force` 推送到远端,**导致远端历史丢失**
- 失误:删除了 .gitea 目录(包含 CI 配置)
- 后果:远端仓库 commit 历史全部丢失,只能看到最后一个 commit
### MEMORY.md 更新
- 添加规则:严禁使用 `git push --force`(2026-02-27 新增)
### 知识库 CI 部署 (22:33)
- 新建 `.gitea/workflows/deploy.yml`
- 触发条件:main 分支推送
- 部署目标:micecola.top:/www/wwwroot/kb-web-test/zhangqing
- 认证方式:待解决(SSH 密钥问题)
- 用户名:kb_admin
### 待解决
- Gitea runner 没有 SSH 密钥,无法部署
- 需要蒋先生在 Gitea 后台配置 runner 的 SSH 密钥