chore: record journal

This commit is contained in:
qzl
2026-04-13 12:46:37 +08:00
parent a2f010251d
commit da947f9f08
2 changed files with 45 additions and 2 deletions
+3 -2
View File
@@ -8,7 +8,7 @@
<!-- @@@auto:current-status --> <!-- @@@auto:current-status -->
- **Active File**: `journal-1.md` - **Active File**: `journal-1.md`
- **Total Sessions**: 5 - **Total Sessions**: 6
- **Last Active**: 2026-04-13 - **Last Active**: 2026-04-13
<!-- @@@/auto:current-status --> <!-- @@@/auto:current-status -->
@@ -19,7 +19,7 @@
<!-- @@@auto:active-documents --> <!-- @@@auto:active-documents -->
| File | Lines | Status | | File | Lines | Status |
|------|-------|--------| |------|-------|--------|
| `journal-1.md` | ~276 | Active | | `journal-1.md` | ~318 | Active |
<!-- @@@/auto:active-documents --> <!-- @@@/auto:active-documents -->
--- ---
@@ -29,6 +29,7 @@
<!-- @@@auto:session-history --> <!-- @@@auto:session-history -->
| # | Date | Title | Commits | | # | Date | Title | Commits |
|---|------|-------|---------| |---|------|-------|---------|
| 6 | 2026-04-13 | 修复追问链路与上限判定 | - |
| 5 | 2026-04-13 | feat: 邀请码显示功能 - 后端API + 前端对接 | - | | 5 | 2026-04-13 | feat: 邀请码显示功能 - 后端API + 前端对接 | - |
| 4 | 2026-04-13 | 绑定积分重注册余额恢复提交 | `c55be6d` | | 4 | 2026-04-13 | 绑定积分重注册余额恢复提交 | `c55be6d` |
| 3 | 2026-04-13 | 积分重注册余额恢复验证 | - | | 3 | 2026-04-13 | 积分重注册余额恢复验证 | - |
+42
View File
@@ -259,6 +259,48 @@
**验证**: ruff check ✅ / flutter analyze ✅ **验证**: ruff check ✅ / flutter analyze ✅
### Git Commits
(No commits - planning session)
### Testing
- [OK] (Add test results)
### Status
[OK] **Completed**
### Next Steps
- None - task complete
## Session 6: 修复追问链路与上限判定
**Date**: 2026-04-13
**Task**: 修复追问链路与上限判定
### Summary
定位并修复 follow_up 上下文解析报错;将追问上限改为基于 assistant 回复数;补充单测与集成测试并通过。
### Main Changes
| 项目 | 说明 |
|------|------|
| 追问报错根因 | `worker-agent.log``AgentChatMessageMetadata` 校验失败,原因是历史 metadata 存在 snake_case 字段与 alias 契约不一致 |
| 结构修复 | `divination` 相关模型启用 `populate_by_name=True`,允许 snake_case/alias 一致解析;用户消息缓存写入统一 `by_alias=True` |
| 上限逻辑 | 会话运行上限由按 user 消息数改为按 assistant 消息数统计 |
| 回归测试 | 新增 `backend/tests/unit/test_runtime_context_messages.py` 覆盖 snake_case metadata 场景 |
| 集成测试 | 新增 `backend/tests/integration/test_follow_up_flow.py`,验证 chat->follow_up 成功、assistant=2 后再次 follow_up 返回 409 |
**验证结果**:
- `uv run ruff check`(相关文件)通过
- `uv run pytest backend/tests/unit/test_runtime_context_messages.py backend/tests/unit/test_runtime_models_worker_output.py backend/tests/unit/test_history_message_schema.py` 通过
- `./infra/scripts/app.sh restart` 后,`uv run pytest backend/tests/integration/test_follow_up_flow.py` 通过
### Git Commits ### Git Commits
(No commits - planning session) (No commits - planning session)