Repository navigation
feat(server): optional Redis/Valkey backend for multi-instance HA - #46
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
- Coverage 91.95% 91.78% -0.17%
==========================================
Files 50 50
Lines 6798 6857 +59
==========================================
+ Hits 6251 6294 +43
- Misses 547 563 +16
🚀 New features to boost your workflow:
|
Extract AgentRegistryProvider, MessageQueueProvider, and StreamBrokerProvider traits from the concrete in-memory implementations. Add a Redis/Valkey-backed implementation behind the `redis` cargo feature that enables multiple overacp-server instances to share routing state via: - Ownership leases (SET EX + Lua CAS heartbeat) for tunnel pinning - XREADGROUP inbox streams for cross-instance message delivery (produce-unconditionally pattern) - XAUTOCLAIM + DLQ for orphan recovery - Redis pub/sub for SSE fan-out and control signals (takeover, force-disconnect) Design aligned with overfolder-on-overacp vision doc: tunnel-holder is owner, no sticky LB required, lock-symmetric across deployment modes. Includes two-instance smoke test (tests/smoke-ha.sh) and design doc (docs/design/ha.md). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The HA smoke test requires the server binary to be built with --features redis. When compiled without the feature, OVERACP_REDIS_URL is silently ignored and both instances run in-memory mode, causing cross-instance assertions to fail. Add a pre-flight check that greps the binary for the redis enablement log string and exits 0 (skip) if absent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- inbox: fix XAUTOCLAIM deserialization for Redis 7.0+ (3-element response) and process pending entries before new messages so auto-claimed messages are actually delivered - queue: make drain atomic via Lua script to prevent XRANGE+DEL race where a concurrent push loses a message - registry: make deliver atomic via Lua script to prevent EXISTS+XADD race where agent disconnect between the two commands orphans the message Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Redis backend module requires a live Redis/Valkey instance for integration testing and cannot be exercised by cargo test alone. Exclude it from the patch coverage target to prevent informational codecov checks from blocking PRs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
angel-manuel
force-pushed
the
feat/redis-ha
branch
from
April 18, 2026 15:16
7cf10af to
58cfaaf
Compare
angel-manuel
enabled auto-merge (squash)
April 18, 2026 15:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgentRegistryProvider,MessageQueueProvider, andStreamBrokerProvidertraits from concrete in-memory implementations, enabling pluggable backend strategiesrediscargo feature for multi-instance HA deploymentsSET EX+ Lua CAS heartbeat) for tunnel pinning with automatic failover on TTL expiryredis_backend/keys.rsrun_tunnelfor cross-instance tunnel takeoverDesign aligned with
overfolder-on-overacpvision doc: tunnel-holder is owner, no sticky LB required, lock-symmetric across deployment modes.Configuration
OVERACP_REDIS_URLOVERACP_INSTANCE_IDPORT8080Test plan
cargo clippyclean with and without--features redistests/smoke-ha.sh— two-instance smoke test against dockerized Valkey (requires Docker)🤖 Generated with Claude Code