Skip to content

fix(core): bound trace_extraction shutdown await and preserve DbError type#4504

Merged
bug-ops merged 1 commit into
mainfrom
4500-4496-core-fixes
May 28, 2026
Merged

fix(core): bound trace_extraction shutdown await and preserve DbError type#4504
bug-ops merged 1 commit into
mainfrom
4500-4496-core-fixes

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 28, 2026

Summary

Changed files

  • crates/zeph-core/src/agent/mod.rs — timeout block in shutdown
  • crates/zeph-core/src/agent/error.rsAgentError::Db variant
  • crates/zeph-core/src/agent/shadow_sentinel.rs — 3 call sites

Test plan

  • cargo nextest run -p zeph-core — 1496/1496 passed
  • cargo build --workspace — clean, no warnings
  • cargo clippy --workspace -- -D warnings — clean
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features desktop,ide,server,chat,pdf,scheduler — clean
  • Full workspace: 10043 tests passed

Closes #4500, closes #4496

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate bug Something isn't working size/S Small PR (11-50 lines) labels May 28, 2026
@bug-ops bug-ops force-pushed the 4500-4496-core-fixes branch from 0f68b40 to 2da7b26 Compare May 28, 2026 13:59
@bug-ops bug-ops enabled auto-merge (squash) May 28, 2026 13:59
… type

Add a 2-minute timeout around `trace_extraction_handle.await` in agent
shutdown so a slow or hung LLM call inside the trace extraction task
cannot stall agent exit indefinitely. Timeout and task panic are now
logged with separate `tracing::warn!` messages.

Change `AgentError::Db(String)` to `Db(#[from] zeph_db::DbError)` so the
full `DbError` structure is preserved across the error boundary instead of
being collapsed to a string. Callers in `shadow_sentinel.rs` updated to
use `.into()` for the two-step `sqlx::Error → DbError → AgentError`
conversion.

Closes #4500, closes #4496
@bug-ops bug-ops force-pushed the 4500-4496-core-fixes branch from 2da7b26 to 1d9792f Compare May 28, 2026 14:00
@bug-ops bug-ops merged commit 5350132 into main May 28, 2026
32 checks passed
@bug-ops bug-ops deleted the 4500-4496-core-fixes branch May 28, 2026 14:09
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 documentation Improvements or additions to documentation rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant