AskaEth
6b2b07cbef
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
feat(runtime): document 内容类型与持久化(design/24 S2)
- model 新增 ContentTypeDocument + Content 的四字段 + DocumentMessage 构造器 +
ValidateDocumentParts(文档部件只允许 RoleUser,非 user ⇒ ErrDocumentOnNonUser,fail-loud)。
- 两个编码器入口(buildMessages / buildAnthropicMessages)对文档部件报 ErrBadRequest:
本期 document 永不抵达编码器,且绝不静默丢块。
- history:拆出 types.go(Message 增 Document 列),新增 document.go(DocumentRef 同时是
落库 JSON 与 DTO 形状,6 字段含 status ⇒ §4.4 的「读不到要可见」;坏列回 unreadable 不静默)。
- chat_messages 加 document 列(迁移 0015 + NewStore 幂等前滚);historyMessage.Document DTO;
session_persist 的 messageTextImage → messageTextImageDocument(保留窄视图以免牵连 steer 配对)。
- 只落「引用 + 统计」,绝不落抽取正文(TestPersistedDocumentHoldsNoBody 把全部列拼起来扫正文)。
验收(主会话独立复跑,非自报):隔离 worktree(HEAD + 本切片)go build/vet 绿、
全树 58 包 0 FAIL、linux/amd64 + darwin/arm64 交叉编译绿、18 条 Document* 测试 PASS。
变异独立复现:ValidateDocumentParts 开头 return nil ⇒ 非 user 负例红。
2026-10-04 17:07:24 +08:00
..
2026-10-04 12:30:16 +08:00
2026-10-04 12:30:16 +08:00
2026-10-04 14:21:41 +08:00
2026-10-04 13:42:37 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:00:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 12:43:04 +08:00
2026-10-04 12:43:04 +08:00
2026-10-04 12:43:04 +08:00
2026-10-04 12:43:04 +08:00
2026-10-04 13:06:54 +08:00
2026-10-04 13:06:54 +08:00
2026-10-04 10:46:51 +08:00
2026-10-04 13:07:52 +08:00
2026-10-04 14:21:41 +08:00
2026-10-04 14:21:41 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:21:41 +08:00
2026-10-04 12:30:16 +08:00
2026-10-04 14:21:41 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 13:42:37 +08:00
2026-10-04 14:21:41 +08:00
2026-10-04 13:06:54 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 13:07:52 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 12:07:51 +08:00
2026-10-04 13:07:52 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:21:41 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:21:41 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-04 14:37:37 +08:00
2026-10-04 14:37:37 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 17:07:20 +08:00
2026-10-04 17:07:20 +08:00
2026-10-04 14:37:37 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 10:37:22 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 17:07:24 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-04 14:13:27 +08:00
2026-10-04 14:13:27 +08:00
2026-10-04 17:07:24 +08:00
2026-10-04 14:21:52 +08:00
2026-10-04 14:21:52 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 13:58:03 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 13:58:03 +08:00
2026-10-04 13:58:03 +08:00
2026-10-04 13:58:03 +08:00
2026-10-04 13:58:03 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:21:41 +08:00
2026-10-04 16:27:35 +08:00
2026-10-04 16:27:35 +08:00
2026-10-04 17:07:20 +08:00
2026-10-03 22:07:56 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:53:40 +08:00
2026-10-04 14:21:52 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:53:40 +08:00
2026-10-04 17:07:24 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-04 14:53:40 +08:00
2026-10-04 14:53:40 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 14:17:58 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:10:33 +08:00
2026-10-03 22:28:25 +08:00
2026-10-04 12:07:46 +08:00
2026-10-04 14:53:40 +08:00
2026-10-04 12:10:21 +08:00
2026-10-03 22:07:56 +08:00
2026-10-03 22:10:33 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-03 22:28:25 +08:00
2026-10-03 22:07:56 +08:00
2026-10-04 14:37:37 +08:00
2026-10-03 22:10:33 +08:00
2026-10-03 22:10:33 +08:00
2026-10-04 14:25:13 +08:00
2026-10-04 14:25:13 +08:00
2026-10-04 11:26:35 +08:00