feat(memory): cap reqwest idle pool and sqlite decode cache#6
Closed
endless-bot wants to merge 2 commits into
Closed
feat(memory): cap reqwest idle pool and sqlite decode cache#6endless-bot wants to merge 2 commits into
endless-bot wants to merge 2 commits into
Conversation
FR-02: add POOL_MAX_IDLE_PER_HOST=1 to reqwest ClientBuilder in node_http_proxy.rs to bound idle TCP connection buffers per proxy key. FR-03: add SQLITE_BY_ID_CACHE_CAPACITY=256 and evict_cache_if_over_capacity() to sqlite_session.rs. Call evict after every by_id cache insert (5 sites: append_entry, get_entry, decode_and_cache, materialized_branch_path, materialize_branch lookup closure). Add cache_len() test helper and three eviction-specific integration tests. FR-01 (Tokio runtime): skipped -- ri is a library crate with no runtime entry point; caller is responsible for runtime configuration. FR-04 (models cache): skipped -- generated_catalog() already uses static LazyLock<BTreeMap<...>>. No new Cargo dependencies. No schema migrations. No breaking API changes.
…r integration tests
- Replace #[cfg(test)] with #[doc(hidden)] on SqliteSessionStorage::cache_len
so that integration tests in tests/sqlite_session.rs can access it
- Apply cargo clippy --fix for auto-fixable lints (collapsible-if, redundant cast,
redundant closure, etc.) across ri-llm-provider and ri-agent-core
- Manually fix remaining clippy lints:
- too_many_arguments: add #[allow] on sign_aws_sigv4_headers, stream_*_json,
generate_summary, compact, generate_branch_summary and related functions
- large_enum_variant: box AssistantMessage in FauxResponseStep::Message,
box AssistantMessageEvent in AgentEvent::MessageUpdate; add #[allow] on
SessionEntryMessage, ToolCallPreparation, AgentHarnessEvent
- type_complexity: add #[allow] on ProviderResolver::Resolver and RetryCallbacks
- struct_update_no_effect: remove ..Default::default() from GooglePayloadOptions
and MistralPayloadOptions where all fields are already specified
- field_reassign_with_default: rewrite AnthropicPayloadOptions as struct literal
- needless_range_loop: replace index loop with enumerate() in find_valid_cut_points
- All 17 sqlite_session integration tests pass (including 3 new FR-03 eviction tests)
- All 436 ri-llm-provider tests pass
- cargo clippy --workspace -- -D warnings now exits clean
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.
🤖 Auto-generated by Endless task #1.
Initiated by: guimin.jiang@longbridge-inc.com
Worker agent: Ri (ri · lboneapi · claude-sonnet-4-6)
Commits
feat(memory): cap reqwest idle pool and sqlite decode cache
FR-02: add POOL_MAX_IDLE_PER_HOST=1 to reqwest ClientBuilder in
node_http_proxy.rs to bound idle TCP connection buffers per proxy key.
FR-03: add SQLITE_BY_ID_CACHE_CAPACITY=256 and evict_cache_if_over_capacity()
to sqlite_session.rs. Call evict after every by_id cache insert (5 sites:
append_entry, get_entry, decode_and_cache, materialized_branch_path,
materialize_branch lookup closure). Add cache_len() test helper and three
eviction-specific integration tests.
FR-01 (Tokio runtime): skipped -- ri is a library crate with no runtime
entry point; caller is responsible for runtime configuration.
FR-04 (models cache): skipped -- generated_catalog() already uses
static LazyLock<BTreeMap<...>>.
No new Cargo dependencies. No schema migrations. No breaking API changes.
fix(test): resolve clippy lint errors and fix cache_len visibility for integration tests
so that integration tests in tests/sqlite_session.rs can access it
redundant closure, etc.) across ri-llm-provider and ri-agent-core
generate_summary, compact, generate_branch_summary and related functions
box AssistantMessageEvent in AgentEvent::MessageUpdate; add #[allow] on
SessionEntryMessage, ToolCallPreparation, AgentHarnessEvent
and MistralPayloadOptions where all fields are already specified