修复完整历史与运行态内存放大并重建发布包
This commit is contained in:
2
.trellis/tasks/10-14-history-memory-audit/check.jsonl
Normal file
2
.trellis/tasks/10-14-history-memory-audit/check.jsonl
Normal file
@@ -0,0 +1,2 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
{"file": ".trellis/spec/backend/session-history.md", "reason": "完整性与隔离回归"}
|
||||
@@ -0,0 +1,2 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
{"file": ".trellis/spec/backend/session-history.md", "reason": "完整历史、可信修订与并发契约"}
|
||||
7
.trellis/tasks/10-14-history-memory-audit/prd.md
Normal file
7
.trellis/tasks/10-14-history-memory-audit/prd.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# 完整历史内存修复
|
||||
|
||||
保留已保存完整历史,修复整份 JSON 解析、复制、序列化基线导致的内存峰值。
|
||||
采用分块存储和按页读取,迁移旧归档时避免全量读取;保留原子提交与可信并发合并。
|
||||
验证生产入口、旧归档迁移、清空删除、运行态恢复和大归档内存。测试目录必须隔离。
|
||||
|
||||
具体计划与发现见 .planning/2026-10-14-history-memory-fix/。
|
||||
36
.trellis/tasks/10-14-history-memory-audit/task.json
Normal file
36
.trellis/tasks/10-14-history-memory-audit/task.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"id": "history-memory-audit",
|
||||
"name": "history-memory-audit",
|
||||
"title": "修复完整历史归档内存回归",
|
||||
"description": "保留完整历史,使用不可变消息块、原子清单提交、分页读取和流式旧格式迁移,消除默认加载与保存的整份正文复制。",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "shiyue",
|
||||
"assignee": "shiyue",
|
||||
"createdAt": "2026-10-14",
|
||||
"completedAt": "2026-10-14",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
"lib/session-history-store.js",
|
||||
"lib/json-persistence.js",
|
||||
"server.js",
|
||||
"scripts/session-history-store-unit.js",
|
||||
"scripts/session-history-memory-unit.js",
|
||||
"scripts/history-runtime-completion-unit.js",
|
||||
"scripts/codexapp-retry-history-unit.js",
|
||||
"scripts/regression.js",
|
||||
".trellis/spec/backend/session-history.md"
|
||||
],
|
||||
"notes": "修复完成:34项完整历史持久化回归及完整隔离集成回归通过。70.5MiB合成旧归档在256MiB堆上限下流式迁移,RSS峰值145.9MiB;1128条消息经67页逐条摘要校验完整,6次尾部保存复用37个原始块,旧文件单次读取最多64KiB。语法与差异检查通过。未修改生产历史,未重启服务,运行进程尚未生效。",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user