feat(store): conversation 归档——trim 裁剪行落盘 conversation-archive.jsonl - #90
Merged
Conversation
…ve.jsonl - Bash/C/Go/Rust: trim 前把被裁剪的 conversation 行追加到 conversation-archive.jsonl - session init 时 touch 归档文件;SubAgent fork 时随 conversation/summary/plan 一并继承 - C transport: build_claude_request 跳过空物理行,与 Bash store_conv_get_messages 对齐 - Rust store_conv_total_lines 改为字节扫描计数;trim 重写避免大记录(>64KiB)被拆行 - 测试:bash e2e fork/compact 归档断言、C test-continue 9 例、Go 单测扩展
bash 版全套 e2e 约 4 分钟,server 在 120s 自杀导致后半段 10 个 mock 依赖测试连坐失败(device-write/x-app/golden/PlanConfirm/ SubAgent-fork-ctx/stats-speed 等)
lloydzhou
added a commit
that referenced
this pull request
Sep 10, 2026
Owner
Author
|
自审完成。
未发现需要阻塞合并的问题。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
compact 裁剪掉的 conversation 行不再丢弃,归档到
session_dir/conversation-archive.jsonl;SubAgent fork 继承归档文件。改动(Bash/C/Go/Rust 四版本同步)
conversation-archive.jsonlconversation.jsonl / summary / plan一并拷贝store_conv_trim_tail:trim 前把被裁剪行追加进归档(Bashhead -n $((total-keep)) >> archive)build_claude_request:跳过空物理行,与 Bashstore_conv_get_messages对齐(请求体一致性)store_conv_total_lines:改字节扫描计数;trim 重写避免 >64KiB 的 JSONL 记录被拆行测试
顺带修复
go/agent_test.go缺bytesimport(编译失败)tests/fixtures/mock_server.py存活 120s→600s:bash 版全套约 4 分钟,server 中途自杀导致后半段 10 个 mock 依赖测试连坐失败