-
Notifications
You must be signed in to change notification settings - Fork 2
arch: codebase architecture improvements #1741
Copy link
Copy link
Labels
archArchitecture and designArchitecture and designrefactorCode refactoring without functional changesCode refactoring without functional changestech-debtTechnical debtTechnical debt
Description
Overview
Architectural review identified several structural issues affecting maintainability, testability, and idiomatic Rust compliance. This epic tracks all findings as a cohesive improvement effort.
Child Issues
| Priority | Issue | Category |
|---|---|---|
| P1 | #1731 — Decompose Agent struct (40+ fields god object) | arch |
| P1 | #1732 — Remove anyhow from zeph-core library crate | arch |
| P2 | #1735 — Split config/types.rs (3331 lines) into domain modules | refactor |
| P2 | #1736 — Split semantic.rs (3335 lines) into sub-modules | refactor |
| P3 | #1737 — Box large LoopbackEvent variants to reduce enum size | arch |
| P3 | #1733 — Replace async-trait in search_code.rs | tech-debt |
| P4 | #1734 — Reduce 55 clippy::too_many_lines suppressions | refactor |
Positive Findings
- Crate dependency graph is acyclic with clean domain boundaries
- Native async traits (Edition 2024) used consistently in core traits
- Feature gates are additive-only and correctly structured
- Error handling:
thiserrorin library crates, typed error enums with good coverage
Acceptance Criteria
- Agent struct decomposed into focused sub-structs (Decompose Agent struct: extract ProviderState, SessionState, UiState, OrchestrationState #1731)
-
anyhowremoved fromzeph-core(Remove anyhow from zeph-core library crate #1732) -
config/types.rssplit into domain modules (Split config/types.rs into domain-specific config modules #1735) -
semantic.rssplit into sub-modules (Split semantic.rs into recall, summarization, and cross-session sub-modules #1736) -
LoopbackEventlarge variants boxed (Box large LoopbackEvent variants to reduce enum size #1737) -
async-traitremoved fromsearch_code.rs(Replace async-trait with native async traits in zeph-tools/search_code.rs #1733) -
clippy::too_many_linessuppressions reduced (Reduce clippy::too_many_lines suppressions in agent module #1734) - All CI checks pass:
cargo +nightly fmt --check,cargo clippy --workspace --features full -- -D warnings,cargo nextest run --workspace --features full --lib --bins
Notes
- Pre-v1.0.0: no backward compatibility required, clean rewrites preferred
- Each child issue should be a separate PR on its own branch (
feat/mXX/arch-*)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
archArchitecture and designArchitecture and designrefactorCode refactoring without functional changesCode refactoring without functional changestech-debtTechnical debtTechnical debt