fix(aura-cli, ledger): review fixes — override stamps the base hash (#343 revised), prose corrections

Harvest sweep, whole-diff review fix block.

The review refuted the #343 ratification's factual premise: the
campaign leg does NOT mint a reopened member's hash — runner.rs passes
the stored strategy_id as topo even for reopened members (reference
semantics). Decision revised on the issue (fix, not ratify): exec's
override run now stamps the LOADED base document's content id
(computed before reopen_all; RED-first — the inverted pin failed on
the old reopened-hash behaviour), keeping topology_hash
store-resolvable and identical in meaning across both legs; the
variation lives in manifest.params. C24/C12/C18 rewritten to the
corrected reading.

Also per review: C24's retired build-free-introspection sentence
updated (old wording archived in the history sidecar, #339 item 4);
C14's partition key precisely scoped to the routing seam, naming the
legs' differing content-validation exits honestly; measure.rs's false
unreachability comment corrected; --taps added to the guide's
introspect cheat-sheet and pinned on the content-id path; the
zero-trade-cell note routed through the diag macro; doc-comment,
issue-ref, and gate-name corrections; the Fixed-regime NaN branch
pinned.

refs #339
refs #342
refs #343
This commit is contained in:
2026-07-26 13:37:01 +02:00
parent 2e532bce00
commit ef24f06547
14 changed files with 183 additions and 80 deletions
+26 -15
View File
@@ -553,19 +553,24 @@ fn exec_blueprint_without_override_runs_bound_values_untouched() {
);
}
/// Ratification pin (#343): an override IS a topology-parameter variation,
/// even a "no-op" one that re-binds a param to its EXISTING bound value —
/// `examples/r_sma.json` already binds `fast.length` to 2, so
/// `--override fast.length=2` changes nothing observable about the run's
/// *behaviour*, yet the reopened param moves from `manifest.defaults` to
/// `manifest.params` (the #246 reopen mechanism, unconditionally applied),
/// which changes the canonical bytes `topology_hash` covers: the two runs'
/// `topology_hash`es must therefore DIFFER, and the overridden run's own
/// hash must be stable across repeated runs (determinism, C1) — the
/// reopened topology is its own honest, reproducible identity, not a
/// dangling reference (see the ratification prose in C12/C24).
/// Ratification pin (#343, revised): `topology_hash` carries REFERENCE
/// semantics on every leg — it names the (stored/loaded) base document,
/// never a transient reopened variant, mirroring the campaign leg's own
/// precedent (`runner.rs` passes `&cell.strategy_id`, the stored base
/// document's id, as `topo` even for reopened members). `examples/r_sma.json`
/// already binds `fast.length` to 2, so `--override fast.length=2` is a
/// no-op override value-wise; it still moves the param from
/// `manifest.defaults` to `manifest.params` (the #246 reopen mechanism,
/// unconditionally applied) — the manifest's `params` carry the variation,
/// while `topology_hash` stamps the base document's own content id (computed
/// before the reopen) on both legs, so the bare run's and the
/// no-op-override run's `topology_hash` are EQUAL, and the overridden run's
/// own hash stays stable across repeated runs (determinism, C1). The
/// manifest's `params` plus the base document deterministically reconstruct
/// the executed run (reproduction identity) — see the corrected ratification
/// prose in C12/C24.
#[test]
fn exec_blueprint_noop_override_mints_a_distinct_but_stable_topology_hash() {
fn exec_blueprint_override_keeps_the_base_documents_topology_hash() {
let (base_out, base_code) = run_code(&["exec", "examples/r_sma.json"]);
assert_eq!(base_code, Some(0), "stdout/stderr: {base_out}");
let base_line = base_out.lines().find(|l| l.starts_with('{')).expect("record line");
@@ -581,10 +586,16 @@ fn exec_blueprint_noop_override_mints_a_distinct_but_stable_topology_hash() {
let ov_hash =
ov_v["manifest"]["topology_hash"].as_str().expect("overridden topology_hash").to_string();
assert_ne!(
assert_eq!(
base_hash, ov_hash,
"a no-op override still reopens the bound param, minting the reopened topology's own \
hash: base {base_out} / overridden {ov_out}"
"an override stamps the base document's own content id — reference semantics (#343): \
base {base_out} / overridden {ov_out}"
);
let ov_params = ov_v["manifest"]["params"].as_array().expect("params array");
assert!(
ov_params.iter().any(|e| e[0] == "fast.length"),
"the variation lives in the manifest's params, not in the hash: {ov_out}"
);
let (ov_out_2, ov_code_2) =