wave2-polish: tests, CI, and formatting#1
Merged
Merged
Conversation
- Apply cargo fmt across all source files (no logic changes) - Add 18 unit tests covering pure logic: endpoint URL/body construction, Ollama and llama.cpp stream-line parsing, timing parsing (incl. ms->ns conversion and invalid-input defaults), and mean/std statistics - Add GitHub Actions CI workflow (fmt check + clippy -D warnings + build + test) - Document development/test workflow in README Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Independent verification: VERDICT = solidRe-cloned Build & checks (independently reproduced):
Diff review:
No overclaims. The PR body's 'Not verified' section (CI not executed, networked benchmarking not exercised) is accurate and appropriately scoped. Nit (non-blocking): PR prose writes the clippy invocation as Ready to merge. |
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.
Polish-to-completion pass on inference-bench.
Summary
cargo fmtacross all source files. No logic changes, purely whitespace/line-wrapping normalization.Endpoint::generate_urlper endpoint kind (Ollama / FastFlowLM / llama.cpp)Endpoint::build_bodyrequest-shape correctness for both API familiesparse_ollama_stream_line— token, done flag, invalid-JSON -> Noneparse_llamacpp_stream_line— SSE token,[DONE]marker, stop flag, non-data:lines -> Noneparse_ollama_timings/parse_llamacpp_timings— field extraction, ms->ns conversion, invalid/missing input falls back to defaultsmetrics::mean_std— empty, single-sample, identical-values, and a known-value case checked against the textbook sample std (n-1 denominator).github/workflows/ci.yml— runscargo fmt --check,cargo clippy --all-targets -D warnings,cargo build, andcargo teston push tomasterand on every PR. Usesdtolnay/rust-toolchain@stable+ cargo cache.What was finished
Nothing was a broken/incomplete stub — the existing code already built cleanly with no clippy warnings and no
todo!()/unimplemented!()/FIXME markers. The gaps were the complete absence of tests and CI, plus unformatted code. Those are now filled.Verified on this machine (cargo 1.95.0, rustc 1.95.0)
cargo buildandcargo build --release— PASScargo test— PASS (18/18)cargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleanNot verified
TODOs left
🤖 Generated with Claude Code