changelog.d/4899-native-save-resume-after-outage.md
Rama main · réplica de lectura del repositorio original.
- **Native Word/Sheet: saving resumes after an outage whose save never reached the server (#4899).** Offline before an autosave left the browser, the status stayed "Výsledek nepotvrzen". "Ověřit výsledek" asked the server, which answered "no matching commit" (409), and the editor then refused every later save, so the server stayed on its version while the person kept typing. Each save now carries an attempt id. Reconcile with it either proves the commit or retires that attempt under the document writer fence and answers 410; a retired attempt can never commit, even if its request was still being validated. After a 410 the editor saves a fresh capture of its current bytes at the same base and never treats bytes equal to its old baseline as already saved, so another holder's newer version is still a visible conflict with the draft kept. Coming back online runs the same check by itself. New table `craft_native_retired_attempts` (runtime-only, excluded from backups) is hard-bounded: only the live lease holder retires, rows of lapsed leases are pruned on every retirement, and a page keeps at most 8 rows. Reconcile without `attemptId` (CLI, older editors), without the live lease, or at that limit records nothing and answers 409; the editor then stays "Výsledek nepotvrzen" and may check again instead of blocking every later save.