Unify RunReport JSON: retire hand-rolled to_json, render stdout via serde (stdout↔disk shape divergence) #54
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?
Since cycle 0029 (#33), one
RunReporthas two divergent JSON encoders:serde_json) — used byaura-registryfor the on-disk store(
runs/runs.jsonl). serde's natural shape:paramsas an array-of-pairs(
[["sma_cross.fast",2.0],…]), floats as2.0.to_json(crates/aura-engine/src/report.rs:80) — used forall stdout (
aura run/aura sweep/aura runs list/aura runs rank).Shape:
paramsas an object ({"sma_cross.fast":2,…}), whole floats as2.So the same record is a structurally different JSON document on disk vs. on the
wire, and no test pins their relationship. This was a deliberate, named
deferral in the 0029 spec (§Architecture "C16 amendment" + Out of scope:
"the
aura run/aura sweepstdout→serde unification"): keepingto_jsonforstdout avoided churning the
aura run/aura sweepgoldens while the registryadopted serde for its typed read-path.
The fix: retire the hand-rolled
to_jsonand render stdout via serde too(one shape for stored and printed records), updating the
aura run/aura sweep/aura runsgoldens to serde's shape. This also removes the last hand-rolled JSONwriter, consistent with the amended C16 (don't hand-roll what a vetted standard
crate does).
depends on: nothing (serde already in the workspace since 0029)
context: deferred from cycle 0029 to keep stdout goldens stable that cycle