fix(classifiers,core): sha2 0.11 hex format + catch_unwind for RuntimeLayer hooks#2405
Merged
fix(classifiers,core): sha2 0.11 hex format + catch_unwind for RuntimeLayer hooks#2405
Conversation
…eLayer hooks (#2401, #2363) - Replace format!("{:x}", hasher.finalize()) with hex::encode() in classifier/mod.rs; sha2 0.11 returns hybrid_array::Array which does not implement LowerHex (#2401) - Add hex as optional workspace dep gated under classifiers feature in zeph-llm - Bump deps: sha2 0.10→0.11, ordered-float 5.1→5.3, proptest 1.10→1.11, toml 1.0→1.1, uuid 1.22→1.23 - Wrap all four RuntimeLayer hook call sites (before_chat, after_chat, before_tool, after_tool) with AssertUnwindSafe + FutureExt::catch_unwind; panicking external hooks log a warning and do not crash the agent turn (#2363)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
format!("{:x}", hasher.finalize())withhex::encode()inclassifier/mod.rs; sha2 0.11 returnshybrid_array::Array<u8, N>which does not implementLowerHex(fix(classifiers): sha2 0.11 breaks {:x} formatting — finalize() return type no longer implements LowerHex #2401)RuntimeLayerhook call sites withAssertUnwindSafe + FutureExt::catch_unwind; panicking external hooks log a warning and do not crash the agent turn (feat(core): add catch_unwind guard for external RuntimeLayer hook implementations #2363)Test plan
cargo +nightly fmt --check— passcargo clippy --features full --workspace -- -D warnings— pass, 0 warningscargo nextest run --features full --workspace --lib --bins— 7258/7258 passed--features full,classifiers{:x}byte-for-byteCloses #2401
Closes #2363