Skip to content

test: add an end-to-end test through the real HTTP endpoints - #66

Merged
JarbasAl merged 1 commit into
devfrom
test/e2e-http-endpoints
Oct 21, 2026
Merged

JarbasAl merged 1 commit into
devfrom
test/e2e-http-endpoints

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Sonnet 5.5 (claude-sonnet-5-5) via Claude Code, reviewed by Claude Opus 5.5 — NOT human-reviewed. Verify before acting.

tests/e2e used hivescope's in-process shim, so no test sent a request to this plugin's HTTP handlers. This PR adds one module that does.

The module starts HiveMindHttpProtocol.run() on a free local port, so the real route table serves it. A real HiveMindHTTPClient connects, completes the Noise handshake, sends a bus message that the hub decrypts and dispatches, receives a bus message that the hub queued through the outbox and /get_binary_messages, and disconnects. Plain HTTP requests check the answers for an unknown key (403), a send before connect (409), and a poll or disconnect without a session.

Mutation check: when enqueue_message discards frames, the test fails with timed out waiting for HiveMind handshake. Unmutated, tests/e2e passes 5 of 5 in three runs and the full suite passes (113 tests). Ruff reports no finding on the new file. The fixture asserts that the server thread has stopped and closes the listening socket, so the port is free after teardown. The change adds a test file only.
🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 27f76102-2da2-4a73-b2b7-4379747acdf2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Checking in! I've finished the automated rounds. 🏥

I've aggregated the results of the automated checks for this PR below.

📋 Repo Health

Scanning for any signs of repository fatigue. 😫

✅ All required files present.

Latest Version: 0.0.18a1

✅ hivemind_http_protocol/version.py — Version file
✅ README.md — README
✅ LICENSE.md — License file (consider renaming to LICENSE)
✅ pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
✅ CHANGELOG.md — Changelog
✅ hivemind_http_protocol/version.py has valid version block markers

⚖️ License Check

Legal eagle here! Checking those licenses. ⚖️

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔒 Security (pip-audit)

Ensuring our security logs are being captured. 🪵

✅ No known vulnerabilities found (88 packages scanned).

🔍 Lint

The automated sentinel is back with news. 💂‍♂️

❌ ruff: issues found in 17 file(s) — see job log
✅ actionlint: 10 workflow file(s), no finding

🔨 Build Tests

Ensuring the foundation is solid for these changes. 🏛️

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 113 passed, 26 warnings in 12.34s
3.11 ✅ ✅ ✅ 113 passed, 26 warnings in 12.47s
3.12 ✅ ✅ ✅ 113 passed, 26 warnings in 15.60s
3.13 ✅ ✅ ✅ 113 passed, 26 warnings in 16.02s
3.14 ✅ ✅ ✅ 113 passed, 32 warnings in 12.90s

🏷️ Release Preview

Here's what the next release might look like! 🚀

Current: 0.0.18a1 → Next: 0.0.18a2

Signal Value
Label (none)
PR title test: add an end-to-end test through the real HTTP endpoints
Bump alpha

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.0.18a2

Channel Status Note Current Constraint
Stable ⚪ Not in channel -
Testing ✅ Compatible hivemind-http-protocol>=0.0.1,<1.0.0
Alpha ✅ Compatible hivemind-http-protocol>=0.0.17a1

📊 Coverage

How well do we know our own code? 🧠

✅ 87.9% total coverage

Per-file coverage (2 files)
File Coverage Missing lines
hivemind_http_protocol/__init__.py 87.8% 62
hivemind_http_protocol/version.py 100.0% 0

Full report: download the coverage-report artifact.


Keeping the repository healthy and happy. 😊

tests/e2e only used hivescope's in-process shim, which never routes a
frame through this plugin's handlers. The new module starts the listener
on a local port with the real route table and drives it with a real
HiveMindHTTPClient: Noise handshake, a client-to-hub frame, a hub-to-client
frame through the outbox and /get_binary_messages, and a disconnect. Plain HTTP
requests cover the 403, 409 and "not connected" answers. The fixture closes
the listening socket on teardown, so the port is free afterwards.

Mutation check: making enqueue_message discard frames fails the test with
"timed out waiting for HiveMind handshake" (1 failed, 4 passed); the
unmutated tree passes (5 passed in tests/e2e, 113 in the suite).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@JarbasAl
JarbasAl force-pushed the test/e2e-http-endpoints branch from 7a45f37 to a796d6c Compare October 21, 2026 00:59
@JarbasAl
JarbasAl marked this pull request as ready for review October 21, 2026 01:04
@JarbasAl
JarbasAl merged commit 45187e7 into dev Oct 21, 2026
15 checks passed
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.

2 participants