fix(prompt): parse JSON floats exactly (serde_json float_roundtrip)
The Python-compatible `tojson` renderer (control-plane/src/prompt.rs, also compiled into leleka-runtime) must reproduce json.dumps(json.loads(x)). Without serde_json's float_roundtrip feature the default float parser is not correctly rounded: 123456789012345680000.0 rendered as 1.2345678901234567e+20 instead of Python's 1.2345678901234568e+20. The test only passed in whole-workspace builds where leleka-context's dev-dependency happened to enable the feature; building leleka-runtime alone failed. Enable the feature on both consumers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
26d797f0fb
commit
75f2aa93dd
@@ -28,7 +28,7 @@ reqwest = { version = "0.13.5", default-features = false, features = ["rustls"]
|
||||
regex = "1.13.1"
|
||||
regex-syntax = "0.8.11"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||||
sha2 = "0.11"
|
||||
subtle = "2.6.1"
|
||||
tokio = { version = "1", features = ["fs", "io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
|
||||
|
||||
@@ -10,7 +10,7 @@ rust-version.workspace = true
|
||||
minijinja = { version = "=2.24.0", default-features = false, features = ["builtins", "macros", "multi_template", "adjacent_loop_items", "serde", "preserve_order", "loop_controls"] }
|
||||
minijinja-contrib = { version = "=2.24.0", default-features = false, features = ["pycompat"] }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
serde_json = { version = "1", features = ["float_roundtrip"] }
|
||||
sha2 = "0.11"
|
||||
leleka-backend-api = { path = "../backend-api" }
|
||||
leleka-tokenizer = { path = "../tokenizer" }
|
||||
|
||||
Reference in New Issue
Block a user