A lock is a live writer, not damage. SQLite holds its locks as operating-system
locks that the kernel releases when a process exits, so a lock that outlives the
busy timeout belongs to a process that is still inside it. Replacing its file
does not stop that writer: it keeps appending to the moved bytes while the new
database starts empty, splitting one history across two files.
Windows made the inconsistency visible: it refuses to move a file another handle
holds open, so the replacement could never work there, and the tests had to
assert different outcomes per platform. The rule is now uniform and simpler.
- `recovery: replace` keeps its meaning for damage only: a database this build
cannot read moves to `<name>.unreadable-<timestamp>` and an empty one takes
its place, so every byte survives and Sessions stay available.
- A lock always fails with `SESSION_STORAGE_LOCKED` after the busy timeout, on
every platform, and the database is left where it is.
- A damaged file whose move fails is never replaced either: returning false
reports the storage fault instead of discarding the only copy of the bytes.
- `ReplaceReason` and the `locked` tag are gone; only damage reaches the tag.
This matches SQLite's own SQLITE_BUSY contract, LevelDB's LOCK behaviour, and
Chrome's singleton lock handling, which reports an owner it cannot prove dead
rather than breaking a live one. README, upgrade guide, and the decision record
state the rule in both languages.