feat(0086): cost-flag CLI ergonomics — units note, named diagnostics, non-R-harness guard
#153 (friction surfaced by the milestone-#148 close fieldtest). Three cost-flag fixes on `aura run`, all on the pure parse_run_args grammar: - Units discoverable: a COST_FLAGS_NOTE appended to the run usage + --help (price units, charged in R as cost/|entry-stop|, per-ENGINE-cycle carry, >= 0, stage1-r only). - A negative rate names the cause + flag ("<flag> must be non-negative, got <v>") via a factored parse_nonneg_rate helper, not a bare usage dump. - A cost flag on a non-R harness (sma/macd) is refused (exit 2, "cost flags require an R-evaluator harness (stage1-r)") instead of silently ignored — the named spec_gap, decided reject/fail-loud (refuse-don't-guess, recorded on #153), pinned by a new C10 ledger note. Internal RunArgs/RunData/HarnessKind gain #[derive(Debug)] (behaviour-neutral) so the pure parse_run_args unit tests can use expect_err. Verified independently: cargo test -p aura-cli green, the eight stage1-r cost goldens byte-unchanged; clippy -p aura-cli --all-targets -D warnings clean. Only the grammar/usage strings and the previously-unguarded sma-cost path changed; the cost-model graph and R math are untouched. closes #153
This commit is contained in:
@@ -830,6 +830,13 @@ integration test. **Deferred (each its own #148 cycle):** a notional-based carry
|
||||
(rollover-boundary timing, 3× Wednesday, long/short asymmetry — deploy-edge realism), and
|
||||
sweep-path cost. Decision log: #148.
|
||||
|
||||
**Realization (cost-flag harness scoping, #153).** Cost flags are defined only
|
||||
against an R-evaluator harness (the gross-R → net-R chain). On a non-R harness
|
||||
(`--harness sma`/`macd`, which produce no R) a cost flag is a **usage error
|
||||
(exit 2)**, not a silent no-op — refuse-don't-guess. Negative cost rates are
|
||||
likewise rejected (exit 2) with a named diagnostic that identifies the offending
|
||||
flag. CLI ergonomics only; the cost-model graph and the R math are untouched.
|
||||
|
||||
**Reframe (2026-06-23, #117 — exposure → bias, R as the signal-quality unit).**
|
||||
[HISTORY — its R spine survives into the 2026-06-28 contract; its Stage-2 currency /
|
||||
realistic-broker / register / flat-1R-vs-compounding portions are SUPERSEDED by that
|
||||
|
||||
Reference in New Issue
Block a user