feat(research,cli): the CostSpec campaign vocabulary (#234 task 2)

CampaignDoc gains an additive cost: Vec<CostSpec> block — a closed,
externally tagged vocabulary over the three shipped cost nodes
(constant/vol_slippage/carry, field names = the builders' ParamSpec
names), mirroring the risk block: serde default + skip-if-empty (cost-
less documents keep their content ids, pinned), DocFault::BadCost
validation (finite/bounds per component), std::cost construct-
vocabulary block + SlotKind::Costs + open-slot mirror, prose arm, and
all CampaignDoc struct literals across crates carry cost: vec![]
(compile-driven).

Verified: aura-research suite green, campaign validate e2e green, full
workspace suite green, clippy -D warnings clean; in-loop spec review
compliant and quality review approved (real diff fingerprint — the
worktree-anchored review prompt works).

refs #234
This commit is contained in:
2026-07-11 07:24:15 +02:00
parent 249aafdb0f
commit bdcf0452f4
6 changed files with 238 additions and 20 deletions
+2
View File
@@ -478,6 +478,7 @@ mod tests {
bindings: BTreeMap::new(),
},
risk: vec![],
cost: vec![],
strategies: vec![StrategyEntry {
r#ref: DocRef::ContentId("0".repeat(64)),
axes: BTreeMap::from([(
@@ -905,6 +906,7 @@ mod wf_tests {
bindings: BTreeMap::new(),
},
risk: vec![],
cost: vec![],
strategies: vec![StrategyEntry {
r#ref: DocRef::ContentId("c".repeat(64)),
axes: BTreeMap::from([(
+1
View File
@@ -152,6 +152,7 @@ fn campaign(instruments: &[&str]) -> CampaignDoc {
bindings: BTreeMap::new(),
},
risk: vec![],
cost: vec![],
strategies: vec![StrategyEntry {
r#ref: DocRef::ContentId(STRATEGY_ID.to_string()),
axes: axes_2x2(),