Skip to content

refactor(core): extract zeph-agent-feedback from zeph-core (Phase 1, PR 0b)#3494

Merged
bug-ops merged 2 commits intomainfrom
3480-decompose-zeph-core-god-crate
Apr 26, 2026
Merged

refactor(core): extract zeph-agent-feedback from zeph-core (Phase 1, PR 0b)#3494
bug-ops merged 2 commits intomainfrom
3480-decompose-zeph-core-god-crate

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Extracts FeedbackDetector and JudgeDetector (1,933 LoC) from crates/zeph-core/src/agent/feedback_detector.rs into a new focused crate crates/zeph-agent-feedback/.

This is the first deliverable of the Phase 1 decomposition plan for #3480. It is the only file in zeph-core with zero Agent<C> coupling today, making clean extraction feasible without circular dependencies.

What changed

  • New crate crates/zeph-agent-feedback/ with FeedbackDetector, JudgeDetector, and all associated types
  • crates/zeph-core/src/agent/feedback_detector.rs removed; all 5 call sites updated to use zeph_agent_feedback:: directly
  • No compatibility aliases or deprecated shims — all imports updated in place

Why this matters

  • Creates the first real compile boundary: changes to feedback detection no longer trigger a full zeph-core rebuild
  • Reduces zeph-core by 1,933 LoC (2.4% of total)
  • Proves the extraction mechanism for the Phase 2 sibling crates (deferred until Agent<C> god-object decomposition unblocks)

Scope of Phase 1 vs issue acceptance criteria

Per the architecture investigation:

  • AC#1 (30K LoC): Phase 1 (file splits + this extraction) will bring zeph-core to ~40K production LoC — the 30K target requires Phase 2 (new tracking issue to be filed)
  • AC#2 (no file > 1,000 lines): addressed by subsequent Phase 1 PRs (test extraction, file splits)
  • AC#3 (tests pass): all 8,623 workspace tests pass
  • AC#4 (compile boundary): partially met by this PR (one subsystem isolated)

Test plan

  • cargo build --workspace — clean
  • cargo clippy --workspace -- -D warnings — zero warnings
  • cargo +nightly fmt --check — clean
  • cargo nextest run --workspace --lib --bins — 8,623 tests pass
  • 127 unit tests in zeph-agent-feedback cover all public APIs (FeedbackDetector, JudgeDetector, CorrectionKind, JudgeVerdict)

Closes #3480

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate dependencies Dependency updates refactor Code refactoring without functional changes size/M Medium PR (51-200 lines) labels Apr 26, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 26, 2026 18:42
@bug-ops bug-ops force-pushed the 3480-decompose-zeph-core-god-crate branch from f5f1701 to efbe29c Compare April 26, 2026 18:42
bug-ops added 2 commits April 26, 2026 20:43
Move FeedbackDetector and JudgeDetector (1933 LoC) out of
crates/zeph-core/src/agent/feedback_detector.rs into a new focused
crate crates/zeph-agent-feedback/.

This is the only file in zeph-core with zero Agent<C> coupling today,
making extraction clean without circular dependencies. Creates the first
real compile boundary: changes to feedback detection no longer trigger
a full zeph-core rebuild.

All call sites updated to use zeph_agent_feedback:: directly; no
compatibility aliases retained. All 8623 workspace tests pass.

Part of the Phase 1 decomposition plan for issue #3480.
@bug-ops bug-ops force-pushed the 3480-decompose-zeph-core-god-crate branch from efbe29c to 1c222de Compare April 26, 2026 18:43
@bug-ops bug-ops merged commit c77e2e8 into main Apr 26, 2026
36 checks passed
@bug-ops bug-ops deleted the 3480-decompose-zeph-core-god-crate branch April 26, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation refactor Code refactoring without functional changes rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(core): decompose zeph-core god crate into focused sub-crates

1 participant