-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclippy.toml
More file actions
31 lines (31 loc) · 1.88 KB
/
Copy pathclippy.toml
File metadata and controls
31 lines (31 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Workspace clippy config. Read by cargo-clippy at the workspace root.
#
# WHY disallowed-methods on rusqlite::Connection::open:
# Opening a second writable Connection handle to a DB file already
# managed by the SqliteWriter actor is the bug class behind GH #131
# (intermittent test deadlock). SQLite 3.51.0-3.51.1 contained an
# lock-order-inversion lock-order inversion in unixClose vs unixLock-from-WAL-close
# that turned the pattern into a hard hang. The bug is fixed in
# 3.51.2+ (we ship 3.51.3 via rusqlite 0.39), but the *pattern* is
# still fragile to future SQLite regressions and to GRDB.swift #739
# style close-ordering issues.
#
# What's allowed (and why, honestly):
# * Connection::open_with_flags(..., SQLITE_OPEN_READ_ONLY | NO_MUTEX)
# — does NOT prove immunity from the upstream lock-order-inversion close race
# (RO Connections still go through unixClose -> sqlite3WalClose
# and register a unixInodeInfo). What it DOES buy: cannot write
# concurrently with the SqliteWriter, cannot accidentally CREATE
# the file, and signals "inspection-only" intent at code-review
# time. Used by db/tests/writer_hlc_* and cli/tests. Upstream
# immunity comes from rusqlite >= 0.39 (SQLite >= 3.51.2).
# * SqliteWriter::start[_in_memory] — the singleton write entry point.
# * Open of a separate DB file (not the main perima.db) — flagged
# case-by-case via #[allow(clippy::disallowed_methods)] + WHY.
#
# Exceptions are #[allow]-annotated with a WHY-comment at the call
# site. There are 3 today (manifest.rs, search_repo seed_conn, app
# search seed_via_conn). Adding a 4th means thinking hard first.
disallowed-methods = [
{ path = "rusqlite::Connection::open", reason = "Opens a second writable Connection. Use perima_db::SqliteWriter for writes; use Connection::open_with_flags(SQLITE_OPEN_READ_ONLY) for read-only inspection. See clippy.toml header + GH #131." },
]