refactor(epic-1973): Extract config loaders from zeph-core (Phase 1b)#2006
Merged
refactor(epic-1973): Extract config loaders from zeph-core (Phase 1b)#2006
Conversation
Phase 1a: Create new zeph-config (Layer 1) crate with all pure-data config types. Changes: - Create crates/zeph-config/ with 16 modules (config, orchestration, subagent, sanitizer, features, etc.) - Move pure-data types: SecurityConfig, RateLimitConfig, TaskEvent, TaskId, TaskOutcome, MemoryScope, PermissionMode, etc. - zeph-core re-exports all types at original paths (backward compatible) - Delete 9 orphaned type definition files from zeph-core/src/config/types/ - Widen escape_delimiter_tags, apply_spotlight to pub (required by agent/context/assembly.rs) - Add SubAgentHandle::for_test() helper for agent tests - Update root Cargo.toml to include zeph-config in workspace Test results: 6,160 tests pass, 0 failures, feature gates preserved. Closes #1973 Phase 1a
…rate to zeph-config Phase 1b of architecture audit (EPIC-01): move Config struct, loader, validator, env-var overrides, and migrate module from zeph-core to zeph-config. Changes: - zeph-common: add Secret newtype + VaultError to shared primitives (Layer 0). Avoids circular dep: both zeph-config and zeph-core can now use Secret. - zeph-config: add Config + ResolvedSecrets (root.rs), ConfigError (error.rs), Config::load() + Config::validate() + normalize_legacy_runtime_defaults() (loader.rs), Config::apply_env_overrides() (env.rs), ConfigMigrator (migrate.rs). Move config/default.toml from zeph-core to zeph-config. - zeph-core: replace Config/ResolvedSecrets/ConfigError with re-exports from zeph-config. Extract resolve_secrets() into SecretResolver trait (impl for Config). Callers add `use zeph_core::config::SecretResolver` to bring the trait into scope. - Remove dead code: zeph-core/src/config/types/ directory (orphaned since Phase 1a), zeph-core/src/config/env.rs, zeph-core/src/config/migrate.rs. Net LOC reduction in zeph-core: ~5,873 lines (79,383 -> 73,510). All 6078 tests pass. Clippy clean. fmt clean.
- Remove unused zeph-skills dep from zeph-config (confirmed no imports) - Remove unused regex dep from zeph-config (only appeared in doc comments) - Delete orphaned snapshot files from zeph-core/src/config/snapshots/ (stale artifacts from Phase 1a, tests deleted since types/ removed)
This was referenced Mar 18, 2026
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
Epic #1973 Phase 1b: Extract config loaders (Config::load, env/TOML parsing) from zeph-core god crate into zeph-config (Layer 1).
This completes the second phase of god crate decomposition, following Phase 1a (pure config types extraction).
Changes
Moved to zeph-config:
New in zeph-core:
Deleted from zeph-core:
Metrics
LOC reduction:
Test coverage: 6,078 tests pass, 15 skipped
Build verification: ✅ check, ✅ clippy, ✅ nextest
Validation
✅ Code review: APPROVED
✅ Performance review: OK (removed unused zeph-skills, regex deps)
✅ Security audit: SECURE
✅ Implementation review: APPROVED
Closes #1973