docs: add docs-as-code process and one ADR per feature
docs/docs-as-code.md defines the workflow; docs/adr holds 31 ADRs (retroactive, reconstructed from code and changelog) with a template and index. docs/check-docs.sh validates ADR structure, index, cited code paths, relative links and CLAUDE.md/AGENTS.md sync.
This commit is contained in:
1 parent
ce8d777c63
commit
b292590cdc
36 files changed
+987
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# 0018. Exclusive OS-level lock on the open wallet file
|
||||
|
||||
- **Status:** Accepted
|
||||
- **Area:** Storage
|
||||
- **Recorded:** 2026-11-03 (retroactive: reconstructed from code, comments and changelog)
|
||||
|
||||
## Context
|
||||
|
||||
Two processes opening the same wallet could overwrite each other's saves and corrupt state.
|
||||
|
||||
## Decision
|
||||
|
||||
`WalletLock.TryAcquire` holds a `FileStream` opened with `FileShare.None` on a companion `.lock` file for the session. The OS releases it on exit or crash, so there are no stale locks to clean up. A second opener gets `null`; permission errors propagate so the UI can show a distinct message.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Safe multi-instance behaviour without lock-file housekeeping.
|
||||
- Protects against concurrent app instances only, not against external tools editing the file.
|
||||
|
||||
## References
|
||||
|
||||
- `src/Core/Storage/WalletLock.cs`
|
||||
Reference in new issue
Block a user