Empty paragraphs make room projection non-canonical, failing document descriptions
Maintainer thường phản hồi trong vòng 1 ngày
@lavaman131 đang làm issue này rồi.
Từ ngày 28/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Summary
If a document contains an empty paragraph, its generated description never refreshes. The document-summary background job fails both attempts with:
chopin: background job document-summary <id> attempt 1 failed - Error: Document source is not canonical.
chopin: background job document-summary <id> attempt 2 failed - Error: Document source is not canonical.
The job ends as failed with reason attempts-exhausted:attempt-error. The failing check (apps/server/src/jobs/document-summary.ts:338) runs before any harness call, so this happens with every HARNESS value.
Reproduction
- Run with
AGENT=on BACKGROUND_JOBS=on, open a document, and type a paragraph. - Leave an empty paragraph anywhere in the document. Pressing Enter at the end is enough, and so is inserting a
/researchcard, which leaves an empty paragraph after it. - Wait for the description debounce (30 s).
The stored snapshot source ends with an extra blank line:
"The harp needs new strings before the spring recital. We have a budget for one octave.\n\n<Research id=\"d5a1b471-…\" />\n\n"
Running serialize(parse(source)) returns the same text with a single trailing \n, so the job's canonical check rejects the source.
This was observed while verifying background workers under HARNESS=atomic (#210). The parent description job succeeded before the Research card was inserted and failed after it. The research jobs themselves completed.
Cause
$exportPlanTree in packages/dialect/src/convert.ts exports each empty Lexical paragraph as an MDAST paragraph with no children. serialize writes that as an extra blank line. parse never produces an empty paragraph, so the room persists source that doesn't survive its own round trip. This violates the "projected to canonical MDX" invariant in AGENTS.md. It happens at the root, between blocks, and inside containers such as blockquotes (> Quoted\n>\n>\n).
Block addressing already ignores these paragraphs. addressable() in apps/server/src/plan/room.ts skips root-level empty paragraphs, and digests() goes through parse.
Expected
Room projection is canonical, and serialize(parse(project(room))) === project(room) holds when the live tree contains empty paragraphs. Description jobs then succeed for these documents.
- Ngôn ngữ chính
- TypeScript
- Star
- 406
- Fork
- 24
- Merge trung bình
- 13 giờ 3 phút
- Pull request đã merge (30 ngày)
- 400
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 githubnext/chopin
-
documentation triage/human-response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
githubnext/chopin#149 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A stopped workflow stage should show its child stages as stopped tooCó thể đã có người làm @lavaman131 đã nhận hôm nay. Đang mở
githubnext/chopin#646 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Machine menu in the Chat box is cut off at the bottom right once the workspace has documentsCó thể đã có người làm @lavaman131 đã nhận hôm nay. Đang mở
githubnext/chopin#645 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
githubnext/chopin#597 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
githubnext/chopin#596 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của githubnext/chopin
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
aws/agentcore-cli#2606 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug Cosmetic
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-driven-qa bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
linagora/twake-mail-admin#301 ·
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 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anomalyco/opencode#56038 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày