Skip to content

Release 0.1.1a2 - #25

Open
github-actions[bot] wants to merge 24 commits into
masterfrom
release-0.1.1a2
Open

Release 0.1.1a2#25
github-actions[bot] wants to merge 24 commits into
masterfrom
release-0.1.1a2

Conversation

@github-actions

Copy link
Copy Markdown

Human review requested!

JarbasAl and others added 24 commits November 10, 2023 17:50
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Document the bridge as a HiveMind satellite that relays a DeltaChat account
to a hivemind-core hub: prerequisites, install, quickstart, configuration
reference, troubleshooting, and a docs/ walkthrough with examples.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…#11)

* fix!: modernize packaging, repair console entry point, add CI + tests

Migrate from legacy setup.py to pyproject.toml with a version.py
VERSION_BLOCK and dynamic version (mirrors HiveMind-cli).

Fix the broken console entry point: it referenced the nonexistent
module deltachat_bridge.__main__:launch_bot; the real package is
hm_deltachat_bridge, so it now points at
hm_deltachat_bridge.__main__:launch_bot. Closes #10.

Pin hivemind-bus-client>=0.9.0,<1.0.0 and declare ovos-utils + click +
deltachat. Wire the full gh-automations reusable workflow set @dev
(build tests, license check, alpha/stable release, conventional labels)
plus bump scripts. Add tests/test_smoke.py exercising import, version,
the repaired entry point, and bridge construction with the DeltaChat
account and HiveMind bus mocked out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test: add real HiveMind-side e2e + live DeltaChat scaffold

Boot a real hivemind-core hub (hivescope loopback) and drive the REAL
bridge end to end, mocking only the DeltaChat transport:

  inbound DeltaChat msg -> DeltaChatBot.ac_incoming_message
    -> handle_delta_utterance -> emit_mycroft(recognizer_loop:utterance)
    -> real WebSocket -> hub agent -> speak back to originating peer
    -> bridge.handle_incoming_mycroft -> bot.speak -> chat.send_text (captured)

tests/e2e/test_bridge_hivemind_e2e.py proves the round-trip: the user's
utterance reaches the real hub agent bus carrying deltachat_addr, and the
agent's reply is delivered to that exact DeltaChat chat. A negative test
asserts no reply is sent when the hub agent never answers. The deltachat lib
is mocked explicitly (no importorskip) so no email account is needed.

tests/e2e/test_deltachat_live.py is a scaffold for the REAL DeltaChat
IMAP/SMTP loop: it reads DELTACHAT_ADDR/DELTACHAT_PASSWORD (+ optional
DELTACHAT_PEER_ADDR/PASSWORD) and skips cleanly when absent.

CI: scope build_tests.yml to the offline smoke tests; add e2e_tests.yml
which pre-installs hivescope from fix/loopback-whitelist-only-connection
with --pre (the hivemind-core stack is alpha) and runs tests/e2e/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add chatmail / account setup guide for bridge operators

Document how to provision the bot's DeltaChat account — chatmail (instant,
bot-friendly: app onboarding, programmatic DCACCOUNT provisioning, or self-hosted
chatmaild), any IMAP/SMTP mailbox, or self-hosted mail — plus the full operator
walkthrough (hub add-client, run command, talk-to-it, security, live-test env
vars). Linked from the README and setup docs.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The HiveMind-side e2e suite previously pulled hivescope from a git feature
branch with --pre through the workflow's pre_install_pip. hivescope is now
published, so the dependency moves where it belongs: a pyproject [e2e] extra
with prerelease floors for the 2.x hivemind-core stack (PEP 440 — a
prerelease floor opts that package into prereleases, no --pre needed).

The hivemind-bus-client floor becomes 0.9.2a1 to match hivescope's own
requirement so the graph resolves without backtracking. The e2e workflow
installs .[e2e] and runs across the same python matrix as the build tests.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…nce) (#7)

* feat!: migrate to AsyncHiveMessageBusClient (composition over inheritance)

BREAKING CHANGE: HiveMindDeltaChatBridge no longer subclasses HiveMessageBusClient; start()/stop() are coroutines and the bus client is exposed as .client

* test: exercise the composed async bridge in smoke and e2e suites

The e2e drives the bridge on a dedicated asyncio loop thread; test
credentials use high-entropy passwords to satisfy the poorman-handshake
strength check. The HiveMind-side e2e currently fails because
AsyncHiveMessageBusClient cannot complete the handshake against a v3
hub (missing max_protocol_version + sync emit call sites in
HiveMindSlaveProtocol); tracked upstream in hivemind-websocket-client.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
)

The <1.0.0 cap let pip resolve the ancient 0.11.1a1 client, which predates
the Noise-v3 handshake and cannot connect to a current crypto-required
HiveMind hub. Bump the floor and cap at <2.0.0 instead of <1.0.0.
start() called self.client.connect(site_id="deltachat") with no
handshake_max_retries, and the default is None (retry forever) in
hivemind-bus-client's async client — a hub that never completes the
handshake wedges the bridge's start() indefinitely.

Bump the hivemind-bus-client[async] floor to 1.0.15a1 (the first
published version whose AsyncHiveMessageBusClient.connect() accepts
handshake_max_retries; 1.0.13a1 does not) and pass a finite default
(10) unconditionally.

The published AsyncFakeHiveMessageBus test double at 1.0.15a1 does
not yet accept the new kwarg. Rather than guard the production call
(an inspect.signature() check on Mock objects behaves inconsistently
across Python versions), fix it in the tests: a
_KwargsTolerantFakeBus subclass accepts **kwargs on connect() so the
existing tests keep exercising the real, unconditional production
call.

Added a regression test using a fakebus subclass that records the
kwargs it receives, asserting handshake_max_retries is a finite
positive int. Fails against the unfixed source (asserts None) and
passes after the fix.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.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