Skip to content

test: unblock cargo --tests build (SamplingConfig + format string drift)#1086

Merged
joelteply merged 1 commit into
canaryfrom
fix/test-build-canary-drift
May 11, 2026
Merged

test: unblock cargo --tests build (SamplingConfig + format string drift)#1086
joelteply merged 1 commit into
canaryfrom
fix/test-build-canary-drift

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

Three pre-existing canary breakages blocked the broader `cargo --tests` build path. These were flagged as out-of-scope in PR #1082's "Known gaps"; cleared here so the integration test build stays compilable going forward (and so regressions in any test file can land in CI signal instead of being masked behind "build broken" silence).

  • `llamacpp_metal_throughput.rs` / `qwen35_live_pipeline_diff.rs`: backend `.generate(...)` signature took `temperature: f64` until the `SamplingConfig` refactor; tests still passed `0.0` / `0.7`. Updated to `SamplingConfig` literal (qwen35: explicit greedy, no repeat_penalty so output matches the bare-decode reference) and `SamplingConfig::chat()` (throughput: matches what live chat traffic uses).
  • `persona_prompt_token_diagnostic.rs`: format string `"Model GGUF not present at {model_path()}"` uses Rust 2024 captured-identifier syntax which doesn't allow function calls — emits "expected `}`, found `(`" at compile time. Bound to a local + use positional `{}` with `path.display()`.

Validation class

  • Contract TDD: n/a — test-only diff, no production behavior changes.
  • Failure TDD: n/a — same as above.
  • Performance/Resource/Residency VDD: n/a.
  • Browser/UX evidence: precommit browser ping passed.
  • Platform coverage: Mac M5 Pro Metal, `cargo build --features metal,accelerate --tests` clean.

Validation

  • `cargo build --features metal,accelerate --tests` — clean, no errors (was 3 distinct errors before).
  • `cargo test --lib --features metal,accelerate` — unchanged (pre-push gate).
  • Precommit hook: TypeScript clean; browser-ping precommit test passed.

Scope discipline

This is a test-fixture-only cleanup — three files, all under `tests/`. No production source touched. Cleared from PR #1082's Known-Gaps list.

Three pre-existing canary breakages in integration tests blocked the
broader cargo --tests build, hiding any other regression that might
land. Fixes are mechanical and isolated to test fixtures:

- llamacpp_metal_throughput.rs / qwen35_live_pipeline_diff.rs: backend
  .generate(...) signature took `temperature: f64` until the SamplingConfig
  refactor; tests still passed `0.0` / `0.7`. Updated to SamplingConfig
  literal (qwen35: explicit greedy, no repeat_penalty so output matches
  the bare-decode reference) and SamplingConfig::chat() (throughput:
  matches what live chat traffic uses).

- persona_prompt_token_diagnostic.rs: format string `"{model_path()}"`
  uses Rust 2024 captured-identifier syntax which doesn't allow function
  calls — emits "expected `}`, found `(`" at compile time. Bound to a
  local + use positional `{}` with `path.display()`.

Same scope as the test-fixture follow-up in 98a6c91 (other_persona_names
field add). Was flagged as out-of-scope in PR #1082's "Known gaps" — now
it can come off that list. Pre-push hook still passes (cargo test --lib
unaffected; this only restores `cargo build --tests` and `cargo test
<integration>`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joelteply joelteply merged commit d2dc3a8 into canary May 11, 2026
3 checks passed
@joelteply joelteply deleted the fix/test-build-canary-drift branch May 11, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant