Design: Integer/Short Dubbo string parameter conversion (#3659)
- Proposal Issue: 4722
Design: Integer/Short Dubbo string parameters
Tracking issue: higress-group/higress#3659. Target: higress-group/envoy, envoy-1.36, baseline 9bd2ded786073d115beb71d0f2ca0afc075e4f4d.
Minimal implementation
Extend only the integer branch of contrib/http_dubbo_transcoder/filters/http/source/utility.cc for exact java.lang.Integer and java.lang.Short wrapper names. Reuse Long lexical validation and JSON numeric representation. Preserve Boolean/float/string/array/unknown and Long behavior. Exclude unrelated formatting/test changes from the old prototype.
Keep original paramType in the generic invocation request: JSON numeric representation is not overload identity. Do not relabel wrapper signatures as Long.
Use the original request's provider-side narrowing policy, not a new gateway range validator. Test wrapper boundaries and characterize outside-wrapper-range behavior honestly. Existing parser overflow/string-view behavior is not silently changed here. Float, Date, Set and BigDecimal are out of this increment; do not claim floating-point conversion preserves arbitrary decimal precision or auto-close #3659.
Verification Plan
- Utility tests: positive/negative/zero/min/max Integer/Short; empty, whitespace, fractions, trailing text, malformed signs; legacy types and unsupported type behavior.
- Transcoder tests: actual QUERY/HEADER/PATH configuration and extraction, not only helper calls. Assert generic invocation preserves Java type names; use exact existing Bazel target labels after inspection.
- Runtime: pinned Java/Dubbo provider with Integer, Short and Long methods/overloads returning method identity/value. Run baseline and fixed Envoy with identical Http2Rpc configuration. Baseline must reject Integer/Short; fixed must call the intended method and return the exact expected value; Long still passes.
- Characterize selected values outside wrapper range without advertising range-safety. A type/signature mismatch fails validation.
- Record exact Envoy SHAs, build commands/toolchain, Java/Dubbo versions, binary/image hashes, config/requests, provider/client/gateway logs and machine assertions. Repeat deterministic cases; publish sanitized evidence and verify cleanup. Build failures are blockers, not passes.
Execution and boundary
After explicit Proposal/Design approval, one non-Coordinator worker owns implementation/tests; an independent reviewer checks exact base/head and all P0/P1 are repaired/rechecked. No implementation worker is authorized yet. Gateway release/image/submodule updates and merge are not part of this phase.
Source: higress-group/higress