Skip to content

Move Reply and ToolCall fields by value in harness-gateway-client - #92

Merged
vinniefalco merged 1 commit into
cppalliance:masterfrom
vinniefalco:master
Dec 2, 2026
Merged

vinniefalco merged 1 commit into
cppalliance:masterfrom
vinniefalco:master

Conversation

@vinniefalco

@vinniefalco vinniefalco commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Pin gateway-client to 46ead80f5f2f16677a6a4d6530d9e37271bebfff (Make Reply and ToolCall fields public for zero-clone ownership transfer gateway-client#5).
  • Change into_engine_reply in crates/harness-gateway-client/src/convert.rs to take Reply by value and destructure it, moving outcome, model, finish_reason, reasoning, request, response, and each ToolCall's id, name, and arguments directly into Completion and RawExchange with zero clones.
  • Update call sites in crates/harness-gateway-client/src/broker.rs and crates/harness-gateway-client/src/convert-tests-reply.rs.

Verification

  • cargo fmt --all --check
  • CARGO_BUILD_WARNINGS=deny cargo clippy -p harness-gateway-client --all-targets --all-features
  • cargo nextest run -p harness-gateway-client (42/42 passed, 2 skipped)
  • RUSTDOCFLAGS="-D warnings" cargo doc -p harness-gateway-client --no-deps --all-features
  • cargo deny check

Summary by CodeRabbit

  • Chores
    • Updated the pinned revision of the gateway integration dependency.
    • No user-facing behavior changes are described in this update.

Update `gateway-client` in `Cargo.toml` and `Cargo.lock` to `46ead80f5f2f16677a6a4d6530d9e37271bebfff` and change `into_engine_reply` in `crates/harness-gateway-client/src/convert.rs` to take `Reply` by value. Destructure `Reply` and move `outcome`, `model`, `finish_reason`, `reasoning`, `request`, `response`, and each `ToolCall` field directly into `Completion` and `RawExchange` without cloning.

- Update the call sites in `crates/harness-gateway-client/src/broker.rs` and `crates/harness-gateway-client/src/convert-tests-reply.rs` to pass `Reply` by value.
- `diagnostics` still runs each line through `bound_diagnostic` so diagnostics stay bounded and control-escaped.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The gateway dependency revision changes. into_engine_reply now consumes an owned Reply and moves its values into the completion and raw exchange. The broker and conversion tests pass owned replies to the function.

Changes: Owned reply conversion

Layer / File(s) Summary
Dependency pin and reply conversion
Cargo.toml, crates/harness-gateway-client/src/convert.rs
The gateway-client revision changes. into_engine_reply consumes and destructures Reply, moving values into the completion and raw exchange instead of cloning them.
Owned reply call sites
crates/harness-gateway-client/src/broker.rs, crates/harness-gateway-client/src/convert-tests-reply.rs
The broker and conversion tests pass owned replies to into_engine_reply.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: Minimal · up to a738c · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says Reply and ToolCall fields are moved by value in harness-gateway-client. The changeset changes into_engine_reply to take Reply by value, destructures it, and moves its fields, including …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says Reply and ToolCall fields are moved by value in harness-gateway-client. The changeset changes into_engine_reply to take Reply by value, destructures it, and moves its fields, including ToolCall id, name, and arguments, instead of cloning. It also updates the call sites in broker.rs and convert-tests-reply.rs. The title matches the main change and stays specific to the crate.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 175d331f-3976-4186-8bc6-f8aeb3bf8c0c
Commits

Reviewing files that changed from the base of the PR and between 9304324 and a738c13.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 4

  • Cargo.toml
  • crates/harness-gateway-client/src/broker.rs
  • crates/harness-gateway-client/src/convert-tests-reply.rs
  • crates/harness-gateway-client/src/convert.rs

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@vinniefalco
vinniefalco merged commit a738c13 into cppalliance:master Dec 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant