Skip to content

refactor: decompose long functions in zeph-mcp, zeph-index, zeph-subagent#3469

Merged
bug-ops merged 1 commit intomainfrom
decompose-long-funcs-multi
Apr 26, 2026
Merged

refactor: decompose long functions in zeph-mcp, zeph-index, zeph-subagent#3469
bug-ops merged 1 commit intomainfrom
decompose-long-funcs-multi

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 26, 2026

Summary

  • Decomposed connect_all, connect_oauth_deferred, add_server in zeph-mcp/src/manager.rs into focused private helpers
  • Decomposed index_project in zeph-index/src/indexer.rs into ensure_collection_for_provider, walk_project_files, index_batch, cleanup_removed_files
  • Decomposed run_agent_loop in zeph-subagent/src/agent_loop.rs into build_effective_system_prompt, call_provider_with_status, emit_working_status, handle_secret_request, handle_no_tool_response, init_loop_state, run_turn with TurnOutcome/NoToolAction/SecretRequestOutcome enums for explicit control flow
  • Removed all #[allow(clippy::too_many_lines)] suppressions from the target functions

Pure refactoring — no behavior changes, no public API changes, no new dependencies.

Test plan

  • cargo clippy --workspace -- -D warnings — clean
  • cargo nextest run --workspace --lib --bins — 8605 passed, 0 failed
  • cargo +nightly fmt --check — clean

Closes #3451, #3458, #3447

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes refactor Code refactoring without functional changes size/XL Extra large PR (500+ lines) labels Apr 26, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 26, 2026 13:54
@bug-ops bug-ops force-pushed the decompose-long-funcs-multi branch from eb8c335 to afc8222 Compare April 26, 2026 13:55
…ph-subagent

Extract private helpers from connect_all, connect_oauth_deferred, add_server
(manager.rs), index_project (indexer.rs), and run_agent_loop (agent_loop.rs).
Remove all #[allow(clippy::too_many_lines)] suppressions on these functions.

Closes #3451, #3458, #3447
@bug-ops bug-ops force-pushed the decompose-long-funcs-multi branch from afc8222 to deaef25 Compare April 26, 2026 14:09
@bug-ops bug-ops merged commit 4545f2d into main Apr 26, 2026
32 checks passed
@bug-ops bug-ops deleted the decompose-long-funcs-multi branch April 26, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation refactor Code refactoring without functional changes rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant