BlueGit

ict rusty-teams

fix(chatsvc): answer diagnostics list keys sorted regardless of serde_json preserve_order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-12 · 7 weeks ago

Hash
56685a1619ee297a82ef1b0b366ecb5eb200ac30
Parent
fa4fc118
1 file changed +2 −1
crates/chatsvc/src/pins/chats.rs +2 −1
@@ -120,7 +120,8 @@ pub(super) fn ensure_success(answer: &ApiResponse) -> Result<()> {
120 120 pub(super) fn describe_answer(answer: &ApiResponse) -> String {
121 121 let shape = match &answer.body {
122 122 Value::Object(fields) => {
123 let keys: Vec<&str> = fields.keys().map(String::as_str).collect();
123 let mut keys: Vec<&str> = fields.keys().map(String::as_str).collect();
124 keys.sort_unstable();
124 125 format!("object with keys [{}]", keys.join(", "))
125 126 }
126 127 Value::Array(items) => format!("array of {} items", items.len()),
@@ -120,7 +120,8 @@ pub(super) fn ensure_success(answer: &ApiResponse) -> Result<()> {
120pub(super) fn describe_answer(answer: &ApiResponse) -> String {
120pub(super) fn describe_answer(answer: &ApiResponse) -> String {
121 let shape = match &answer.body {
121 let shape = match &answer.body {
122 Value::Object(fields) => {
122 Value::Object(fields) => {
123 let keys: Vec<&str> = fields.keys().map(String::as_str).collect();
123 let mut keys: Vec<&str> = fields.keys().map(String::as_str).collect();
124 keys.sort_unstable();
124 format!("object with keys [{}]", keys.join(", "))
125 format!("object with keys [{}]", keys.join(", "))
125 }
126 }
126 Value::Array(items) => format!("array of {} items", items.len()),
127 Value::Array(items) => format!("array of {} items", items.len()),