Skip to content

Commit 3cfeeec

Browse files
author
eastgate
committed
v2.92: deep debt evolution — probe_endpoint real JSON-RPC, capability-based nucleus, docs refresh
- probe_endpoint stub→real JSON-RPC liveness probes (identity.get + capabilities.list over Unix sockets) - 4-format capability parser aligned (flat array, object array, method_info, semantic_mappings) - nucleus.rs: hardcoded primal fallbacks→CapabilityTaxonomy-only resolution - detect_ecosystem: hardcoded CORE_PRIMALS list→dynamic socket directory scan - Toadstool-specific health logic→convention-based (.jsonrpc.sock detection) - tokio-tungstenite 0.21→0.24 (aligned with axum 0.7, eliminates dup WebSocket stack) - tokio test-util feature moved to dev-deps in 5 production crates - templates.rs hardcoded /tmp fallback→SystemPaths-only - genome_deploy root detection bug fixed (extracted is_root_user helper) - atomic_client abstract socket connect deduplicated (extracted connect_abstract helper) - "registry" added as CapabilityTaxonomy alias for Discovery→songbird - CURRENT_STATUS.md, CONTRIBUTING.md, EVOLUTION_ROADMAP.md, EVOLUTION_PATH.md refreshed - tools/Cargo.toml: added missing reqwest dep for songbird_universal_ui_demo - Stale docs: C-deps row reconciled, serde_yml→serde_yaml_ng, start_nucleus.sh references updated Made-with: Cursor
1 parent 489f8d6 commit 3cfeeec

36 files changed

Lines changed: 723 additions & 326 deletions

File tree

.github/workflows/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ biomeOS uses GitHub Actions for continuous integration and delivery, with two ma
3636

3737
#### **Job 4: Code Coverage**
3838
- Uses `cargo-llvm-cov` for coverage generation (`cargo llvm-cov --workspace --lcov --output-path lcov.info`)
39-
- Enforces a minimum line coverage threshold (`cargo llvm-cov --workspace --fail-under-lines 85 --no-run`)
39+
- Enforces a minimum line coverage threshold (`cargo llvm-cov --workspace --fail-under-lines 90 --no-run`)
4040
- Uploads to Codecov
4141
- Archives HTML coverage report (`cargo llvm-cov --workspace --html`)
4242
- **Purpose:** Track test coverage trends
@@ -149,7 +149,7 @@ biomeOS CI/CD distinguishes between:
149149
**Blocking (failing job fails the workflow):**
150150
- Format check, Clippy (all targets), and doc warnings (`-D warnings` on rustdoc)
151151
- Build (debug and release) and full test suite
152-
- Coverage below the enforced line threshold (85%) and `cargo audit` / `cargo deny check` failures
152+
- Coverage below the enforced line threshold (90%) and `cargo audit` / `cargo deny check` failures
153153
- File size job when any file exceeds the guideline
154154
- Standards job (TODO/FIXME markers, `panic!()` in production paths, any `unsafe` block)
155155
- Zero unsafe code remains a hard policy
@@ -213,7 +213,7 @@ From Deep Debt Analysis (Jan 30, 2026):
213213
| Unsafe Code | ✅ Enforced | Yes |
214214
| Dependency policy (`cargo deny`) | ✅ Enforced | Yes |
215215
| Security Audit | ✅ Enforced | Yes (on `cargo audit` failure) |
216-
| Coverage | ✅ Enforced | Yes (min. 85% lines) |
216+
| Coverage | ✅ Enforced | Yes (min. 90% lines) |
217217
| File Size | ✅ Enforced | Yes (when over guideline) |
218218
| Benchmarks | ✅ Tracked | No (`continue-on-error`) |
219219

@@ -303,7 +303,7 @@ Each workflow run archives:
303303
The CI/CD pipeline evolves with the codebase:
304304

305305
**Recent Enhancements (March 20, 2026):**
306-
1. Coverage threshold raised from 75% to 85% (actual: 89.84%)
306+
1. Coverage threshold raised from 75% to 90% (actual: 90.05%)
307307
2. File size check is now blocking (0 files over limit)
308308
3. `#[allow]` migrated to `#[expect(reason)]` workspace-wide
309309
4. All flaky mock tests hardened (flush + shutdown + case-insensitive matching)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cargo fmt --all -- --check # 0 diffs
5252
- Zero external C dependencies — `deny.toml` enforces this
5353
- Pure Rust: `rustix` for POSIX, `/proc` for metrics, `rtnetlink` for networking
5454
- No `openssl`, `ring`, `aws-lc-sys`, `native-tls`, `sysinfo`, `libc`, `nix`
55-
- YAML serde uses `serde_yml` via Cargo package rename: `serde_yaml = { package = "serde_yml", ... }` in workspace deps
55+
- YAML serde uses `serde_yaml_ng` via Cargo package rename: `serde_yaml = { package = "serde_yaml_ng", ... }` in workspace deps (pure Rust — `unsafe-libyaml` is a Rust-to-Rust translation, not C FFI)
5656
- Cross-compilation must work: `cargo build --target x86_64-unknown-linux-musl`
5757

5858
## Test Requirements

CURRENT_STATUS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# biomeOS - Current Status
22

3-
**Updated**: April 6, 2026 (v2.91: deep debt evolution — 4 large files smart-refactored (topology 869→433, rendezvous 862→321, verify 859→500, orchestrator 855→427), 27 new tests across 5 files (storage, networking, topology, capability, lifecycle), all duplicate deps confirmed transitive)
4-
**Version**: 2.91
3+
**Updated**: April 7, 2026 (v2.92: deep debt evolution — probe_endpoint stub→real JSON-RPC, tokio-tungstenite 0.21→0.24 aligned with axum, tokio test-util→dev-deps in 5 crates, nucleus.rs hardcoding→capability-based dispatch, detect_ecosystem→dynamic socket scan, abstract socket dedup, root detection bug fixed in genome_deploy, "registry" taxonomy alias added)
4+
**Version**: 2.92
55
**Status**: PRODUCTION READY - Capability-Based Discovery Compliant - Zero Blocking Debt - Fully Concurrent Testing
66

77
---
@@ -17,7 +17,7 @@
1717
| **Security Score** | 100/100 (HSTS, X-Frame, CSP, Referrer-Policy, Cache-Control) |
1818
| **Code Quality** | A++ (Pure Rust, Edition 2024 all crates, ecoBin v3.0, fully concurrent, zero warnings, full doc coverage, sovereignty audit) |
1919
| **Lint hardening** | `deny` on unwrap_used/expect_used, workspace lints inherited by all 26 workspace crates |
20-
| **Tests Passing** | 7,638 lib + bin + doc + proptest (0 failures, 0 ignored, fully concurrent) |
20+
| **Tests Passing** | 7,649 lib + bin + doc + proptest (0 failures, 0 ignored, fully concurrent) |
2121
| **Test Coverage** | 90%+ region / function / line (llvm-cov workspace-wide, target maintained) |
2222
| **Unsafe Code** | 0 production (`#[forbid(unsafe_code)]` on all crate roots, `mem::forget` eliminated) |
2323
| **Clippy** | PASS (0 warnings, pedantic+nursery, `-D warnings`, all crates via `[lints] workspace = true`) |
@@ -63,7 +63,7 @@
6363
| **JSON-RPC types** | `JSONRPC_VERSION` const + zero-alloc `JsonRpcVersion` marker type (was `String`), `JsonRpcRequest::new()` builder everywhere, `JsonRpcResponse::success()`/`error()` builders |
6464
| **Zero-copy** | `JsonRpcVersion` (zero-size, zero-alloc serde), `bytes::Bytes` for binary payloads (`SecurityRpc`, P2P, compute, genomeBin, HTTP client, primal SDK IPC); `Arc<str>` for identifiers + `PrimalManifest` + `PrimalConnections` keys + `OptimizationType` graph nodes + WebSocket subscription IDs; `Arc<SubscriptionFilter>` for subscriptions; `Value::take()` on Songbird discovery + provider hot paths (eliminates subtree clone); `TransportEndpoint` (tagged enum, zero `PathBuf` allocation for abstract/TCP/HTTP transports) |
6565
| **Safe casts** | 0 truncation `as` casts — PID casts use `i32::try_from().unwrap_or(-1)`, duration use `u32::try_from().unwrap_or(MAX)` |
66-
| **Dep policy** | `deny.toml` (cargo-deny 0.19) bans openssl-sys, ring, aws-lc-sys, native-tls, zstd-sys, dirs-sys; `serde_yaml``serde_yml` (deprecated dep evolved via Cargo package rename) |
66+
| **Dep policy** | `deny.toml` (cargo-deny 0.19) bans openssl-sys, ring, aws-lc-sys, native-tls, zstd-sys, dirs-sys; YAML via `serde_yaml_ng` (pure Rust — `unsafe-libyaml` is a Rust translation, not C FFI); tokio-tungstenite 0.24 aligned with axum 0.7 |
6767
| **Plasmodium** | HTTP JSON-RPC collective (runtime port, SSH legacy removed) |
6868
| **Model Cache** | NUCLEUS-integrated, HuggingFace import, NestGate fallback |
6969
| **AI Bridge** | Squirrel -> Songbird -> Cloud/Local AI (validated) |
@@ -644,7 +644,7 @@ Comprehensive codebase audit against ecoPrimals standards:
644644
| `#[allow]` unnecessary | 2 (`vec_init_then_push`) | 0 (replaced with `vec![]`) |
645645
| Files >1000 lines | 0 | 0 (max: 985 lines) |
646646
| Unsafe code | 0 | 0 |
647-
| External C deps | 1 (`zstd-sys`) | 1 (noted for future format evolution) |
647+
| External C deps | 1 (`zstd-sys`) | 0 (zstd-sys→lz4_flex, deny.toml enforced) |
648648

649649
Key evolutions:
650650
- `std::sync::Mutex``tokio::sync::Mutex` in async test contexts

Cargo.lock

Lines changed: 4 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ tokio-util = { version = "0.7", default-features = false }
153153
tokio-stream = "0.1"
154154

155155
# WebSockets / async helpers
156-
tokio-tungstenite = "0.21"
156+
tokio-tungstenite = "0.24"
157157
futures-util = "0.3"
158158
async-stream = "0.3.6"
159159

crates/biomeos-atomic-deploy/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ anyhow = { workspace = true }
1010
bytes = { workspace = true }
1111
serde = { workspace = true }
1212
serde_json = { workspace = true }
13-
tokio = { workspace = true, features = ["test-util"] }
13+
tokio = { workspace = true }
1414
tracing = { workspace = true }
1515
tracing-subscriber = { workspace = true } # For binaries
1616
thiserror = { workspace = true }
@@ -41,6 +41,7 @@ toml = { workspace = true } # For Neural API graph parsing
4141

4242
[dev-dependencies]
4343
biomeos-test-utils = { path = "../biomeos-test-utils", version = "0.1.0" }
44+
tokio = { workspace = true, features = ["test-util"] }
4445
tempfile = { workspace = true }
4546
tokio-test = { workspace = true }
4647
rand = { workspace = true }

crates/biomeos-atomic-deploy/src/handlers/topology.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,21 +207,16 @@ impl TopologyHandler {
207207

208208
let resp: serde_json::Value = serde_json::from_str(&response_line).unwrap_or_default();
209209

210-
if resp["error"]["code"].as_i64() == Some(-32601) {
210+
if resp.get("error").is_some() {
211211
continue;
212212
}
213213

214-
if let Some(caps) = resp["result"]["capabilities"].as_array() {
215-
return Ok(caps
216-
.iter()
217-
.filter_map(|c| c.as_str().map(String::from))
218-
.collect());
219-
}
220-
if let Some(caps) = resp["result"].as_array() {
221-
return Ok(caps
222-
.iter()
223-
.filter_map(|c| c.as_str().map(String::from))
224-
.collect());
214+
let caps =
215+
biomeos_core::socket_discovery::cap_probe::extract_capabilities_from_response(
216+
&resp,
217+
);
218+
if !caps.is_empty() {
219+
return Ok(caps);
225220
}
226221
}
227222
Ok(vec![])

crates/biomeos-cli/src/commands/discover.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ pub async fn handle_discover(
6464
} else if let Some(target_endpoint) = endpoint {
6565
manager
6666
.probe_endpoint(&target_endpoint)
67+
.await
6768
.map(|_| vec![target_endpoint])?
6869
} else {
6970
manager.discover().await?

crates/biomeos-cli/src/discovery.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl DiscoveryUtils {
2626

2727
for endpoint in endpoints {
2828
// Try to probe the endpoint to get detailed information
29-
if let Ok(_probe_result) = manager.probe_endpoint(&endpoint) {
29+
if let Ok(_probe_result) = manager.probe_endpoint(&endpoint).await {
3030
// Create a DiscoveryResult from the probe result
3131
let discovery_result = DiscoveryResult {
3232
id: Uuid::new_v4().to_string(),
@@ -84,7 +84,7 @@ impl DiscoveryUtils {
8484
let mut healthy_services = 0;
8585
let mut unhealthy_services = 0;
8686
for service in &all_services {
87-
match manager.probe_endpoint(&service.endpoint) {
87+
match manager.probe_endpoint(&service.endpoint).await {
8888
Ok(_) => healthy_services += 1,
8989
Err(_) => unhealthy_services += 1,
9090
}

crates/biomeos-cli/src/health.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ impl HealthUtils {
6666
for endpoint in discovered_endpoints {
6767
// Probe each service for detailed health info
6868
let start_time = std::time::Instant::now();
69-
match manager.probe_endpoint(&endpoint) {
69+
match manager.probe_endpoint(&endpoint).await {
7070
Ok(probe_result) => {
7171
let response_time = start_time.elapsed().as_millis() as u64;
7272
services.push(ServiceHealth {
73-
name: probe_result, // probe_result is the service name/description
73+
name: format!("{} v{}", probe_result.name, probe_result.version),
7474
endpoint: endpoint.clone(),
7575
status: biomeos_types::Health::Healthy,
7676
response_time_ms: response_time,

0 commit comments

Comments
 (0)