Repository navigation
test: add an end-to-end test through the real HTTP endpoints - #66
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Checking in! I've finished the automated rounds. 🏥I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthScanning for any signs of repository fatigue. 😫 ✅ All required files present. Latest Version: ✅ ⚖️ License CheckLegal 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). 🔍 LintThe automated sentinel is back with news. 💂♂️ ❌ ruff: issues found in 17 file(s) — see job log 🔨 Build TestsEnsuring the foundation is solid for these changes. 🏛️ ✅ All versions pass
🏷️ Release PreviewHere's what the next release might look like! 🚀 Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
📊 CoverageHow well do we know our own code? 🧠 ✅ 87.9% total coverage Per-file coverage (2 files)
Full report: download the 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>
7a45f37 to
a796d6c
Compare
tests/e2eused 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 realHiveMindHTTPClientconnects, 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_messagediscards frames, the test fails withtimed out waiting for HiveMind handshake. Unmutated,tests/e2epasses 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