refactor(epic-1973): Extract zeph-sanitizer crate from zeph-core (Phase 1e #1981)#2009
Merged
refactor(epic-1973): Extract zeph-sanitizer crate from zeph-core (Phase 1e #1981)#2009
Conversation
…se 1e) Extract content sanitization, PII filtering, exfiltration guard, and quarantine logic from zeph-core (4,337 LOC) into new zeph-sanitizer crate with direct imports. Changes: - Create crates/zeph-sanitizer with 6 core modules: exfiltration, guardrail, memory_validation, pii, quarantine, and lib.rs - Move guardrail feature flag to zeph-sanitizer (zeph-core propagates it) - Update all imports in zeph-core and binary to use zeph_sanitizer::* directly (no re-export shim, following user's clean code principle) - Add zeph-sanitizer to workspace members and root dependencies - All 5412 tests pass Acceptance criteria met: - zeph-sanitizer compiles independently - zeph-core re-exports all public types - Feature flags working (guardrail) - All tests pass - CI checks: format, clippy pass
Merged latest changes from main including Phase 1d (zeph-experiments extraction). Resolved conflicts: - CHANGELOG.md: both Phase 1e and Phase 1d entries preserved - crates/zeph-core/Cargo.toml: both zeph-sanitizer and zeph-experiments dependencies included - experiments feature now includes zeph-experiments/experiments flag - guardrail feature includes zeph-sanitizer/guardrail flag All checks pass: cargo check, clippy, format
3 tasks
guardrail.rs uses tokio::time::timeout() for LLM call timeouts. Add tokio with 'time' feature to regular dependencies (was only in dev-deps).
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
Extract content sanitization, PII filtering, exfiltration guard, and quarantine logic from zeph-core (4,337 LOC) into new zeph-sanitizer crate.
Follows Phase 1d (vault extraction) pattern but uses clean direct imports instead of re-export shim (as per requirement for pre-v1.0.0 code).
Changes
crates/zeph-sanitizer/with 6 core modules:exfiltration,guardrail,memory_validation,pii,quarantinezeph_sanitizer::*directlyTest Plan
cargo check --workspace— all dependencies resolve correctlycargo +nightly fmt --check— formatting passescargo clippy --workspace -- -D warnings— zero warningscargo nextest run --config-file .github/nextest.toml --workspace --lib --bins— 5412 tests passAcceptance Criteria