Skip to content

chore(core): name --kv-bits in the bits validation error instead of the internal struct #1629

Closed

Description

@agatha197

Summary

The --kv-bits validation error message leaks the internal config struct name instead of naming the CLI flag, unlike every other arm in the same match.

Background

src/lib/mlxcel-core/src/cache/batch_quant.rs:325-328 reads:

"BatchKvQuantConfig: bits must be non-negative (got {})"

while the very next arm at lines 331-334 correctly says:

"--kv-group-size must be positive, got {}"

The remaining arms in the same match (verified around lines 340-360) all use flag spellings with the , got {} punctuation.

Proposed Solution

Change the one format string to name --kv-bits and match the surrounding , got {} style.

Implementation Notes

  • Pure string edit, no logic change.

Acceptance Criteria

  • The bits-validation error names --kv-bits and follows the same punctuation as the sibling arms.
  • Tests pass.

Original Suggestion

Title: chore(core): --kv-bits validation error names an internal struct instead of the flag

The --kv-bits validation error message leaks the internal config struct name instead of naming the CLI flag, unlike every other arm in the same match.

Evidence

src/lib/mlxcel-core/src/cache/batch_quant.rs:325-328 reads:

"BatchKvQuantConfig: bits must be non-negative (got {})"

while the very next arm at lines 331-334 correctly says:

"--kv-group-size must be positive, got {}"

and the remaining arms in the same match (lines 347-360) all use flag spellings with the , got {} punctuation.

Suggested fix

Change the one format string to name --kv-bits and match the surrounding , got {} style. Pure string edit, no logic change.

Acceptance criteria

  • The bits-validation error names --kv-bits and follows the same punctuation as the sibling arms
  • Tests pass

Activity

  1. changed the title [-]chore(core): --kv-bits validation error names an internal struct instead of the flag[/-] [+]chore(core): name --kv-bits in the bits validation error instead of the internal struct[/+] on Sep 4, 2026
  2. added 3 commits that reference this issue on Sep 5, 2026
    abe9a55
    9bef3f2
    05732c3
  3. added and removed on Sep 6, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions