Skip to content

VRP gRPC: server-side validation of routing problem inputs #1631

Description

@ramakrishnap-nv

Follow-up to #1597 (review nice-to-have #6). cpu_routing_problem::to_device validates capacity-dimension sizes but not cost/transit matrices or other array lengths. A malformed proto could pass sizes that data_model_view documents but does not hard-validate, risking out-of-bounds access on device.

Scope

  • Validate shapes/lengths in to_device (or the mapper) and return a clear INVALID_ARGUMENT instead of risking OOB:
    • cost/transit matrices == num_locations²
    • order arrays == num_orders; vehicle arrays == fleet_size
    • pickup/delivery index bounds, break/matching/precedence indices

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions