Skip to content

refactor(agent-tools,db): replace send_stop_hint with StopHint enum; fix sql! import guards#4863

Merged
bug-ops merged 1 commit into
mainfrom
4779-api-hygiene-cleanup
Jun 5, 2026
Merged

refactor(agent-tools,db): replace send_stop_hint with StopHint enum; fix sql! import guards#4863
bug-ops merged 1 commit into
mainfrom
4779-api-hygiene-cleanup

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Note: Issue #4779 (#[non_exhaustive] sweep for 18 pub enums) was already resolved in PR #4759 (commit 88c8179f) and is not part of this branch.

Files changed (10)

  • crates/zeph-agent-tools/src/channel.rssend_stop_hint signature updated
  • crates/zeph-common/src/lib.rs — re-export StopHint
  • crates/zeph-common/src/types.rsStopHint enum definition added
  • crates/zeph-core/src/agent/channel_impl.rs — call-sites updated to enum variants
  • crates/zeph-core/src/channel.rs — re-export StopHint from zeph-common
  • crates/zeph-orchestration/src/lib.rssql! import removed (unused at module level)
  • crates/zeph-orchestration/src/plan_cache.rssql! import guarded with #[cfg]
  • crates/zeph-scheduler/src/lib.rssql! import removed (unused at module level)
  • crates/zeph-scheduler/src/scheduler.rssql! import moved inside #[cfg(test)]
  • crates/zeph-scheduler/src/store.rssql! import guarded with #[cfg]

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features "desktop,ide,server,chat,pdf,scheduler" -- -D warnings — clean
  • RUSTFLAGS="-D warnings" cargo check --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,sqlite" --locked — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins — 10500 passed, 21 skipped
  • cargo test --doc --workspace --features "desktop,ide,server,chat,pdf,scheduler" — passed

@github-actions github-actions Bot added rust Rust code changes core zeph-core crate refactor Code refactoring without functional changes size/M Medium PR (51-200 lines) labels Jun 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) June 5, 2026 20:13
@bug-ops bug-ops force-pushed the 4779-api-hygiene-cleanup branch 2 times, most recently from e3351f0 to fdf7d9e Compare June 5, 2026 20:19
…enum; fix sql! import guards

Move StopHint from zeph-core::channel to zeph-common::types to break the
circular dependency that would arise from zeph-agent-tools depending on
zeph-core. Re-export the type in both zeph-common and zeph-core::channel
so all existing call-sites remain source-compatible. Replace the string-
literal dispatch in AgentChannelView with typed StopHint variants and
remove the TODO(critic) debt comment. Closes #4792.

Replace #[allow(unused_imports)] on feature-gated sql! use declarations
with #[cfg(any(feature = "sqlite", feature = "postgres"))] guards in
zeph-scheduler and zeph-orchestration. Remove the import entirely where
it was unused at module level; move it inside #[cfg(test)] in
scheduler.rs where sql! is only used in tests. Closes #4841.

Note: #4779 (#[non_exhaustive] sweep for 18 pub enums) was already
resolved in PR #4759 (commit 88c8179) and is not part of this branch.
@bug-ops bug-ops force-pushed the 4779-api-hygiene-cleanup branch from fdf7d9e to b0f7f04 Compare June 5, 2026 20:28
@bug-ops bug-ops merged commit 3149cfa into main Jun 5, 2026
32 checks passed
@bug-ops bug-ops deleted the 4779-api-hygiene-cleanup branch June 5, 2026 20:35
@bug-ops bug-ops mentioned this pull request Jun 5, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate refactor Code refactoring without functional changes rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

1 participant