aura runs list/rank cannot read a pre-0047 runs.jsonl (typed-Scalar params migration left the flat store unmigrated; + exits 0 on parse error) #83

Closed
opened 2026-06-17 15:49:43 +02:00 by Brummel · 1 comment
Owner

Source: fieldtest milestone "The World, part II" — finding F5 (bug, milestone-close blocker).
See docs/specs/fieldtest-milestone-the-world-orchestration-families.md.

aura runs list / aura runs rank cannot read a runs.jsonl written before
cycle 0047.

Symptom (verbatim):

$ aura runs list
aura: registry parse error at line 1: expected value at line 1 column 94
(exit 0)
$ aura runs rank total_pips
aura: registry parse error at line 1: expected value at line 1 column 94

Column 94 of line 1 is the bare float 2.0 in ["sma_cross.fast",2.0].

Root cause: RunManifest.params was migrated to typed Scalar
({"I64":2} / {"F64":2.0}) in cycle 0047 (commit 86746e3), but the persisted
flat store was not migrated, so Registry::load fails to deserialize any
pre-0047 line. The lineage path (families.jsonl) is unaffected — it is written
fresh in the new format.

Impact: aura runs list is documented to list the stored runs; on a
pre-0047 store it errors out instead, so a researcher who ran aura sweep/run
before the upgrade loses read access to their run history.

Secondary bug: the parse error prints to stderr but the process exits 0,
so a script cannot detect the failure by status.

Repro: cargo run -p aura-cli -- runs list against a pre-0047 runs.jsonl
(a Vec<(String, f64)>-params line). A fixture line:
{"manifest":{"commit":"...","params":[["sma_cross.fast",2.0],["sma_cross.slow",4.0],["scale",0.5]],...

Fix direction (RED-first via debug): back-compat read — accept both the
bare-float and the typed Scalar forms in Registry::load — preferred over a
one-shot store migration (no user action needed). Separately decide that a parse
error should exit non-zero.

**Source:** fieldtest milestone "The World, part II" — finding F5 (bug, milestone-close blocker). See `docs/specs/fieldtest-milestone-the-world-orchestration-families.md`. `aura runs list` / `aura runs rank` cannot read a `runs.jsonl` written before cycle 0047. **Symptom (verbatim):** ``` $ aura runs list aura: registry parse error at line 1: expected value at line 1 column 94 (exit 0) $ aura runs rank total_pips aura: registry parse error at line 1: expected value at line 1 column 94 ``` Column 94 of line 1 is the bare float `2.0` in `["sma_cross.fast",2.0]`. **Root cause:** `RunManifest.params` was migrated to typed `Scalar` (`{"I64":2}` / `{"F64":2.0}`) in cycle 0047 (commit 86746e3), but the persisted flat store was not migrated, so `Registry::load` fails to deserialize any pre-0047 line. The lineage path (`families.jsonl`) is unaffected — it is written fresh in the new format. **Impact:** `aura runs list` is documented to list the stored runs; on a pre-0047 store it errors out instead, so a researcher who ran `aura sweep`/`run` before the upgrade loses read access to their run history. **Secondary bug:** the parse error prints to stderr but the process exits **0**, so a script cannot detect the failure by status. **Repro:** `cargo run -p aura-cli -- runs list` against a pre-0047 `runs.jsonl` (a `Vec<(String, f64)>`-params line). A fixture line: `{"manifest":{"commit":"...","params":[["sma_cross.fast",2.0],["sma_cross.slow",4.0],["scale",0.5]],...` **Fix direction (RED-first via debug):** back-compat read — accept both the bare-float and the typed `Scalar` forms in `Registry::load` — preferred over a one-shot store migration (no user action needed). Separately decide that a parse error should exit non-zero.
Brummel added the bug label 2026-06-17 15:49:43 +02:00
Author
Owner

Triage (orchestrator): the secondary clause of this issue — "parse error
prints to stderr but exits 0" — is NOT a bug.

Verified against HEAD: aura runs list and aura runs rank both exit 2 on a
registry read error. The path is load_runs_or_exit (crates/aura-cli/src/main.rs:742)
process::exit(2); it was born with exit(2) (commit 5bded0c) and has no
exit-0 branch. The "(exit 0)" in the fieldtest transcript was a measurement
artifact
: $? was read after a pipe (cargo run … | head), so it captured
head's exit code, not the binary's. A fresh debugger dispatch wrote the
requested exit-code RED test; it passed GREEN, confirming the symptom is
absent, and was reverted (a green test asserted as RED would violate RED-first).

So #83 reduces to its primary, real defect: Registry::load cannot read a
pre-0047 bare-float params line (the cycle-0047 typed-Scalar migration left the
flat store unmigrated). That is pinned by a RED test
(tests::load_reads_a_legacy_bare_float_params_line, aura-registry) and will be
fixed via a back-compat read — closes #83.

**Triage (orchestrator):** the *secondary* clause of this issue — "parse error prints to stderr but exits 0" — is **NOT a bug**. Verified against HEAD: `aura runs list` and `aura runs rank` both exit **2** on a registry read error. The path is `load_runs_or_exit` (`crates/aura-cli/src/main.rs:742`) → `process::exit(2)`; it was born with `exit(2)` (commit 5bded0c) and has no exit-0 branch. The "(exit 0)" in the fieldtest transcript was a **measurement artifact**: `$?` was read after a pipe (`cargo run … | head`), so it captured `head`'s exit code, not the binary's. A fresh debugger dispatch wrote the requested exit-code RED test; it passed **GREEN**, confirming the symptom is absent, and was reverted (a green test asserted as RED would violate RED-first). So #83 reduces to its **primary, real defect**: `Registry::load` cannot read a pre-0047 bare-float params line (the cycle-0047 typed-`Scalar` migration left the flat store unmigrated). That is pinned by a RED test (`tests::load_reads_a_legacy_bare_float_params_line`, aura-registry) and will be fixed via a back-compat read — `closes #83`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#83