Repository navigation
refactor(core): reorder functions and tests top-down by behavior - #1225
Merged
Merged
Conversation
Pure code move across crates/ox-core with zero behavior changes: - Order production functions top-down from callers to callees and align match arms with enum declaration order. - Group test helpers at the top of each test module and order tests by behavior in execution order, placing normal cases before edge and error cases.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Pure function and test reordering across
crates/ox-corewith zero behavior changes (27 files, +2544/-2544 lines):client.rs,tools/bash.rs,attachments.rs,compaction.rs,agent.rs,agent/turn.rs,memory.rs), moved retry/timeout constants to the top of the HTTP/retry section inclient.rs, and alignedAttachmentPolicyandMemoryModematch arms with their enum declaration order.attachments.rs,compaction/tests.rs,config/loader.rs,plugin/tests.rs,prompt.rs,subagent.rs,agent/tests/{core,hooks,session,steering}.rs,client/{google.rs,tests.rs},hooks/tests.rs,skills.rs,session/tests.rs,fs.rs,message.rs,tools/{edit,read}.rs,catalog.rs, andtests/live.rs.Test plan
nix develop -c run-hooks(all hooks includingrustfmt,clippy, andcspellpassed)cargo test -p ox-core(286 unit tests and 2plugin_subprocessintegration tests passed; 4 opt-inlivetests ignored as expected)