Skip to content

fix(context,plugins): deterministic compression order and async fs (#4558, #4560)#4578

Merged
bug-ops merged 1 commit into
mainfrom
4558-4560-async-fixes
May 28, 2026
Merged

fix(context,plugins): deterministic compression order and async fs (#4558, #4560)#4578
bug-ops merged 1 commit into
mainfrom
4558-4560-async-fixes

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Both fixes are minimal and targeted — no surrounding code was refactored.

Test plan

  • Two regression tests added for fix(context): to_compress built from HashSet iteration — non-deterministic LLM summarization order #4558: select_messages_for_compression_returns_chronological_order and select_messages_for_compression_excludes_pinned
  • select_messages_for_compression visibility bumped to pub(crate) to enable unit testing
  • cargo nextest run -p zeph-core -p zeph-plugins --lib — 1617 tests passed
  • cargo +nightly fmt --check — clean
  • cargo clippy -p zeph-core -p zeph-plugins -- -D warnings — clean
  • Rebased onto origin/main

Closes #4558
Closes #4560

…4558, #4560)

- zeph-core: sort indices before building to_compress in
  select_messages_for_compression; HashSet iteration was non-deterministic,
  causing variable message order in the compression LLM prompt (closes #4558)
- zeph-plugins: replace std::fs::write/read_to_string with tokio::fs
  equivalents in update_one_plugin to avoid blocking the Tokio thread pool
  during concurrent auto-update checks (closes #4560)

Regression tests added for the compression ordering fix.
@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/M Medium PR (51-200 lines) labels May 28, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 28, 2026 22:10
@bug-ops bug-ops merged commit 255e9e2 into main May 28, 2026
32 checks passed
@bug-ops bug-ops deleted the 4558-4560-async-fixes branch May 28, 2026 22:17
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/M Medium PR (51-200 lines)

Projects

None yet

1 participant