Skip to content

kvbm-config: workspace test run breaks figment f64 extraction via serde_json arbitrary_precision unification #296

@xiaguan

Description

@xiaguan

`cargo test --release --workspace --lib` (the documented unit-test command) fails on main:

test tests::test_profile_with_defaults_and_overlay ... FAILED
panicked at kvbm/kvbm-config/src/lib.rs:531:89:
InvalidType(Map, "f64") at path ["cache", "host", "cache_size_gb"]

Repro

cargo test --release -p kvbm-config --lib                       # green (63 passed)
cargo test --release -p kvbm-config -p pegainfer-server --lib   # red — same code

Cause

vllm-chat (git dep of pegainfer-server via vllm-server) enables serde_json/arbitrary_precision:

cargo tree -i serde_json -e features
├── serde_json feature "arbitrary_precision"
│   ├── vllm-chat v0.1.0 (github.com/vllm-project/vllm.git rev 4aaed4c)

Workspace feature unification turns it on for every serde_json user. Under arbitrary_precision, JSON numbers deserialize as an internal {"$serde_json::private::Number": "2.0"} map, so figment's Json::string(...) source hands kvbm-config a Map where cache_size_gb: Option<f64> expects a float (kvbm/kvbm-config/src/lib.rs:283 extract, :531 unwrap in test).

Verified on main 927c7c1; unrelated to any feature branch (single-package runs are green everywhere).

Acceptance

  • cargo test --release --workspace --lib green on main.
  • Either drop arbitrary_precision from the vendored vllm-chat (preferred — nothing in this workspace needs it), or make kvbm-config's figment path tolerant of Number-as-map.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions