feat(research): 0106 tasks 1-9 — document layer, content-id move, stores + referential tier

The aura-research leaf crate: ProcessDoc/CampaignDoc with strict parsing
(hand-rolled StageBlock deserializer — deny_unknown_fields does not compose
with internally-tagged enums; Axis declares its ScalarKind once with bare
values, per the #189 user veto), canonical form + content_id_of (the
SHA-256 primitive moved from aura-cli, which now delegates — the id pin set
incl. the independent sweep-store recompute stayed green untouched),
intrinsic validation for both document types (P1 constraints structural),
and the introspection contract (schema tables single-source parse
strictness AND vocabulary/describe/open-slots — the Blockly litmus made
checkable). aura-registry: content-addressed processes/ + campaigns/
stores on the blueprint-store pattern (Ok(None) treat-as-empty) and the
referential tier (validate_campaign_refs: process/strategy refs incl.
identity-scan, axis-name + declared-kind checks against param_space).

Plan deviations, verified by hand and folded back into the plan file:
- Task 9's fixture could not use aura-composites as planned: every shipped
  composite with an open param routes through LinComb, which the zero-arg
  std_vocabulary roster deliberately excludes, so none round-trips through
  blueprint_from_json with the by-type-name resolver. The test hand-builds
  a minimal Bias composite instead (generic over param_space, as planned);
  the unused pro-forma aura-composites dev-dep from the repair pass is
  dropped. This is why the loop reported task 9 BLOCKED
  (review-loop-exhausted on the literal code block); the tree itself is
  complete and green.
- A plan-verbatim test assertion false-matched ("deflate" as substring of
  "deflated-positive"); tightened to the JSON key.
- OpenSlot doc comment backticked (rustdoc read strategies[0] as a link;
  doc gate back to 0 warnings).

Verification: cargo test --workspace 898/0; clippy -D warnings clean;
cargo doc --no-deps 0 warnings. Tasks 10-12 (CLI verb families, final
gates) follow.

refs #189
This commit is contained in:
2026-07-03 15:09:39 +02:00
parent 3149720f21
commit ef3bec5844
9 changed files with 1574 additions and 16 deletions
@@ -1724,27 +1724,42 @@ import.)
- [ ] **Step 2: Dev-deps for the fixture, if absent**
In `crates/aura-registry/Cargo.toml` `[dev-dependencies]` add whichever of
these is missing:
In `crates/aura-registry/Cargo.toml` `[dev-dependencies]` add if missing:
```toml
aura-std = { path = "../aura-std" }
aura-composites = { path = "../aura-composites" }
```
(NOT aura-composites: its shipped composites — vol_stop, risk_executor* —
all route through `LinComb`, whose builder needs a structural arity
argument and is therefore deliberately absent from the zero-arg
`std_vocabulary` roster, so none of them can round-trip through
`blueprint_from_json` with the by-type-name resolver this test uses. The
fixture below hand-builds a minimal loadable composite instead.)
- [ ] **Step 3: Append the referential test (tests module). The fixture is
GENERIC over the composite's real param space — no hardcoded param names**
```rust
#[test]
fn referential_tier_resolves_refs_and_checks_axes() {
use aura_engine::{blueprint_to_json, Composite};
use aura_research::{Axis, DocRef};
let reg = Registry::open(temp_family_dir("referential_tier"));
let resolve = |t: &str| aura_std::std_vocabulary(t);
// a real public composite with an open param space
let composite = aura_composites::vol_stop(4, 1.5);
// A minimal fixture composite with one OPEN param, built from a
// zero-arg `aura-std` node (`Bias`) so `std_vocabulary` can actually
// resolve it on load (see Step 2's note on why no aura-composites
// composite qualifies).
let composite = Composite::new(
"fixture",
vec![aura_std::Bias::builder().named("b").into()],
vec![],
vec![],
vec![],
);
let space = composite.param_space();
let real = space.first().expect("fixture composite has an open param");
let real_name = real.name.clone();
@@ -1833,10 +1848,8 @@ Anchor notes: `blueprint_to_json`/`blueprint_identity_json` — import from
the engine re-export the way the crate already imports engine items; if
`aura_core::ScalarKind`/`Scalar` are not yet dev-visible, they come through
the existing `aura-engine` dependency's re-exports or a direct
`aura-core` path dep (mirror whichever the crate already uses). If
`vol_stop(4, 1.5).param_space()` turns out EMPTY, use
`aura_composites::risk_executor_vol_open(1.0)` instead — the test is
generic and needs only ONE open param.
`aura-core` path dep (mirror whichever the crate already uses). The test
is generic and needs only ONE open param from the fixture composite.
- [ ] **Step 4: Run the test**