fix(a2a,memory): wire ConnectInfo for rate limiting and register ConsolidationHandler#4419
Merged
Conversation
2704534 to
2983c31
Compare
…olidationHandler so rate_limit_middleware receives the real client IP instead of falling back to 0.0.0.0 and collapsing all clients into one bucket. (\"0 0 * * * *\") when five-signal memory is enabled. Adds five_signal_runtime() getter on SemanticMemory; wires the handler through runner.rs and acp.rs. Closes #4412, Closes #4409
2983c31 to
54bea21
Compare
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
A2aServer::servenow callsinto_make_service_with_connect_info::<SocketAddr>()soConnectInfo<SocketAddr>is injected into request extensions. Previously the fallback0.0.0.0caused all A2A clients to share a single rate-limit bucket. Mirrors the existing pattern inzeph-gateway.ConsolidationHandleris registered in the scheduler with an hourly cron ("0 0 * * * *") when five-signal memory is enabled. Addsfive_signal_runtime()getter onSemanticMemory; wires the handler throughrunner.rsandacp.rs. Implements FR-010–FR-012 from spec 004-memory.Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace --features "desktop,ide,server,chat,pdf,scheduler" -- -D warnings— zero warningscargo nextest run --workspace --lib --bins— 9947 passed, 0 failuresfive_signal_runtime_getter_returns_none_by_defaultincrates/zeph-memory/src/semantic/tests/mod.rsCloses #4412
Closes #4409