mirror of
https://github.com/ruvnet/RuView
synced 2026-08-03 19:21:42 +00:00
ab8d7a8583
Iter 49. Ships the crate's first README — genuinely missing artifact.
crates.io renders this file; the rendered page is what downstream
operators see when they `cargo doc --open` or browse the registry.
Added:
- v2/crates/wifi-densepose-bfld/README.md (~135 lines):
* Three structural invariants (I1/I2/I3) table with enforcement
mechanism per invariant
* Quickstart snippet: in-process consumer (BfldPipeline::process)
* Quickstart snippet: production worker (BfldPipelineHandle +
bootstrap helpers)
* Feature flag matrix (std / serde-json / mqtt / soul-signature)
* Two runnable example invocations
* Testing matrix (no_default / default / mqtt)
* Companion artifacts pointer (ADRs, research bundle, HA
blueprints, CI workflow)
* ADR cross-reference table (ADR-118 through ADR-123)
* BFLD_MQTT_BROKER env-var doc for live mosquitto opt-in
- v2/crates/wifi-densepose-bfld/Cargo.toml:
readme = "README.md"
(so crates.io picks it up on publish)
- v2/crates/wifi-densepose-bfld/tests/crate_readme.rs (8 tests):
readme_documents_three_structural_invariants
readme_documents_feature_flag_matrix
readme_documents_both_runnable_examples
readme_documents_three_test_invocations
readme_references_companion_adrs_118_through_123
readme_quickstart_uses_canonical_public_api
(8 symbol-presence checks: BfldPipeline::new, BfldConfig::new,
SignatureHasher::new, SensingInputs, IdentityEmbedding::from_raw,
pipeline.process, publish_availability_online, publish_discovery,
BfldPipelineHandle::spawn, PipelineInput)
readme_points_at_research_bundle_and_blueprints
readme_documents_env_gated_mosquitto_integration
ADR-124 status (iter step 0 sibling check):
- docs/adr/ADR-124-rvagent-mcp-ruvector-npm-integration.md unchanged
at 431 lines. SENSE-BRIDGE scope remains orthogonal.
ACs progressed:
- ADR-118 §2.1 documentation surface — crates.io / cargo doc landing
page now exists. Operators encountering wifi-densepose-bfld for the
first time get the three structural invariants, quickstart snippets
for both deployment patterns, feature matrix, and ADR map without
having to read source.
Test config:
- cargo test --no-default-features → 101 passed (crate_readme cfg-out)
- cargo test → 327 passed (319 + 8)
Out of scope (next iter target):
- PR-readiness pivot. CHANGELOG, witness bundle, AC closeout table.
External-resource-gated work (KIT BFId, Pi5/Nexmon) still skipped.
Co-Authored-By: claude-flow <ruv@ruv.net>
81 lines
2.6 KiB
Rust
81 lines
2.6 KiB
Rust
//! Validate the crate README. Same `include_str!` pattern iter-30/47/48 used
|
|
//! for HA blueprints / examples. crates.io renders this file, so doc drift
|
|
//! against the actual public API is operator-visible.
|
|
|
|
#![cfg(feature = "std")]
|
|
|
|
const README: &str = include_str!("../README.md");
|
|
|
|
#[test]
|
|
fn readme_documents_three_structural_invariants() {
|
|
for needle in [
|
|
"**I1**",
|
|
"**I2**",
|
|
"**I3**",
|
|
"Raw BFI never exits the node",
|
|
"Identity embedding is in-RAM-only",
|
|
"Cross-site identity correlation",
|
|
] {
|
|
assert!(README.contains(needle), "README missing invariant text: {needle}");
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn readme_documents_feature_flag_matrix() {
|
|
for needle in ["`std`", "`serde-json`", "`mqtt`", "`soul-signature`"] {
|
|
assert!(README.contains(needle), "feature flag {needle} missing from README");
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn readme_documents_both_runnable_examples() {
|
|
assert!(README.contains("cargo run -p wifi-densepose-bfld --example bfld_minimal"));
|
|
assert!(README.contains("cargo run -p wifi-densepose-bfld --example bfld_handle"));
|
|
}
|
|
|
|
#[test]
|
|
fn readme_documents_three_test_invocations() {
|
|
assert!(README.contains("cargo test -p wifi-densepose-bfld --no-default-features"));
|
|
assert!(README.contains("cargo test -p wifi-densepose-bfld --features mqtt"));
|
|
}
|
|
|
|
#[test]
|
|
fn readme_references_companion_adrs_118_through_123() {
|
|
for adr in ["118", "119", "120", "121", "122", "123"] {
|
|
assert!(README.contains(adr), "README must cite ADR-{adr}");
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn readme_quickstart_uses_canonical_public_api() {
|
|
// The quickstart snippets must reference the actual operator-facing
|
|
// surface — drift here would mislead first-time users.
|
|
for needle in [
|
|
"BfldPipeline::new",
|
|
"BfldConfig::new",
|
|
"SignatureHasher::new",
|
|
"SensingInputs",
|
|
"IdentityEmbedding::from_raw",
|
|
"pipeline\n .process",
|
|
"publish_availability_online",
|
|
"publish_discovery",
|
|
"BfldPipelineHandle::spawn",
|
|
"PipelineInput",
|
|
] {
|
|
assert!(README.contains(needle), "quickstart missing canonical API: {needle}");
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn readme_points_at_research_bundle_and_blueprints() {
|
|
assert!(README.contains("docs/research/BFLD/"));
|
|
assert!(README.contains("cog-ha-matter/blueprints/bfld/"));
|
|
assert!(README.contains("bfld-mqtt-integration.yml"));
|
|
}
|
|
|
|
#[test]
|
|
fn readme_documents_env_gated_mosquitto_integration() {
|
|
assert!(README.contains("BFLD_MQTT_BROKER=tcp://localhost:1883"));
|
|
assert!(README.contains("mosquitto_integration"));
|
|
}
|