Skip to content

Commit 7def829

Browse files
committed
fix: address CodeRabbit review comments
- tests/test_sqlitedb.py: remove erroneous db.password = None in make_db(); password is a Client/schema field, not an attribute of SQLiteDB — assigning it to the raw object() bypassed the dataclass and had no effect - spec.md: correct swapped VERSION_BUILD/VERSION_MINOR in acceptance criteria; the spec listed VERSION_BUILD = 1, VERSION_MINOR = 0 but version.py correctly uses VERSION_MINOR = 1, VERSION_BUILD = 0 for the 0.1.0 release Skipped CodeRabbit suggestion: - threading.Lock for write serialization (Minor): SQLite WAL mode already serializes writers internally; the plugin runs in a single-threaded hivemind-core context; adding a Lock would duplicate SQLite's own locking without practical benefit and is listed as a Non-Goal ("Multi-process locking beyond WAL mode") in spec.md AI-Generated Change: - Model: claude-sonnet-4-6 - Intent: apply valid CodeRabbit Minor suggestions - Impact: cleaner test helper; accurate spec documentation - Verified via: python -m pytest tests/ -p no:ovoscope -q (31 passed)
1 parent 009f832 commit 7def829

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎spec.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ Bring `hivemind-sqlite-database` to a stable `0.1.0` release. The plugin already
4343
- [ ] A test asserts that `len(db) == 0` on a fresh DB and increments correctly after `add_item`.
4444
- [ ] A test asserts that `list(db)` yields all rows including revoked ones.
4545
- [ ] A test asserts `add_item` returns `False` when a simulated `sqlite3.Error` is raised (mock or force an error).
46-
- [ ] `version.py` has `VERSION_BUILD = 1`, `VERSION_MINOR = 0` (or equivalent `0.1.0` string).
46+
- [ ] `version.py` has `VERSION_MINOR = 1`, `VERSION_BUILD = 0` (i.e., `0.1.0`).
4747
- [ ] GitHub Actions workflow file exists at `.github/workflows/` and references `pytest`.
4848
- [ ] The WAL pragma is confirmed active: a test opens an in-memory DB and asserts `PRAGMA journal_mode` returns `"wal"` — or at minimum the `__post_init__` code contains the pragma call.

‎tests/test_sqlitedb.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def make_db() -> SQLiteDB:
1616
db = object.__new__(SQLiteDB)
1717
db.name = "clients"
1818
db.subfolder = "hivemind-core"
19-
db.password = None
2019
db.conn = sqlite3.connect(":memory:", check_same_thread=False)
2120
db.conn.row_factory = sqlite3.Row
2221
db.conn.execute("PRAGMA journal_mode=WAL")

0 commit comments

Comments
 (0)