Skip to content

bug: Helm --set mangles Discord channel IDs (float64 precision loss) #43

@thepagent

Description

@thepagent

Problem

When installing via Helm with --set discord.allowedChannels[0]="<CHANNEL_ID>", the channel ID gets treated as a number and converted to float64, losing precision:

# Expected
allowed_channels = ["1234567890123456789"]

# Actual
allowed_channels = ["1.2345678901234568e+18"]

This causes agent-broker to silently ignore all messages because the channel ID never matches.

Root Cause

Discord Snowflake IDs are 19-digit integers (> 2^53). Helm --set parses them as float64, which only has ~15 digits of precision. The ID gets rounded and rendered in scientific notation.

Workaround

Use --set-string instead:

helm install agent-broker agent-broker/agent-broker \
  --set-string discord.allowedChannels[0]="<YOUR_CHANNEL_ID>"

Suggested Fix

  1. Add a note in the chart README / NOTES.txt warning about --set-string for channel IDs
  2. Consider adding a validation in the configmap template to detect scientific notation in channel IDs and fail early

Metadata

Metadata

Assignees

No one assigned

    Labels

    p1High — address this sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions