Skip to content

cut: apply the review round's report-only cut-list - #125

Merged
CMGS merged 2 commits into
mainfrom
cut/test-dedup-and-small-cuts
Sep 23, 2026
Merged

CMGS merged 2 commits into
mainfrom
cut/test-dedup-and-small-cuts

Conversation

@CMGS

@CMGS CMGS commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #124. The report-only cut-list from #123's review round, applied and nothing else.

Commit Cut Lines
test: shared helpers four inline batch poll loops in e2e.rs → wait_batch; BatchItem (13) and BatchItemResult (5) test literals in the handler and store suites → item() / result(); body_json from compat.rs, live_path.rs and e2e.rs → one copy in tests/common; the three serial timing loops and percentile closures in bench.rs → serial() and pct() tests +108 −253 (net −145)
cut: mock text borrows; cache entry omits absent fields two to_owned() on a &str the mock reply only reads; response_v2 and common_usage gain skip_serializing_if, so a cached GatewayResponse no longer writes two nulls (a missing key reads back as None, so entries written before this change still load) prod +2 −5

No behaviour changes: the tests assert what they asserted, the bench prints what it printed, the mock answers what it answered.

Verification

  • Every commit verified on its own: both commits, exported fresh (git archive | tar -m), pass cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace: 679 passed, 0 failed each (the count is unchanged, as a cut should leave it).
  • Linux: a rust:1 linux/arm64 container with rustc 1.98.0: fmt ✓, clippy ✓, 679 passed, 0 failed, 4 ignored.
  • Hygiene ledger: style, judge, comments and loc lenses at 0 due over 102 files and 12 flows; the loc notes that carried this cut-list are closed.
  • No bench and no live run: the production change is two fewer copies inside the mock transport and two omitted nulls in a cache entry; neither is on a served request's path.

Size

Production code +1 net (the two serde attribute lines less the mock's dropped copy); tests −145 net. Comment lines in *.rs: 0 added, 0 removed. Whole-repo non-blank production Rust 26146 → 26147, comment density 8.75% unchanged. The hot path is untouched: the mock transport serves only tests and the in-process bench, and a cache write serializes two fewer bytes-worth of null.

@CMGS
CMGS force-pushed the fix/upstream-contract-followups branch from ed42632 to 600c6c6 Compare September 23, 2026 12:04
@CMGS
CMGS changed the base branch from fix/upstream-contract-followups to main September 23, 2026 12:54
… share helpers

Four inline batch poll loops in the e2e suite use wait_batch; the
BatchItem and BatchItemResult test literals in the handler and store
suites use item() and result(); compat.rs, live_path.rs and e2e.rs read
one body_json from the shared test module; bench.rs measures its three
serial runs through one timing loop and one percentile function.
…sage fields

Two mock reply builders copied a &str they only read; response_v2 and
common_usage wrote null into every cached entry where the sibling
Option fields are skipped.
@CMGS
CMGS force-pushed the cut/test-dedup-and-small-cuts branch from bc4230f to 8e123d0 Compare September 23, 2026 12:54
@CMGS
CMGS merged commit 808227d into main Sep 23, 2026
2 checks passed
@CMGS
CMGS deleted the cut/test-dedup-and-small-cuts branch September 23, 2026 13:21
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