Cosmetic: unify family-wrapper stdout key order (json! -> to_json), deferred from #73 #99
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deferred from #73 (cosmetic sub-item). Family-wrapped stdout lines for
aura sweep/mc/walkforwardemit the embeddedRunReportviaserde_json::json!({ "family_id": …, "report": report }), which routes the reportthrough a
serde_json::Valuewhose object keys are alphabetical (leadingbroker). The standalone render paths (runs family, the retiredruns list) useRunReport::to_json()— declaration order (leadingcommit), matching thestored
families.jsonl.Unify the family-wrapper lines to declaration order. NOT a trivial swap: embedding
report.to_json()(a String) insidejson!double-encodes it, and aValuere-alphabetizes. The fix is manual JSON construction at the 3 sites
(
main.rssweep / walkforward / mc wrapperprintln!s), e.g.format!(r#"{{"family_id":{},"report":{}}}"#, serde_json::to_string(&id)?, report.to_json()).Pure presentation — both forms are valid JSON, round-trip unaffected, the stored
families.jsonlalready uses declaration order. The existing wrapper tests assertvia
.contains(...)(no key-order pin), so a new test must pin the leading key.context: split from #73's retire to keep that change focused and low-risk.