Skip to content

Preserve integer driver settings when converting protobuf configuration #5106

Description

@shiju-nv

User Story

I configure OpenShell compute drivers with integer settings, such as a process limit of 512. I need valid values to reach the driver with their integer meaning intact after protobuf conversion.

Problem Statement

Protobuf Struct stores numbers as floating-point values. The current conversion to JSON leaves whole numbers in floating-point form, so a driver's typed integer fields can reject valid settings.

Non-finite numeric input, such as infinity or NaN, is converted to null. That can silently clear an optional field.

Impact / Why This Matters

A valid integer setting can prevent a driver from starting. Invalid numeric input can also remove an optional limit without an explicit error.

Exactly represented whole numbers should decode as integers where the typed configuration expects them. Fractional input for integer settings and non-finite protobuf input should fail clearly rather than being rounded or silently changed.

Acceptance Criteria

  • Exactly represented integral values decode into the appropriate typed integer fields.
  • Fractional values are not rounded into integer options, and non-finite input is rejected.
  • Nested objects/lists and integer boundaries are handled without changing the general-purpose JSON conversion.

Reproduction Steps

  1. Configure an OpenShell compute driver with a valid integer option, for example a Podman compute-driver configuration fragment {"sandbox_pids_limit": 512}; retain the other required driver fields.
  2. Send that configuration through the gateway/extension protobuf Struct configuration path into the driver factory.
  3. Compare typed decoding with decoding the equivalent integer JSON directly. The Struct path should accept the same exactly represented integer.
  4. Repeat with a fractional value for the integer option and with a non-finite raw protobuf numeric value. Both must be rejected explicitly rather than rounded or converted to null.

Suggested UX (if applicable)

The configuration fragment {"sandbox_pids_limit": 512} should retain its integer meaning through protobuf transport. A fractional value such as 512.5 for that integer option should produce a field-specific configuration error. Non-finite protobuf input should fail conversion rather than silently clearing an optional field.

Environment

  • OpenShell source assessed: 42671c2dd2c02b744850e0bda72b99d5509969c1.
  • Integration: protobuf Struct configuration received by a compute-driver factory and decoded into typed options.
  • Example option: Podman compute-driver sandbox_pids_limit, an integer field.

Logs

Activity

  1. added theissue type on Nov 2, 2026
  2. added a commit that references this issue on Nov 2, 2026
    c80a053
  3. changed the title [-]fix(core): preserve integers in typed protobuf configuration[/-] [+]Preserve integer driver settings when converting protobuf configuration[/+] on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions