chat/rollback with null contentId truncates history at the first idless message
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Start with rollback-chat in src/eca/features/chat.clj and trace how it handles the supplied contentId; the report identifies null matching the first idless message. Check the compaction marker and summary creation in src/eca/shared.clj, then reproduce with the synthetic history fixture and JSON-RPC request described here. Done means a missing, null, or unknown target is rejected before history or files change, with regression coverage for the reported rollback cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Measured with ECA 0.167.0 over JSON-RPC: chat/rollback accepts contentId: null and discards history starting at the first message without a content ID. A seven-message fixture with ordinary idless assistant text retained only the first user message, including after server restart.
With include: ["messages", "tools"] and rollback records present, the same request also reverted file changes after that point. This was measured with synthetic records, not live edit-tool calls. Normal persistence strips those records, so this does not establish file reversal after a server restart; that risk concerns records still held in a live session.
To Reproduce
Use a disposable workspace and cache; this request destroys history.
- Prepare a chat containing an ID-bearing user message, an idless assistant answer, an idless compaction marker/summary, and subsequent turns. A synthetic stored-history fixture suffices; no model request is needed.
- Send:
{"jsonrpc":"2.0","id":1,"method":"chat/rollback","params":{"chatId":"<fixture-chat>","contentId":null,"include":["messages"]}} - Read
chat/history, restart the isolated server, and reopen the chat. - Only the first user message remains. The request returned
{}rather than an error.
Measured UI trigger on eca-emacs master b353d444dca3e1f54c6c724a20eda372ee5443d7: render the isolated server's history containing a seeded compaction summary, expand the summary, and activate its rollback action with RET. The client still offers rollback without a message ID. Its actual request params were:
{"chatId":"<fixture-chat>","contentId":null,"include":["messages"]}
Choosing messages and tool changes instead emitted "include":["messages","tools"], also with a null target. Forwarding each captured request unchanged to ECA 0.167.0 retained only the first user message, including after restart. This used batch Emacs and a source-shaped seeded summary, not live /compact or a GUI mouse click.
Expected behavior
Reject a missing, null, or unknown rollback target before changing history or files. Clients should not offer rollback on blocks without a valid target ID.
Doctor
eca --version: eca 0.167.0; macOS, headless stdio client. No provider or model was involved. /doctor was not collected.
Additional context
Source-inferred cause, still present at ECA master 065e77319960b96ee96f7d86d86d4d0cd95257a1:
rollback-chatusestake-while/drop-whilecomparing each message's:content-idto the supplied ID, without validating the target first. Null therefore matches the first idless message, not the selected summary.- Compaction appends a marker and user-role summary without IDs.
- eca-emacs user-text rendering offers rollback without a nil-ID guard.
Related: eca-emacs #136, “Rollback chat to before this message stays after compact.” That report concerns the available action; these results establish the destructive server behavior of a null target.
- Ngôn ngữ chính
- Clojure
- Star
- 1k
- Fork
- 82
- Merge trung bình
- 2 ngày
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của editor-code-assistant/eca
-
Models doesn't work when fetchModels: false is usedCó thể đã có người làm @zikajk đã nhận 6 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
editor-code-assistant/eca#661 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
editor-code-assistant/eca#671 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
editor-code-assistant/eca#670 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Anthropic API-key requests fail with "credit balance is too low"Có thể đã có người làm @stamdrovas đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
editor-code-assistant/eca#666 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
docs page illustrationĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
editor-code-assistant/eca#664 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của editor-code-assistant/eca
Issue tương tự
-
.Needs Triage Administration/People Priority:P2 Type:Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
metabase/metabase#85503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: Editing the L value in HSL mode resets H and S to 0Có thể đã có người làm @makesomethingshit đã nhận 1 ngày trước. Đang mởneeds triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
pgwire tokens-reqd
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
software-mansion/starknet-jvm#641 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
nrepl/piggieback#163 ·