fix(orchestration): remove INV-1 violating deps and track durable writer handle#5028
Merged
Conversation
…ter handle Fixes #5003 and #5004. zeph-sanitizer, violating INV-1 (infrastructure adapters must not depend on higher-level business-logic crates): - Move RawGraphStore trait to zeph-db; zeph-memory re-exports for consumers - Add OutputSanitizer trait + IdentitySanitizer to zeph-common; zeph-sanitizer ContentSanitizer implements it; all orchestration code migrated to Arc<dyn OutputSanitizer> - Feature-gate LLM-dependent modules (planner, aggregator, verifier, verify_predicate, cascade, scheduler/router) behind llm-planning (default-on) - Pure-DAG subset (dag, scheduler, durable, admission, graph) compiles unconditionally without any LLM dependency violating the "fire-and-forget tasks MUST be tracked" rule: - Add durable_writer_task: Option<JoinHandle<()>> to OrchestrationState - Store handle in ensure_durable_backend(); extract flush_durable_writer() async helper in shutdown.rs - Flush with 2-second timeout before abort to prevent loss of buffered budget snapshots on clean shutdown
bug-ops
enabled auto-merge (squash)
June 7, 2026 16:11
bug-ops
force-pushed
the
5003-orchestration-inv1
branch
from
June 7, 2026 16:11
56a6f65 to
c604c33
Compare
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
zeph-llm,zeph-memory,zeph-sanitizerdirect deps fromzeph-orchestrationto comply with INV-1.RawGraphStoremoved tozeph-db;OutputSanitizer/IdentitySanitizeradded tozeph-common; LLM-dependent modules feature-gated behindllm-planning(default-on).JournalWriterJoinHandleinOrchestrationState;shutdown()flushes with a 2-second bounded timeout before aborting, preventing buffered budget snapshot loss.Changed files
zeph-commonOutputSanitizertrait +IdentitySanitizerzeph-dbRawGraphStoretrait (moved fromzeph-memory)zeph-memoryRawGraphStorefromzeph-dbfor consumerszeph-orchestrationzeph-llm/zeph-memory/zeph-sanitizerdeps; gate LLM modules behindllm-planningfeaturezeph-coreJoinHandleinOrchestrationState; flush-before-abort inshutdown.rszeph-sanitizerContentSanitizerimplementsOutputSanitizerfromzeph-commonTest plan
cargo +nightly fmt --check— PASScargo clippy --workspace -- -D warnings— PASSRUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-db -p zeph-common -p zeph-orchestration— PASScargo nextest run --workspace --lib --bins— 10713/10713 PASScargo build -p zeph-orchestration --no-default-features --features sqlite— PASS (confirms INV-1 fix: no LLM deps bleed into no-features build)Closes #5003
Closes #5004