修复完整历史与运行态内存放大并重建发布包
This commit is contained in:
2
.trellis/tasks/10-11-remove-compact-followup/check.jsonl
Normal file
2
.trellis/tasks/10-11-remove-compact-followup/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/index.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/index.md", "reason": "遵守后端规范,仅修改提示文案"}
|
||||
18
.trellis/tasks/10-11-remove-compact-followup/prd.md
Normal file
18
.trellis/tasks/10-11-remove-compact-followup/prd.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# 删除多余会话提示
|
||||
|
||||
用户明确要求去掉“下次继续在同一会话发送即可。”这句话。
|
||||
|
||||
## 修改范围
|
||||
|
||||
仅修改 `server.js` 中 `compactDoneMessage` 的 Codex App、Codex、Claude Code 三个返回值,去掉该句及前面的逗号,并以句号结束原生 `/compact` 完成说明。
|
||||
|
||||
## 完成条件
|
||||
|
||||
- 三种引擎均不再输出该句。
|
||||
- 保留各引擎原有的压缩完成说明。
|
||||
- `node --check server.js` 通过,代码差异仅包含三处文案修改。
|
||||
- 不增加测试文件,不重启当前服务。
|
||||
|
||||
## 规范判断
|
||||
|
||||
此次仅调整提示文案,没有新增架构或实现约定,无需更新规范。
|
||||
26
.trellis/tasks/10-11-remove-compact-followup/task.json
Normal file
26
.trellis/tasks/10-11-remove-compact-followup/task.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "remove-compact-followup",
|
||||
"name": "remove-compact-followup",
|
||||
"title": "删除压缩完成提示中的多余句子",
|
||||
"description": "",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "shiyue",
|
||||
"assignee": "shiyue",
|
||||
"createdAt": "2026-10-11",
|
||||
"completedAt": "2026-10-11",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "已删除三种引擎压缩完成提示中的多余句子;语法检查、差异检查和独立审查通过。",
|
||||
"meta": {}
|
||||
}
|
||||
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": {}
|
||||
}
|
||||
36
.trellis/tasks/10-14-runtime-json-memory-fix/task.json
Normal file
36
.trellis/tasks/10-14-runtime-json-memory-fix/task.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"id": "runtime-json-memory-fix",
|
||||
"name": "runtime-json-memory-fix",
|
||||
"title": "补齐完整运行态流式JSON持久化与单次任务状态提交",
|
||||
"description": "参考另一实例的修复,将完整运行态改为64KiB流式读写,取消序列化克隆与等值比较,归档提交内部保护更新的任务状态;保留已完成的历史分块存储和分页读取。",
|
||||
"status": "completed",
|
||||
"dev_type": "backend",
|
||||
"scope": "persistence",
|
||||
"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/json-persistence.js",
|
||||
"lib/session-history-store.js",
|
||||
"server.js",
|
||||
"scripts/json-persistence-unit.js",
|
||||
"scripts/runtime-state-memory-unit.js",
|
||||
"scripts/session-history-store-unit.js",
|
||||
"scripts/regression.js",
|
||||
".trellis/spec/backend/session-history.md",
|
||||
".trellis/spec/backend/quality-guidelines.md"
|
||||
],
|
||||
"notes": "完整隔离集成回归、JSON10项、持久化38项通过。80MiB旧v1运行态在256MiB堆参数下RSS峰值210.5MiB,单次读写64KiB,正文摘要完整、write/fsync/rename失败保留旧档。未修改生产历史,未重启服务。",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user