Skip to content

fix(orchestration): remove INV-1 violating deps and track durable writer handle#5028

Merged
bug-ops merged 2 commits into
mainfrom
5003-orchestration-inv1
Jun 7, 2026
Merged

fix(orchestration): remove INV-1 violating deps and track durable writer handle#5028
bug-ops merged 2 commits into
mainfrom
5003-orchestration-inv1

Conversation

@bug-ops

@bug-ops bug-ops commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Changed files

Crate Change
zeph-common Add OutputSanitizer trait + IdentitySanitizer
zeph-db Add RawGraphStore trait (moved from zeph-memory)
zeph-memory Re-export RawGraphStore from zeph-db for consumers
zeph-orchestration Remove zeph-llm/zeph-memory/zeph-sanitizer deps; gate LLM modules behind llm-planning feature
zeph-core Store writer JoinHandle in OrchestrationState; flush-before-abort in shutdown.rs
zeph-sanitizer ContentSanitizer implements OutputSanitizer from zeph-common

Test plan

  • cargo +nightly fmt --check — PASS
  • cargo clippy --workspace -- -D warnings — PASS
  • RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps -p zeph-db -p zeph-common -p zeph-orchestration — PASS
  • cargo nextest run --workspace --lib --bins — 10713/10713 PASS
  • cargo 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

@github-actions github-actions Bot added documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate dependencies Dependency updates bug Something isn't working size/XL Extra large PR (500+ lines) labels Jun 7, 2026
bug-ops added 2 commits June 7, 2026 18:11
…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
bug-ops enabled auto-merge (squash) June 7, 2026 16:11
@bug-ops
bug-ops force-pushed the 5003-orchestration-inv1 branch from 56a6f65 to c604c33 Compare June 7, 2026 16:11
@bug-ops
bug-ops merged commit f06f3c2 into main Jun 7, 2026
63 of 65 checks passed
@bug-ops
bug-ops deleted the 5003-orchestration-inv1 branch June 7, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant