Ctrl K
ComunidadGuías…

changelog.d/4828-prd-craft-lost-line-check.md

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
- **PRD acceptance harness: the Craft rows fail when a line the editor took is lost, doubled or reordered (#4828).** The restart, hour, write-revoked and handoff rows only checked that the lines proven accepted by the status were somewhere in the draft or the saved head. A line typed as the editor turned read-only, a doubled or reordered line, and a partial save that missed the first line all passed. A per-line ledger (`craft-session/lines.ts`) now records each line as typed and accepted, then as found in each copy: the draft in the open editor, the draft offered after a reload, and the head the server confirms through the API. Every accepted line, every line an earlier copy held and every line before a later kept one must appear exactly once and in typing order. A missing line fails the row, and the message names the line and its last state. The ledger goes to `lines.json` and `result.json`. Rows where nothing may be saved now check that none of the typed lines is on the server, not only the first. Unit tests: `craft-session/lines.test.mjs`, run in the PRD runner test step.