ab3f16879b
C29 compile/unit seam, tasks 6-10 -- iteration 1 of the self-description plan complete: every engine-shipped vocabulary entry now carries a gate-clean one-line meaning. - aura-runner: the internal tap recording sink threads its doc (the last unthreaded NodeSchema site) -- first full workspace build since the field became required. - aura-cli scaffold: the sample node's template carries a doc line plus a maintenance comment, so every scaffolded extension crate starts gate-clean; both extension-vocabulary fixture exemplars thread real meaning lines (the load seam walks these in iteration 2). New E2E: the scaffold's own doc must pass its own gate -- an alibi doc in the template would teach the wrong pattern to every new project, and the compiler checks only the field's presence, never its shape. - aura-research: metric_vocabulary()/tap_vocabulary() promote from bare name arrays to MetricSchema/TapSchema carriers (id + doc, 17 + 4 authored lines); callers adapt to .id with byte-identical output (introspection goldens unchanged). The #190 guard keeps its triple -- the doc column adds no fourth roster site. - Coverage: tests/self_description.rs walks all five vocabularies (blocks, metrics, taps, folds, std nodes) through doc_gate -- the guard that keeps any future edit from blanking a doc. Adjudicated review residue: the 17 metric doc strings are surfaced by no CLI path yet -- deliberate; task 8 pins callers byte-identical, the surfacing belongs to the CLI self-description work (#315). Plan-cited coordinates lib.rs:1003/:1283 resolved to the real caller sites (:1019/:1299); the plan's literal test code was reconciled to the real accessors (FoldRegistry::core().roster(), Env::std()). Gates: cargo test --workspace green (0 failed, incl. the new coverage walk + scaffold E2E); cargo clippy --workspace --all-targets -- -D warnings clean. refs #316
44 lines
1.6 KiB
Rust
44 lines
1.6 KiB
Rust
//! C29 coverage: every engine-shipped vocabulary entry carries a
|
|
//! gate-passing one-line meaning. Blocks, metrics, tap slots, folds, and
|
|
//! the std node vocabulary — the compile/unit seam of the self-description
|
|
//! contract.
|
|
|
|
use aura_core::doc_gate;
|
|
|
|
#[test]
|
|
fn every_shipped_vocabulary_entry_passes_the_doc_gate() {
|
|
// process + campaign blocks (BlockSchema.doc — the pre-existing model)
|
|
for b in aura_research::process_vocabulary()
|
|
.iter()
|
|
.chain(aura_research::campaign_vocabulary().iter())
|
|
{
|
|
doc_gate(b.id, b.doc)
|
|
.unwrap_or_else(|f| panic!("block {}: {:?}", b.id, f));
|
|
}
|
|
// metrics
|
|
for m in aura_research::metric_vocabulary() {
|
|
doc_gate(m.id, m.doc)
|
|
.unwrap_or_else(|f| panic!("metric {}: {:?}", m.id, f));
|
|
}
|
|
// tap slots
|
|
for t in aura_research::tap_vocabulary() {
|
|
doc_gate(t.id, t.doc)
|
|
.unwrap_or_else(|f| panic!("tap {}: {:?}", t.id, f));
|
|
}
|
|
// tap folds (the #283 registry roster already carries docs)
|
|
for (name, doc) in aura_runner::tap_plan::FoldRegistry::core().roster() {
|
|
doc_gate(name, doc)
|
|
.unwrap_or_else(|f| panic!("fold {}: {:?}", name, f));
|
|
}
|
|
// std node vocabulary: resolve each shipped type id to its schema
|
|
let env = aura_runner::project::Env::std();
|
|
for &type_id in aura_vocabulary::std_vocabulary_types() {
|
|
let builder = env
|
|
.resolve(type_id)
|
|
.unwrap_or_else(|| panic!("std type {type_id} must resolve"));
|
|
let schema = builder.schema();
|
|
doc_gate(type_id, schema.doc)
|
|
.unwrap_or_else(|f| panic!("node {type_id}: {:?}", f));
|
|
}
|
|
}
|