Skip to content

fix(core,agent-tools): fix blocking I/O in load_instructions and add unit tests#3854

Merged
bug-ops merged 1 commit into
mainfrom
3829-3836-blocking-io-agent-tools-tests
May 13, 2026
Merged

fix(core,agent-tools): fix blocking I/O in load_instructions and add unit tests#3854
bug-ops merged 1 commit into
mainfrom
3829-3836-blocking-io-agent-tools-tests

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Test plan

  • cargo nextest run -p zeph-core --lib — 1418 pass
  • cargo nextest run -p zeph-agent-tools --lib — 29 pass
  • cargo nextest run --workspace --lib --bins — 9304 pass
  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace -- -D warnings — clean

Closes #3829
Closes #3836

@github-actions github-actions Bot added rust Rust code changes core zeph-core crate bug Something isn't working size/L Large PR (201-500 lines) labels May 13, 2026
…unit tests

Wrap `load_instructions` with a `load_instructions_async` shim that runs the
synchronous filesystem I/O on Tokio's blocking thread pool via spawn_blocking.
Update the two async call sites (runner.rs startup and agent/mod.rs hot-reload
watcher) to await the async variant. The sync function is preserved unchanged
for the remaining non-async call site in provider_cmd.rs. JoinError from
spawn_blocking is now logged via tracing::error instead of silently swallowed.

Add 25 unit tests to zeph-agent-tools covering previously untested modules:
channel.rs (11 tests: ToolEventStart/ToolEventOutput construction and Copy
semantics, ChannelSinkError Display), error.rs (8 tests: ToolDispatchError
variants, Display and From conversions), doom_loop.rs (7 tests: hash
determinism, tool_use normalization, unclosed brackets, multi-marker
sequences, passthrough). Crate test count grows from 4 to 29.

Closes #3829
Closes #3836
@bug-ops bug-ops enabled auto-merge (squash) May 13, 2026 11:37
@bug-ops bug-ops force-pushed the 3829-3836-blocking-io-agent-tools-tests branch from 3d4ab64 to d1deb3a Compare May 13, 2026 11:37
@bug-ops bug-ops merged commit c16c4dc into main May 13, 2026
32 checks passed
@bug-ops bug-ops deleted the 3829-3836-blocking-io-agent-tools-tests branch May 13, 2026 11:45
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 rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

1 participant