🔥 Hermes OpenAgent Dashboard

📋 任务 #t_a6176f7b: e2e scenario 4: fix novel-app find_characters_in_text substring bug

📦 所属项目: novel-app

🌳 omo 派了哪些助手 (1 次执行)

这里显示 omo 执行任务时的详细记录。如果任务复杂, omo 会派助手分工合作; 简单任务则自己搞定。

🤖 omo 正在做什么 (实时)

这是 omo (AI 助手) 当前正在执行的步骤。它会自动切换: 先看代码 → 写方案 → 改代码 → 跑测试 → 完成。

正在连接实时推送…

📜 omo 干了哪些事 (按时间)

按时间顺序显示 omo 完成的所有步骤。每个阶段都有详细说明, 可以看到它做了什么、改了哪些文件。

📤 执行结果

omo 完成任务后留下的产出物: 总结、文档、代码提交等。

📋 任务基本信息

任务的基本属性: 状态、负责人、优先级等。

状态: done

负责人: omo-pm

优先级: N/A

工作目录: /home/yi/.hermes/kanban/workspaces/t_a6176f7b

创建时间: 2026-08-17 18:43:18

开始时间: 2026-08-17 18:44:09 (17h ago)

完成时间: 2026-08-17 19:05:08 (16h ago)

📝 任务描述

任务的详细说明, 描述要做什么。
# 修 novel-app character_repo.find_characters_in_text 子串匹配假阳性

## 必读
- `~/novel-workspace/novel-app/repositories/character_repo.py` (line 75-83, `find_characters_in_text`)

## 当前 bug
`find_characters_in_text(db, novel_id, text)` 用 Python `in` 子串匹配判断角色是否在文本里:

```python
return [c for c in characters if c["name"] and c["name"] in text]
```

问题: 如果角色 A 叫 "林", 角色 B 叫 "林尘", 文本含 "林尘", 两个角色都会被返回,
但 "林" 其实只是 "林尘" 的 substring, 不是独立出现的角色名. 这会导致
`chapter_writer.build_chapter_context` 把不相关角色注入 prompt, 浪费 tok

📅 这个任务的全部记录 (22 条)

任务生命周期中发生的所有事件, 按时间倒序排列。
2026-08-17 18:43:18 - 📌 任务创建
{"assignee": "omo-pm", "status": "ready", "parents": [], "tenant": null, "workspace_kind": "scratch", "workspace_path": null, "branch_name": null, "project_id": null, "skills": null, "goal_mode": null, "model_override": null, "provider_override": null}
2026-08-17 18:44:09 - claimed
{"lock": "abeemax395:2962286", "expires": 1786964349, "run_id": 55}
2026-08-17 18:44:09 - spawned
{"pid": 2998350}
2026-08-17 18:44:10 - heartbeat
2026-08-17 18:45:13 - heartbeat
2026-08-17 18:46:17 - heartbeat
2026-08-17 18:47:24 - heartbeat
2026-08-17 18:48:26 - heartbeat
2026-08-17 18:49:34 - heartbeat
2026-08-17 18:50:38 - heartbeat
2026-08-17 18:51:41 - heartbeat
2026-08-17 18:52:45 - heartbeat
2026-08-17 18:53:54 - heartbeat
2026-08-17 18:54:54 - heartbeat
2026-08-17 18:56:03 - heartbeat
2026-08-17 18:57:03 - heartbeat
2026-08-17 18:58:03 - heartbeat
2026-08-17 18:59:03 - heartbeat
2026-08-17 19:00:54 - commented
{"author": "dashboard", "len": 406}
2026-08-17 19:04:13 - heartbeat
2026-08-17 19:05:01 - commented
{"author": "omo-pm", "len": 1525}
2026-08-17 19:05:08 - ✅ 执行完成
{"result_len": 0, "summary": null}

💬 评论 (3 条)

关于这个任务的讨论和备注。
dashboard - 2026-08-17 19:00:54
E2E test note from t_87b64bf3: dispatch pipeline (dashboard → kanban → omo-pm claim/spawn/heartbeat) verified working. However omo-pm fork opencode CLI stuck on ProviderModelNotFoundError for litellm-local/coding — env var OPENCODE_CONFIG_DIR not propagated. See ~/novel-workspace/docs/hermes-dashboard-e2e-test.md §4.5 for full diagnostic trace. Fix belongs to hermes-omo-pm profile config, not dashboard.
omo-pm - 2026-08-17 19:05:01
omo Sisyphus 完成. **改动文件**: - modified: repositories/character_repo.py (+16 / -2) - new: tests/test_character_repo.py (4 cases) **策略**: length-descending + consume-on-match. Sort characters by name length descending. On match, replace consumed name with \\x00 in working text copy so shorter names cannot match inside already-claimed spans. \\x00 (not '') to avoid accidental adjacency-concatenation across consumed spans. **pytest -v 最终 5 行**: ``` tests/test_character_repo.py::test_find_characters_in_text_none PASSED [ 25%] tests/test_character_repo.py::test_find_characters_in_text_empty PASSED [ 50%] tests/test_character_repo.py::test_find_characters_in_text_substring_does_not_match_longer PASSED [ 75%] tests/test_character_repo.py::test_find_characters_in_text_short_name_does_not_match_when_longer_one_present PASSED [100%] ============================== 4 passed in 0.04s =============================== ``` **其他 gates**: - novel.db sha256 unchanged - novel.db 未被修改 (测试用 tempfile) - git diff --stat 只显示 repositories/character_repo.py 改动 - 未启动 8091 服务, 未改 chapter_writer.py / llm.py / deconstruct.py / routes/ - pytest 安装到 /home/yi/.hermes/hermes-agent/venv/ (之前缺失) **附注 (operator mid-run note)**: E2E test 验证 dashboard → kanban → omo-pm claim/spawn/heartbeat 链路 work, 但 opencode CLI fork 时 ProviderModelNotFoundError: litellm-local/coding. 修复: 必须传 OPENCODE_CONFIG_DIR=/home/yi/.config/opencode (CLI 默认不加载 ~/.config/opencode/, 只加载 profile dir 的 empty stub). 修属于 hermes-omo-pm profile config, 不在 dashboard 范围.
dashboard-migrate - 2026-08-17 20:36:42
🔗 linked to project: novel-app

🔄 执行记录 (1 次)

omo 执行这个任务的历史记录, 包括每次执行的进程号、状态和结果。
执行 ID 执行者 状态 进程号 开始时间 结束时间 结果
55 omo-pm done N/A 2026-08-17 18:44:09 2026-08-17 19:05:08 completed

📎 附件 (0 个)

任务相关的文件附件。

暂无附件

← 返回任务列表

⚙️ Running Processes

Loading…