Empty paragraphs make room projection non-canonical, failing document descriptions
I maintainer di solito rispondono entro 1 giorno
@lavaman131 ci sta già lavorando.
Dal 28/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 351
- Fork
- 20
- Merge medio
- 1g 34m
- PR unite (30g)
- 34
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di githubnext/chopin
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
githubnext/chopin#154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
githubnext/chopin#149 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
githubnext/chopin#214 ·
I maintainer di solito rispondono entro 1 giorno
-
Local mode: run the Planner as a full Atomic session with questions routed to DecisionsForse già presa @lavaman131 l’ha presa 1 giorno fa. Apertaenhancement
githubnext/chopin#213 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
githubnext/chopin#203 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di githubnext/chopin
Issue simili
-
needs:triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
ai-discovered
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
jessepollak/home#1627 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-canvas bug llm priority:low ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
OpenHands/OpenHands#17806 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
radius-project/ai-extensions#923 ·
I maintainer di solito rispondono entro 1 giorno