refactor(agent-context): replace positional-arg chain with param structs - #6195
Merged
Merged
Conversation
bug-ops
enabled auto-merge (squash)
July 13, 2026 00:54
The graph-retrieval-strategy call chain in helpers.rs threaded 8-14 positional arguments through six functions, each individually suppressing clippy::too_many_arguments. Introduce GraphStrategyParams (per-call query state), GraphRecallConfig (shared immutable config), GraphRecallBudget (mutable token-budget accumulator), and SemanticRecallRawParams, grouped by mutability/ownership. Remove all six too_many_arguments allows and the crate's recursion_limit override, which the reduced Future-nesting depth no longer requires. Closes #5992
The recursion_limit=256 removal in the graph-retrieval param-struct refactor was only verified under -p zeph-agent-context --features postgres, not the full feature bundle combined with postgres at the workspace level. That combination pulls in enough extra dependent crates to push the Future-layout query depth past the default 128, failing CI's build-postgres job. Restore the attribute with a comment documenting the actual trigger condition.
bug-ops
force-pushed
the
feat/issue-5992/zeph-agent-context-graph-retri
branch
from
July 13, 2026 00:54
daf80c9 to
869dbd2
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
crates/zeph-agent-context/src/helpers.rsaway from the "parameter bag" anti-pattern: six functions each threaded 8-14 positional arguments and individually suppressedclippy::too_many_arguments.GraphStrategyParams(per-call query state),GraphRecallConfig(shared immutable config),GraphRecallBudget(mutable token-budget accumulator), andSemanticRecallRawParams, grouped by mutability/ownership rather than bundled arbitrarily.clippy::too_many_argumentsallows and the crate's#![recursion_limit = "256"]override, verified unnecessary after the refactor's reduced Future-nesting depth (checked against the specific--features postgres --all-targetscombination the original comment named as the trigger).Closes #5992
Test plan
cargo nextest run -p zeph-agent-context— 86/86 passedcargo test --doc -p zeph-agent-context— 2/2 passedcargo nextest run -p zeph-core --lib --bins(only other dependent crate) — 1822/1822 passed, no regressionscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins— 13283/13283 passed, 35 skippedcargo +nightly fmt --check— cleancargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warnings— cleanRUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"— cleangitleaks protect --staged --no-banner --redact— no leaks foundzeph_common::memory::GraphRecallParamsbefore review)