Review 2026-12-02 Phase 6: Client fixes across all five clients #257

Closed
opened 2026-12-02 16:07:40 -05:00 by dohertj2 · 2 comments
Owner

Phase 6 — Clients (p2)

Each item is applied to every affected client in one change, so the five clients stay in step. Run each client's verification from the CLAUDE.md table.

# Finding(s) Change
6.1 CDN-004, CGO-001, CRS-001, CJV-003, CPY-002 Default HTTP/2 keepalive (for example 30 s ping, 10 s timeout, permit without calls), configurable in the options. It must match the server's 2.4 policy so the server doesn't send GOAWAY for too many pings.
6.2 CDN-001, CDN-002, CGO-003, CJV-004, CPY-001, CPY-003 Error mapping: a server-sent Cancelled is not caller cancellation, NotFound/FailedPrecondition on a session becomes the session-lost error, stream errors go through typed mapping, unknown enum values fall back to a number, and the status code is preserved.
6.3 CDN-008, CGO-007, CJV-006, CPY-004 A missing reply payload raises a protocol error instead of returning handle 0.
6.4 CDN-003, CDN-005, CDN-006, CJV-001, CJV-005, CGO-004, CGO-006 Stream and channel lifecycle: dispose cancels any in-flight read first, close() → shutdownNow() + await, an interrupt cancels the RPC, the stream ctx is cancelled on EOF, channel close order is fixed, and the owned handler and cert are disposed.
6.5 CRS-002, CRS-003, CDN-010, CGO-002 Secret hygiene: scrub all error variants, redact the tonic::Status Display/Debug, redact --value only as a whole token, and attach the API key per call so a caller interceptor can't drop it.
6.6 CDN-011, CGO-008, CRS-004, CPY-005, CDN-009 CLI batch mode reuses one channel. Streaming commands are exempt from the 30 s global timeout. bench-read-bulk backs off on failure.
6.7 CJV-002, CJV-007, CDN-007, CGO-005, CPY-006 Java Galaxy client honours lenient TLS. Correlation ids use a non-blocking RNG. Don't retry ResourceExhausted. dialConnected returns the real cause. Python smoke attaches the stream before advising.

Verify: dotnet slnx build + tests; Go gofmt/go test ./...; Rust fmt/clippy -D warnings/test; Python pytest (keep the generated code on the grpcio 1.80 pin); Java JAVA_HOME=/opt/homebrew/opt/openjdk@17 gradle test, then revert the generated-proto churn. Finish with the cross-language e2e matrix against windev.


Source: code-reviews/2026-12-02-perf-bugs/README.md and code-reviews/2026-12-02-perf-bugs/PLAN.md (commit f200bda6 on local branch docs/review-2026-12-02-perf-bugs, not yet pushed). Reviewed at 54367e74.

## Phase 6 — Clients (p2) Each item is applied to every affected client in one change, so the five clients stay in step. Run each client's verification from the CLAUDE.md table. | # | Finding(s) | Change | |---|---|---| | 6.1 | CDN-004, CGO-001, CRS-001, CJV-003, CPY-002 | Default HTTP/2 keepalive (for example 30 s ping, 10 s timeout, permit without calls), configurable in the options. It must match the server's 2.4 policy so the server doesn't send GOAWAY for too many pings. | | 6.2 | CDN-001, CDN-002, CGO-003, CJV-004, CPY-001, CPY-003 | Error mapping: a server-sent `Cancelled` is not caller cancellation, `NotFound`/`FailedPrecondition` on a session becomes the session-lost error, stream errors go through typed mapping, unknown enum values fall back to a number, and the status code is preserved. | | 6.3 | CDN-008, CGO-007, CJV-006, CPY-004 | A missing reply payload raises a protocol error instead of returning handle 0. | | 6.4 | CDN-003, CDN-005, CDN-006, CJV-001, CJV-005, CGO-004, CGO-006 | Stream and channel lifecycle: dispose cancels any in-flight read first, `close()` → `shutdownNow()` + await, an interrupt cancels the RPC, the stream ctx is cancelled on EOF, channel close order is fixed, and the owned handler and cert are disposed. | | 6.5 | CRS-002, CRS-003, CDN-010, CGO-002 | Secret hygiene: scrub all error variants, redact the `tonic::Status` Display/Debug, redact `--value` only as a whole token, and attach the API key per call so a caller interceptor can't drop it. | | 6.6 | CDN-011, CGO-008, CRS-004, CPY-005, CDN-009 | CLI batch mode reuses one channel. Streaming commands are exempt from the 30 s global timeout. `bench-read-bulk` backs off on failure. | | 6.7 | CJV-002, CJV-007, CDN-007, CGO-005, CPY-006 | Java Galaxy client honours lenient TLS. Correlation ids use a non-blocking RNG. Don't retry `ResourceExhausted`. `dialConnected` returns the real cause. Python `smoke` attaches the stream before advising. | **Verify:** dotnet `slnx` build + tests; Go `gofmt`/`go test ./...`; Rust `fmt`/`clippy -D warnings`/`test`; Python `pytest` (keep the generated code on the grpcio 1.80 pin); Java `JAVA_HOME=/opt/homebrew/opt/openjdk@17 gradle test`, then revert the generated-proto churn. Finish with the cross-language e2e matrix against windev. --- Source: `code-reviews/2026-12-02-perf-bugs/README.md` and `code-reviews/2026-12-02-perf-bugs/PLAN.md` (commit `f200bda6` on local branch `docs/review-2026-12-02-perf-bugs`, not yet pushed). Reviewed at `54367e74`.
Author
Owner

Decision (2026-12-03, recorded as D7 in code-reviews/2026-12-02-perf-bugs/PLAN.md): client keepalive defaults: 30 s ping, 10 s timeout, also while no call is active, configurable in each client's options; must stay within the server policy in #253.

Decision (2026-12-03, recorded as D7 in `code-reviews/2026-12-02-perf-bugs/PLAN.md`): client keepalive defaults: 30 s ping, 10 s timeout, also while no call is active, configurable in each client's options; must stay within the server policy in #253.
Author
Owner

Merged to main at 68043411 (pushed 2026-12-03). Gateway suite 1610 passed / 0 failed (macOS); windev worker CI 836 passed / 0 failed on that SHA.

All CDN/CGO/CRS/CJV/CPY findings fixed. Keepalive 30 s / 10 s / idle pings in all five clients. Behaviour changes: Java close() → shutdownNow() (graceful: closeAndAwaitTermination()); .NET gateway-sent cancel raises MxGatewayException. Java CLI batch channel reuse split out to #260. Cross-language e2e matrix not yet run.

Merged to `main` at `68043411` (pushed 2026-12-03). Gateway suite 1610 passed / 0 failed (macOS); windev worker CI 836 passed / 0 failed on that SHA. All CDN/CGO/CRS/CJV/CPY findings fixed. Keepalive 30 s / 10 s / idle pings in all five clients. Behaviour changes: Java `close()` → `shutdownNow()` (graceful: `closeAndAwaitTermination()`); .NET gateway-sent cancel raises `MxGatewayException`. Java CLI batch channel reuse split out to #260. Cross-language e2e matrix not yet run.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/mxaccessgw#257