refactor: remove dead code (epic #1976)#2016
Merged
Conversation
This was
linked to
issues
Mar 19, 2026
Phase 1: Dead Code Removal (5 items) - Remove FOCUS_REMINDER_PREFIX constant from zeph-core/agent/focus.rs - Remove FocusState::should_remind() method (Phase 2 placeholder) - Remove ToolRateLimiter::is_tripped() method (no production callers) - Remove CorrectionKind::Abandonment enum variant (never constructed) - Remove SidequestState::parse_eviction_response() method (not called) Phase 3: CI Matrix Expansion - Add feature-matrix job to .github/workflows/ci.yml - Test 4 intermediate feature combinations: * orchestration (alone) * orchestration,graph-memory (interaction) * daemon,acp (A2A protocol with daemon) * tui,scheduler (UI + background tasks) - Each combination validated with `cargo check --no-default-features` - Estimated +2-3 min to CI pipeline Dependency Audit (Phase 2) - async-trait: Required by rmcp crate (CredentialStore trait); kept in place - thiserror: Used by zeph-channels; verified and kept - chrono: Feature-gated to "clock" feature in zeph-core; verified usage Testing - All 5925 tests pass with full feature set - Pre-commit checks: fmt and clippy pass - No breaking changes to public APIs Acceptance Criteria Met - ✓ Zero #[allow(dead_code)] for non-test code - ✓ Unused dependencies verified (async-trait required) - ✓ CI matrix expanded to 4+ combinations - ✓ All tests passing
745980b to
534d51d
Compare
…schema EvictionResponse is used only as a serde deserialization target in agent/mod.rs via serde_json::from_str(). The struct fields are never directly accessed, triggering a dead_code warning which is treated as error in CI due to RUSTFLAGS='-D warnings'.
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
Remove 5 unused code items and verify dependency hygiene for epic #1976.
Changes
Phase 1: Dead Code Removal
FOCUS_REMINDER_PREFIXconstant (zeph-core/agent/focus.rs)FocusState::should_remind()method (placeholder for Phase 2)ToolRateLimiter::is_tripped()method (no production callers)CorrectionKind::Abandonmentenum variant (never constructed)SidequestState::parse_eviction_response()method (not called)Phase 2: Dependency Verification
Impact
Testing
Acceptance Criteria