Skip to content

Commit 5710394

Browse files
BiomeOS Developercursoragent
andcommitted
docs: refresh metrics to 1,583 tests, archive handoffs, cargo clean
- Root docs (README, STATUS, WHATS_NEXT, CHANGELOG) updated to 1,583 tests, 194 source files, 18+ entry type variants - Wave 76 + deep debt session entries in STATUS/CHANGELOG - entry_tests.rs smart-split (845→639L + 213L trust tests) - DispatchOutcome::is_ok #[allow] → #[cfg_attr(not(test), expect)] - Handoffs archived: Wave 69 FRAGO, handler evolution - New handoff: LOAMSPINE_DEEP_DEBT_WAVE76_JUN03_2026 - sporeprint validation-summary metrics aligned - cargo clean: 9,102 files, 6.1 GiB removed Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0029fe8 commit 5710394

12 files changed

Lines changed: 334 additions & 223 deletions

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [0.9.16] - 2026-04-08
1111

12+
### Changed (June 3, 2026 — Deep Debt: Lint Evolution, Test Cohesion, Clone Audit)
13+
14+
- **Lint evolution**: `#[allow(dead_code)]` on `DispatchOutcome::is_ok` evolved to `#[cfg_attr(not(test), expect(dead_code))]`.
15+
- **Smart-split**: `entry_tests.rs` 845→639L. Cross-gate trust tests → `entry_tests_trust.rs` (213L).
16+
- **Clone audit**: High-clone files confirmed test-only or O(1) Arc clones.
17+
18+
### Added (June 3, 2026 — Wave 76 Parity Sprint: Cross-Gate Trust Entry Schema)
19+
20+
- **`EntryType::KeyExchange`**: Ed25519 key exchange between two gates.
21+
- **`EntryType::TrustIssuerRegistration`**: Trust issuer registration with scope and capabilities.
22+
- **`EntryType::TokenVerificationCrossGate`**: Cross-gate token verification event.
23+
- All three in `"trust"` domain, excluded from waypoint spines.
24+
- 9 new tests (domain, waypoint, serde roundtrips).
25+
1226
### Changed (June 2, 2026 — Evolution: Readiness Diagnostics, Attribution, Auth Peer Info)
1327

1428
- **Readiness probe**: Exercises storage read and reports spine count.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![License](https://img.shields.io/badge/license-AGPL--3.0--or--later-blue)]()
88
[![Version](https://img.shields.io/badge/version-0.9.16-blue)]()
9-
[![Tests](https://img.shields.io/badge/tests-1%2C574%20passing-brightgreen)]()
9+
[![Tests](https://img.shields.io/badge/tests-1%2C583%20passing-brightgreen)]()
1010
[![Coverage](https://img.shields.io/badge/coverage-90.9%25%20line-brightgreen)]()
1111
[![Methods](https://img.shields.io/badge/JSON--RPC-44%20methods-blue)]()
1212
[![JH-0](https://img.shields.io/badge/JH--0-method%20gate-green)]()
@@ -85,7 +85,7 @@ loamSpine/
8585
│ │ ├── config.rs # Configuration
8686
│ │ ├── discovery/ # Capability registry + DynSigner/DynVerifier
8787
│ │ ├── discovery_client/ # HTTP discovery client + ResilientDiscoveryClient
88-
│ │ ├── entry/ # Entry types (15+ variants, MessagePack / rmp-serde canonical)
88+
│ │ ├── entry/ # Entry types (18+ variants incl. cross-gate trust, MessagePack / rmp-serde canonical)
8989
│ │ ├── infant_discovery/ # DNS-SRV, mDNS-SD, registry discovery
9090
│ │ ├── manager/ # Certificate manager
9191
│ │ ├── niche.rs # Primal self-knowledge (capabilities, deps, costs)
@@ -208,13 +208,13 @@ Security invariant: `BIOMEOS_INSECURE=1` + non-default `FAMILY_ID` → refuse to
208208
|--------|-------|
209209
| **Version** | 0.9.16 |
210210
| **Edition** | 2024 |
211-
| **Tests** | 1,574 passing (all concurrent, ~3s, zero flaky) |
211+
| **Tests** | 1,583 passing (all concurrent, ~3s, zero flaky) |
212212
| **Coverage** | 90.92% line / 89.09% branch / 92.92% region (llvm-cov) |
213213
| **Clippy** | 0 warnings (pedantic + nursery + `missing_const_for_fn`, `-D warnings`) |
214214
| **Unsafe Code** | 0 (`#![forbid(unsafe_code)]`) |
215215
| **Lint Exceptions** | 4 `#[allow]` in production (2× tarpc `wildcard_imports`, 1× feature-conditional `unused_mut`, 1× feature-conditional `unused_async`); 4 `#[expect(dead_code)]` for pre-wired strandGate deploy entry points; tests all `#[expect(reason)]` |
216-
| **Max File Size** | 605 max production; 787 max test file |
217-
| **Source Files** | 193 `.rs` files across 3 workspace crates (+ 3 fuzz targets) |
216+
| **Max File Size** | 640 max production; 789 max test file |
217+
| **Source Files** | 194 `.rs` files across 3 workspace crates (+ 3 fuzz targets) |
218218
| **License** | AGPL-3.0-or-later + ORC + CC-BY-SA-4.0 (scyBorg triple) |
219219
| **SPDX Headers** | All source files |
220220
| **ecoBin** | Zero C dependencies (pure Rust) |

STATUS.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Implementation Status
44

55
**Current Version**: 0.9.16
6-
**Last Updated**: June 2, 2026
6+
**Last Updated**: June 3, 2026
77

88
---
99

@@ -19,7 +19,7 @@ This document tracks implementation progress against the specification suite in
1919
|------|--------|-------|
2020
| [LOAMSPINE_SPECIFICATION.md](specs/LOAMSPINE_SPECIFICATION.md) | COMPLETE | Master spec implemented |
2121
| [ARCHITECTURE.md](specs/ARCHITECTURE.md) | COMPLETE | Component layout matches spec |
22-
| [DATA_MODEL.md](specs/DATA_MODEL.md) | COMPLETE | Entry, Spine, Chain, SpineConfig, EntryType (15+ variants) |
22+
| [DATA_MODEL.md](specs/DATA_MODEL.md) | COMPLETE | Entry, Spine, Chain, SpineConfig, EntryType (18+ variants incl. cross-gate trust) |
2323
| [PURE_RUST_RPC.md](specs/PURE_RUST_RPC.md) | COMPLETE | tarpc + pure JSON-RPC (hand-rolled), no gRPC/protobuf/jsonrpsee. Semantic naming. Protocol escalation (`IpcProtocol` negotiation). |
2424
| [WAYPOINT_SEMANTICS.md](specs/WAYPOINT_SEMANTICS.md) | COMPLETE | `anchor_slice`, `checkout_slice`, `depart_slice`, `record_operation` implemented. `WaypointConfig` with `AttestationRequirement` (None/BoundaryOnly/AllOperations/Selective). `AttestationResult` for capability-discovered attestation providers. `PropagationPolicy`, `SliceTerms`, `SliceOperationType`, `WaypointSummary` types defined. `RelendingChain` with multi-hop sublend/return. `ExpirySweeper` for auto-return. |
2525
| [CERTIFICATE_LAYER.md](specs/CERTIFICATE_LAYER.md) | COMPLETE | Core CRUD + loan/return + sublend + `verify_certificate` + `generate_provenance_proof` + escrow + `UsageSummary` integrated into `CertificateReturn` and `LoanRecord`. `WaypointSummary` re-used from waypoint module. Scyborg license schema. Certificate module: types, lifecycle, metadata, provenance, escrow, usage, tests. |
@@ -46,14 +46,14 @@ This document tracks implementation progress against the specification suite in
4646

4747
| Metric | Target | Current |
4848
|--------|--------|---------|
49-
| Tests || 1,574 (193 source files) |
49+
| Tests || 1,583 (194 source files) |
5050
| Concurrent testing || All tests concurrent (zero `#[serial]`), zero flaky storage tests |
5151
| Coverage (llvm-cov) | 90%+ | 90.92% line / 89.09% branch / 92.92% region |
5252
| `unsafe` in production | 0 | 0 (`#![forbid(unsafe_code)]`) |
5353
| Clippy pedantic+nursery | 0 | 0 (including `missing_const_for_fn` at warn level) |
5454
| Doc warnings | 0 | 0 |
55-
| Max file size | < 800 lines | 605 max production (discovery_client/mod.rs); 787 max test file (service_tests.rs) |
56-
| Source files || 193 `.rs` files (+ 3 fuzz targets) |
55+
| Max file size | < 800 lines | 640 max production (entry/mod.rs); 789 max test file (service_tests.rs) |
56+
| Source files || 194 `.rs` files (+ 3 fuzz targets) |
5757
| Edition | 2024 | 2024 |
5858
| `#[allow]` in production | 4 |`clippy::wildcard_imports` (tarpc macro; `#[expect]` unfulfilled in test target) + 2× `clippy::unused_async` (feature-conditional for dns-srv/mdns; `#[expect]` unfulfilled with `--all-features`) |
5959
| `#[allow]` in tests | 0 | 0 (all migrated to `#[expect(reason)]` or removed as unfulfilled) |
@@ -148,6 +148,24 @@ Gap to A++: `seed_fingerprint` (build-time BLAKE3 hash of the released binary).
148148

149149
---
150150

151+
## v0.9.16 Deep Debt — Lint Evolution, Test Cohesion, Clone Audit (June 3, 2026)
152+
153+
- **Lint evolution**: Last `#[allow(dead_code)]` on `DispatchOutcome::is_ok` evolved to `#[cfg_attr(not(test), expect(dead_code))]`.
154+
- **Smart-split `entry_tests.rs`**: 845L → 639L. 9 cross-gate trust tests extracted to dedicated `entry_tests_trust.rs` (213L). All source files under 800L.
155+
- **Clone audit**: High-clone files (`expiry_sweeper` 20, `certificate_loan` 16) audited — all test-only or O(1) Arc clones. Zero optimizable clones.
156+
- **10-dimension audit clean**: Zero files >800L, zero unsafe, zero TODO/FIXME, zero hardcoded paths in prod, zero mocks in prod. 8 `#[expect(dead_code)]` documented with deployment context.
157+
- **Test count**: 1,583 (unchanged). 194 source files (up from 193).
158+
159+
---
160+
161+
## v0.9.16 Cross-Gate Trust Entry Schema — Wave 76 Parity Sprint (June 3, 2026)
162+
163+
- **3 new `EntryType` variants**: `KeyExchange`, `TrustIssuerRegistration`, `TokenVerificationCrossGate` for cross-gate trust establishment. All in `"trust"` domain, excluded from waypoint spines.
164+
- **9 new tests**: Domain classification, waypoint exclusion, JSON serde roundtrips (optional fields, canonical bytes, full Entry roundtrip).
165+
- **Test count**: 1,583 (up from 1,574). FRAGO ACK: `wave76-parity-sprint-provenance`.
166+
167+
---
168+
151169
## v0.9.16 Evolution — Readiness Diagnostics, Attribution, Auth Peer Info (June 2, 2026)
152170

153171
- **Readiness probe**: Now exercises storage read path and reports spine count in reason field, not just lock acquisition.

WHATS_NEXT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
# Development Roadmap
44

55
**Current Version**: 0.9.16
6-
**Last Updated**: June 2, 2026
6+
**Last Updated**: June 3, 2026
77

88
---
99

1010
## Documentation changelog
1111

12+
- **June 3, 2026****Deep Debt + Wave 76 Parity Sprint**: Cross-gate trust entry schema (3 new `EntryType` variants: `KeyExchange`, `TrustIssuerRegistration`, `TokenVerificationCrossGate`). FRAGO ACK for `wave76-parity-sprint-provenance`. Smart-split `entry_tests.rs` (845→639L). Last `#[allow(dead_code)]` evolved to `#[cfg_attr(not(test), expect(dead_code))]`. 10-dimension audit clean. 1,583 tests, 194 source files.
13+
1214
- **June 2, 2026****Handler Evolution — Fidelity, Transport, Diagnostics**: 17 thin/stub handlers evolved to real implementations across 4 commits. `health.check` real uptime, error transparency in get ops, `braid.commit` real index, `InclusionProof::verify` Merkle path validation. Discovery `tower-atomic` + `discovery-http` features enabled on service binary. `lifecycle.status` shared state handle. `slice.checkout` correct hash, `permanence.verify_commit` entry type check. `spine.seal` reason field, `all_required_available()` enforcement, `permanence.health_check` structured diagnostics. Readiness storage verification, `get_attribution` contributor collection, `auth.peer_info` auth mode. 1,574 tests (44 new from unlocked features + capability test).
1315

1416
- **June 1, 2026****Wave 67 — strandGate provenance gate ack**: loamSpine assigned to strandGate (provenance trio: rhizoCrypt + loamSpine + sweetGrass). Hardware ready (Dual EPYC 7452, 256GB ECC), deployment blocked on Phase 1 mesh validation. Lint evolution: 6 `#[allow(dead_code)]` → 4 `#[expect(dead_code)]` for pre-wired strandGate deploy entry points + 2 cleaned of unnecessary annotation. Mountain status: all 10 deep-debt dimensions clean. May 29 handoff archived, Wave 67 ack created.

crates/loam-spine-core/src/entry/entry_tests.rs

Lines changed: 0 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -557,212 +557,6 @@ fn public_chain_anchor_not_allowed_in_waypoint() {
557557
assert!(!ty.allowed_in_waypoint());
558558
}
559559

560-
#[test]
561-
fn entry_type_domain_cross_gate_trust() {
562-
let local = Did::new("did:key:z6MkLocalGate");
563-
let remote = Did::new("did:key:z6MkRemoteGate");
564-
565-
assert_eq!(
566-
EntryType::KeyExchange {
567-
local_gate: local.clone(),
568-
remote_gate: remote.clone(),
569-
public_key_hash: [1u8; 32],
570-
direction: "initiated".into(),
571-
family_id: Some("family-alpha".into()),
572-
}
573-
.domain(),
574-
"trust"
575-
);
576-
577-
assert_eq!(
578-
EntryType::TrustIssuerRegistration {
579-
issuer_did: remote.clone(),
580-
registering_gate: local.clone(),
581-
trust_scope: "cross-gate".into(),
582-
capabilities: vec!["signing".into(), "verification".into()],
583-
expires_at: None,
584-
}
585-
.domain(),
586-
"trust"
587-
);
588-
589-
assert_eq!(
590-
EntryType::TokenVerificationCrossGate {
591-
issuer_gate: remote,
592-
verifier_gate: local,
593-
token_hash: [2u8; 32],
594-
verified: true,
595-
failure_reason: None,
596-
}
597-
.domain(),
598-
"trust"
599-
);
600-
}
601-
602-
#[test]
603-
fn cross_gate_trust_not_allowed_in_waypoint() {
604-
let gate = Did::new("did:key:z6MkGate");
605-
assert!(!EntryType::KeyExchange {
606-
local_gate: gate.clone(),
607-
remote_gate: gate.clone(),
608-
public_key_hash: [0u8; 32],
609-
direction: "initiated".into(),
610-
family_id: None,
611-
}
612-
.allowed_in_waypoint());
613-
614-
assert!(!EntryType::TrustIssuerRegistration {
615-
issuer_did: gate.clone(),
616-
registering_gate: gate.clone(),
617-
trust_scope: "family".into(),
618-
capabilities: vec![],
619-
expires_at: None,
620-
}
621-
.allowed_in_waypoint());
622-
623-
assert!(!EntryType::TokenVerificationCrossGate {
624-
issuer_gate: gate.clone(),
625-
verifier_gate: gate,
626-
token_hash: [0u8; 32],
627-
verified: false,
628-
failure_reason: Some("expired".into()),
629-
}
630-
.allowed_in_waypoint());
631-
}
632-
633-
#[test]
634-
fn entry_type_serde_roundtrip_key_exchange() {
635-
let ty = EntryType::KeyExchange {
636-
local_gate: Did::new("did:key:z6MkStrandGate"),
637-
remote_gate: Did::new("did:key:z6MkBiomeGate"),
638-
public_key_hash: [0xab; 32],
639-
direction: "initiated".into(),
640-
family_id: Some("family-alpha".into()),
641-
};
642-
let json = serde_json::to_vec(&ty).expect("serialize");
643-
let restored: EntryType = serde_json::from_slice(&json).expect("deserialize");
644-
assert!(matches!(
645-
restored,
646-
EntryType::KeyExchange { direction, .. } if direction == "initiated"
647-
));
648-
}
649-
650-
#[test]
651-
fn entry_type_serde_roundtrip_trust_issuer_registration() {
652-
let ty = EntryType::TrustIssuerRegistration {
653-
issuer_did: Did::new("did:key:z6MkIssuer"),
654-
registering_gate: Did::new("did:key:z6MkStrandGate"),
655-
trust_scope: "cross-gate".into(),
656-
capabilities: vec!["signing".into(), "verification".into()],
657-
expires_at: Some(Timestamp::now()),
658-
};
659-
let json = serde_json::to_vec(&ty).expect("serialize");
660-
let restored: EntryType = serde_json::from_slice(&json).expect("deserialize");
661-
assert!(matches!(
662-
restored,
663-
EntryType::TrustIssuerRegistration { trust_scope, .. } if trust_scope == "cross-gate"
664-
));
665-
}
666-
667-
#[test]
668-
fn entry_type_serde_roundtrip_token_verification_cross_gate() {
669-
let ty = EntryType::TokenVerificationCrossGate {
670-
issuer_gate: Did::new("did:key:z6MkIssuerGate"),
671-
verifier_gate: Did::new("did:key:z6MkVerifierGate"),
672-
token_hash: [0xcd; 32],
673-
verified: true,
674-
failure_reason: None,
675-
};
676-
let json = serde_json::to_vec(&ty).expect("serialize");
677-
let restored: EntryType = serde_json::from_slice(&json).expect("deserialize");
678-
assert!(matches!(
679-
restored,
680-
EntryType::TokenVerificationCrossGate { verified: true, .. }
681-
));
682-
}
683-
684-
#[test]
685-
fn entry_type_serde_roundtrip_token_verification_failed() {
686-
let ty = EntryType::TokenVerificationCrossGate {
687-
issuer_gate: Did::new("did:key:z6MkIssuerGate"),
688-
verifier_gate: Did::new("did:key:z6MkVerifierGate"),
689-
token_hash: [0xef; 32],
690-
verified: false,
691-
failure_reason: Some("signature mismatch".into()),
692-
};
693-
let json = serde_json::to_vec(&ty).expect("serialize");
694-
let restored: EntryType = serde_json::from_slice(&json).expect("deserialize");
695-
assert!(matches!(
696-
&restored,
697-
EntryType::TokenVerificationCrossGate { verified: false, failure_reason: Some(reason), .. }
698-
if reason == "signature mismatch"
699-
));
700-
}
701-
702-
#[test]
703-
fn entry_type_serde_key_exchange_no_family() {
704-
let ty = EntryType::KeyExchange {
705-
local_gate: Did::new("did:key:z6MkLocal"),
706-
remote_gate: Did::new("did:key:z6MkRemote"),
707-
public_key_hash: [0xff; 32],
708-
direction: "accepted".into(),
709-
family_id: None,
710-
};
711-
let json = serde_json::to_string(&ty).expect("serialize");
712-
assert!(!json.contains("family_id"));
713-
let restored: EntryType = serde_json::from_str(&json).expect("deserialize");
714-
assert!(matches!(
715-
restored,
716-
EntryType::KeyExchange { family_id: None, direction, .. } if direction == "accepted"
717-
));
718-
}
719-
720-
#[test]
721-
fn entry_type_serde_trust_issuer_no_expiry() {
722-
let ty = EntryType::TrustIssuerRegistration {
723-
issuer_did: Did::new("did:key:z6MkIssuer"),
724-
registering_gate: Did::new("did:key:z6MkGate"),
725-
trust_scope: "global".into(),
726-
capabilities: vec!["signing".into()],
727-
expires_at: None,
728-
};
729-
let json = serde_json::to_string(&ty).expect("serialize");
730-
assert!(!json.contains("expires_at"));
731-
let restored: EntryType = serde_json::from_str(&json).expect("deserialize");
732-
assert!(matches!(
733-
restored,
734-
EntryType::TrustIssuerRegistration { expires_at: None, .. }
735-
));
736-
}
737-
738-
#[test]
739-
fn cross_gate_entry_full_roundtrip() {
740-
let did = Did::new("did:key:z6MkCommitter");
741-
let entry = Entry::new(
742-
5,
743-
Some([0xaa; 32]),
744-
did,
745-
EntryType::KeyExchange {
746-
local_gate: Did::new("did:key:z6MkStrandGate"),
747-
remote_gate: Did::new("did:key:z6MkBiomeGate"),
748-
public_key_hash: [0xbb; 32],
749-
direction: "initiated".into(),
750-
family_id: Some("family-alpha".into()),
751-
},
752-
)
753-
.with_spine_id(SpineId::now_v7())
754-
.with_metadata("wave", "76");
755-
756-
let bytes = entry.to_canonical_bytes().expect("canonical");
757-
assert!(!bytes.is_empty());
758-
759-
let json = serde_json::to_vec(&entry).expect("serialize");
760-
let restored: Entry = serde_json::from_slice(&json).expect("deserialize");
761-
assert_eq!(restored.index, 5);
762-
assert_eq!(restored.domain(), "trust");
763-
assert_eq!(restored.metadata.get("wave"), Some(&"76".to_string()));
764-
}
765-
766560
fn arb_did() -> impl Strategy<Value = Did> {
767561
"[a-z]{3,8}".prop_map(|s| Did::new(format!("did:key:z6Mk{s}")))
768562
}

0 commit comments

Comments
 (0)