Skip to content

Release 0.3.0a2#31

Open
github-actions[bot] wants to merge 7 commits into
masterfrom
release-0.3.0a2
Open

Release 0.3.0a2#31
github-actions[bot] wants to merge 7 commits into
masterfrom
release-0.3.0a2

Conversation

@github-actions

Copy link
Copy Markdown

Human review requested!

JarbasAl and others added 7 commits April 15, 2026 03:28
* ci: replace hand-rolled release jobs with shared template inputs

The old publish_stable.yml and release_workflow.yml extracted the version
by importing hivemind_sqlite_database, which triggered __init__.py and
pulled in ovos_utils — not present in the bare workflow environment.

Replace all duplicated publish_pypi, sync_dev, propose_release, and notify
jobs with the equivalent inputs on the shared publish-stable.yml@dev and
publish-alpha.yml@dev reusable workflows, which use get_version.py to read
version.py directly without any package import.

AI-Generated Change:
- Model: claude-sonnet-4-6
- Intent: fix version extraction failure in CI release workflows
- Impact: replaced publish_stable.yml, release_workflow.yml
- Verified via: reviewed diff against shared template inputs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: add optional SQLCipher encryption to SQLiteDB via password kwarg

AI-Generated Change:
- Model: Claude Sonnet 4.6
- Intent: allow operators to encrypt the client database at rest using SQLCipher AES-256
- Impact: SQLiteDB gains a password field; when set, sqlcipher3 is used as the sqlite3
  backend and PRAGMA key is issued immediately after connect; when None (default) the
  existing stdlib sqlite3 path is unchanged; ImportError with install hint raised if
  sqlcipher3 is missing but a password is supplied
- Verified via: python -m pytest tests/test_sqlitedb.py -q -p no:ovoscope (31 passed)

* chore: add cipher optional-dependency extra for sqlcipher3

AI-Generated Change:
- Model: Claude Sonnet 4.6
- Intent: let users opt into SQLCipher encryption via pip install hivemind-sqlite-database[cipher]
- Impact: pyproject.toml gains [project.optional-dependencies] cipher = ["sqlcipher3"]
- Verified via: python -m pytest tests/test_sqlitedb.py -q -p no:ovoscope (31 passed)

* test: add SQLCipher encrypted-path tests (skipped without sqlcipher3)

AI-Generated Change:
- Model: Claude Sonnet 4.6
- Intent: verify encrypted path works end-to-end and existing CI remains green without sqlcipher3
- Impact: TestSQLiteDBEncrypted (3 tests, skipped when sqlcipher3 absent) and
  TestSQLiteDBMissingCipher (ImportError when sqlcipher3 not installed) added
- Verified via: python -m pytest tests/test_sqlitedb.py -q -p no:ovoscope
  (35 passed with sqlcipher3; 32 passed + 3 skipped without)

* docs: document SQLCipher encryption in README and add CI workflow

AI-Generated Change:
- Model: Claude Sonnet 4.6
- Intent: document the password kwarg, install steps, and data-loss warning; add CI
  that tests both plain and encrypted paths
- Impact: README.md rewritten with usage examples, apt/pip install instructions, and
  data-loss warning; .github/workflows/tests.yml added with two jobs (plain sqlite3
  and sqlcipher3)
- Verified via: python -m pytest tests/test_sqlitedb.py -q -p no:ovoscope (35 passed)

* fix(ci): remove libsqlcipher0 from apt install — not present on Ubuntu 24.04

Ubuntu Noble (24.04) replaced libsqlcipher0 with libsqlcipher1.
Installing libsqlcipher-dev is sufficient as it declares a dependency on
libsqlcipher1 and pulls it in automatically.

AI-Generated Change:
- Model: claude-sonnet-4-6
- Intent: fix SQLite + SQLCipher CI job failing with exit code 100
- Impact: `apt-get install -y libsqlcipher0` → removed; libsqlcipher-dev alone satisfies the requirement
- Verified via: gh run log inspection showing "Unable to locate package libsqlcipher0"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address CodeRabbit Major issues in encryption implementation

AI-Generated Change:
- Model: claude-sonnet-4-6
- Intent: address CodeRabbit Major review comments on PR #24

Changes:
- __init__.py: gate on `password is not None` instead of truthiness so
  empty-string passwords don't silently downgrade to plaintext; raise
  ValueError for empty strings
- __init__.py: escape single-quotes in passphrase before building PRAGMA
  key string (SQLite double-quote escaping) to avoid broken opens and
  eliminate an injection surface
- tests/test_sqlitedb.py: rewrite _make_encrypted_db() to drive through
  __post_init__() (patching xdg_data_home) instead of reimplementing the
  SQLCipher setup, so regressions in the production path are caught
- tests/test_sqlitedb.py: remove unused `importlib` import (Ruff F401 /
  CI lint failure)

Verified via: python -m pytest tests/test_sqlitedb.py -q (35 passed)
              python -m ruff check (all checks passed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(ci): address CodeRabbit workflow issues

AI-Generated Change:
- Model: claude-sonnet-4-6
- Intent: address CodeRabbit Critical/Major review comments on CI workflows

Changes:
- tests.yml: add `sudo apt-get update` before apt install to prevent
  intermittent "Unable to locate package" failures on stale runner indexes
- tests.yml: remove broken `|| pip install -e . && pip install sqlcipher3`
  fallback that masked a misconfigured cipher extra; now fails loudly if
  `.[cipher]` is broken (cipher extra is defined in pyproject.toml so
  this is the correct install path)
- release_workflow.yml: add `if: github.event.pull_request.merged == true`
  guard to publish_alpha job so closing a PR without merging does not
  trigger PyPI publish, release proposal, or Matrix notification

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Preserve client metadata

* refactor: require hivemind-plugin-manager>=0.5.0 and drop feature detection

hivemind-plugin-manager 0.5.0 ships Client.metadata, so the
CLIENT_SUPPORTS_METADATA runtime detection and dual code paths are
dead code. Bump the dependency floor and always read/write metadata.

The schema migration (ALTER TABLE ... ADD COLUMN metadata) is kept
for backwards compatibility with DB files created by older versions.

Tests: drop feature-detection skips, add nested-dict and non-ASCII
metadata round-trip coverage.

* test: add metadata helper and update-semantics coverage

- empty-dict default when no metadata kwarg
- INSERT OR REPLACE overwrites metadata on same client_id
- _metadata_to_json returns '{}' for non-dict inputs
- _metadata_from_row coerces NULL / malformed JSON / non-object JSON to {}

* docs: clarify _metadata_to_json/_metadata_from_row contracts

- _metadata_to_json: document that default=str makes datetime/UUID
  insertable but they come back as strings (column is opaque JSON, not
  a typed map)
- _metadata_from_row: document the swallow-garbage rationale (one bad
  row mustn't break iteration)

No behavior change.

---------

Co-authored-by: Gaëtan Trellu <gaetan.trellu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant