The single-file ledger had grown to 2968 lines / ~42k tokens, mixing current design law with accreted history: 59 cycle-stamped realization blocks, 18 [HISTORY] passages, 22 supersession markers, and the C10 / C22 / C24 reframe sagas layered several supersessions deep. A code-grounding audit (31 agents, adversarially verified) confirmed 11 defects stated as current truth: stale crate homes from the C28 #288 roster split (cost nodes, PositionManagement, PositionEvent, Session), the renamed InputSpec->PortSpec, the pre-#241 project model in C16 and the open-threads section, a stale HarnessKind retirement deferral in C24, and three C28-internal inconsistencies. New shape, per the ailang precedent: - INDEX.md stays the sole addressable entry point: foundation, external components, a C-id-keyed contract map (one line per contract), and only the genuinely open architectural threads. - contracts/cNN-<slug>.md carries each contract's current truth only: Guarantee / Forbids / Why with ratified refinements integrated, plus a code-anchored Current state. All confirmed defects are fixed here; crate anchors were re-verified against the tree. - contracts/cNN-<slug>.history.md (18 sidecars) and INDEX.history.md preserve every superseded block verbatim, stamps and issue refs intact, under a frozen-record banner. Nothing was deleted: superseded design intent remains an addressable working-tree artifact, off the per-cycle audit walk. - Ledger discipline is now stated in INDEX.md: live files are edited in place at cycle close, superseded text moves verbatim to the sidecar, and a supersession marker in a live file is itself an audit finding. Every contract file was verified against its old text by an independent zero-loss pass (statement-by-statement) plus a code-accuracy spot check; C-ids and contract titles are unchanged, so existing C-id citations in code, tests, and issues resolve as before.
5.9 KiB
C28 — Internal stratification: the trading ladder, the process column, the shell: history
FROZEN HISTORICAL RECORD. Each block below was true as of its cycle/date stamp and may be superseded; this file is NOT current truth and NOT a grounding surface. Current contract: c28-stratification.md.
Status (2026-07-19, milestone "Stratification — ladder, process column, shell", #286). This contract states the target. At HEAD the crates cut by mechanical role (vocabulary / reductions / documents / orchestration / CLI), not cleanly by layer, so the layering is realized only partially:
- The dependency direction now obeys the rule across the engine stack. The
aura-engine → aura-backtestproduction violation is cut (phase 2, #292):RunReportis generic over its metric payloadM(the engine names no concrete metric type), the pip/R reductions and the MC assembly (summarize,McAggregate/RBootstrap/monte_carlo) moved toaura-backtest, and the statistics kernel (MetricStats/quantile/resample_block/SplitMix64) moved to theaura-analysisfoundation. The engine's[dependencies]are nowaura-core+aura-analysisonly; the backtest layer instantiatesM = RunMetrics(aura-backtest → aura-engine, an outer→inner edge). The ladder direction is enforced for the engine/backtest/analysis rungs by the structural test (c28_layering, seven-row table). - #147 retired (user-ratified direction 2026-07-20; shipped the same day).
Item 1 — the metric genericity
RunReport<M>— shipped as phase 2 above (#292). Item 2 — the registry deflation vocabulary — shipped as the ratified "A1" cut, its deferral trigger having fired when measurement supplied its first deflatable metric (the IC, #290): the deliberately narrowMetricVocabularytrait (resolve/roster/direction/value/one null draw) lives inaura-analysis, re-exported throughaura-engine; the R vocabulary (RunMetricKey,r_based, the rosters, the centred moving-blocknull_draw) is supplied byaura-backtest; the registry's rank/optimize/deflate machinery is generic overM: MetricVocabularywith refusal prose derived from the carried roster; the IC (aura-cli) is the second production implementor, bringing its within-run permutation null. The C10 wall stays monomorphic (check_r_metric/generalizationaccept only the R vocabulary;r_basedis the enforcement point). Explicitly still deferred ("A2"): measurement runs as sweep-family citizens (report unification, campaign engine generic-over-M) — until a concrete family/campaign demand exists. The #136 one-implementor rationale is superseded by the second implementor; the registry's process-column trading-awareness holds unchanged. See #147 for the full disposition. - The
aura-stdfour-layer roster is now cut by layer (phase 4, #288):aura-stdholds the engine nodes only (arithmetic/logic/rolling + the generic sinks);aura-market(session,resample),aura-strategy(bias/stop_rule/sizer+ the cost nodes) andaura-backtest(sim_broker,position_management) carry the outer rungs, each depending only onaura-core; the closed node roster moved toaura-vocabulary. Theaura-analysisinterweave is resolved (phase 5, #291): the backtest reductions live inaura-backtest::metricsbeside theirposition_managementproducer, andaura-analysisis reduced to domain-free statistics + selection provenance ([dependencies]= serde only). The measurement rung is seeded (#295):aura-measurementcarries the IC vocabulary + reduction (its run verb remains the additive shape dispatch, #286). No crate exists yet for execution (unbuilt — the C10/C13 edge only). Under this model theaura-registry → aura-researchedge is column-internal and legal. - Phased realization (each independently shippable; behaviour byte-identical
except the purely additive shape dispatch): (1) this contract; (2) cut the
engine's backtest-metrics edge via
RunReport<M>— done (#292: metric-generic run record, the pip/R reductions + MC assembly relocated toaura-backtest, the statistics kernel toaura-analysis, dependency inversion, ladder enforced by the structural test; realizes item 1 of #147); (3) the #286 shape dispatch plus the per-run scaffold as a library — done (#295: the pure per-run scaffold pieces live inaura-backtest::scaffold; the composed recipe — harness assembly, binding, translators, the defaultMemberRunner— is the assembly crateaura-runner; the measurement rung is seeded asaura-measurementwith the IC; the shell is reduced to argv/translation/presentation, enforced structurally. Residual: ~20 refusal sites insideaura-runner's single-run verb paths still terminate the process; their conversion toRunnerErrorpropagation is tracked as #297 — the campaign path already refuses viaMemberFault, never a process exit); (4) split theaura-stdroster along engine / market / strategy / backtest — done (#288: fouraura-core-only node crates, the closed roster moved toaura-vocabulary, the ladder direction enforced by a structural test); (5) splitaura-analysisinto generic statistics and backtest metrics — done (#291: metrics moved toaura-backtest::metrics,aura-analysisreduced to the domain-free half, engine re-export surface name-unchanged); (6) generify the column's metric interface (demand-driven — this is #147). Crate names now realized (aura-market/aura-strategy/aura-backtest/aura-vocabulary); full evidence on #288, #286 and the milestone.
Provenance note (#295): the shell-boundary cut closes a ratified structural debt (this contract's own phase plan) and un-blocks the future World program; it was not a demonstrated downstream blocker — the first downstream project's observed friction was document-vocabulary gaps, never Rust-level recipe reachability.