Skip to content

Commit be9793a

Browse files
author
NestGate Team
committed
feat: wetSpring parity — capability registry, method normalization, workspace lint evolution
- capability_registry.toml: machine-readable self-knowledge (12 groups, 46+ methods) - consumed_capabilities manifest: security, discovery, crypto (Wire Standard L3) - normalize_method(): zero-alloc legacy prefix stripping for backward compat - clippy.toml: too-many-lines-threshold = 150 - workspace lints: expect_used deny, rust-version 1.85 MSRV - 5 unfulfilled #[expect(too_many_lines)] removed after threshold increase - cargo fmt, clippy, doc, test — all PASS (11,794 tests, 0 failures) Made-with: Cursor
1 parent 3f79d57 commit be9793a

File tree

17 files changed

+167
-19
lines changed

17 files changed

+167
-19
lines changed

CHANGELOG.md

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

1010
## [Unreleased] - 4.7.0-dev
1111

12+
### Session 43e: wetSpring parity — workspace lints, capability registry, method normalization (April 13, 2026)
13+
14+
- **wetSpring pattern validation**: Pulled and analyzed wetSpring V143 systems; identified and resolved
15+
6 ecosystem parity gaps.
16+
- **Workspace lint evolution**: `expect_used` escalated `warn``deny`; `clippy.toml` added with
17+
`too-many-lines-threshold = 150`; `rust-version = "1.85"` (MSRV) set in `[workspace.package]`.
18+
- **`consumed_capabilities` manifest**: Wire Standard L3 `capabilities.list` response now declares
19+
3 consumed capabilities (security, discovery, crypto) instead of empty array.
20+
- **`capability_registry.toml` created**: Machine-readable primal self-knowledge — 12 capability
21+
groups, 46+ methods, 3 consumed capabilities. Matches wetSpring's registry pattern.
22+
- **Method normalization**: `normalize_method()` (zero-alloc `Cow`) strips legacy `nestgate.` prefix
23+
for backward-compatible clients; wired into UDS + isomorphic IPC dispatch.
24+
- **`clippy::too_many_lines` cleanup**: 5 unfulfilled `#[expect]` attributes removed after threshold
25+
increase; 4 justified suppressions retained (160+ line dispatch tables).
26+
- Validation: `cargo fmt`, `cargo clippy`, `cargo doc`, `cargo test` — all PASS (11,794 tests, 0 failures).
27+
1228
### Session 43d: Deep debt evolution — casts, clones, refactors, tracing (April 12, 2026)
1329

1430
- **10 dangerous `as` casts evolved**: `response_builder.rs` pagination → `div_ceil` + `u32::try_from`,

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ members = [
8686
# All ecoPrimals are AGPL-3.0-or-later (strictest copyleft)
8787
# Humans get free use through beardog entropy systems
8888
[workspace.package]
89+
rust-version = "1.85"
8990
license = "AGPL-3.0-or-later"
9091
authors = ["ecoPrimals Collective"]
9192
repository = "https://github.com/ecoprimals/nestgate"
@@ -219,7 +220,7 @@ nursery = { level = "warn", priority = -1 }
219220
significant_drop_tightening = "allow"
220221
unused_self = "allow"
221222
unwrap_used = "deny"
222-
expect_used = "warn"
223+
expect_used = "deny"
223224
panic = "warn"
224225
todo = "deny"
225226
unimplemented = "deny"

STATUS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NestGate - Current Status
22

3-
**Last Updated**: April 12, 2026 (Session 43ddeep debt evolution)
3+
**Last Updated**: April 13, 2026 (Session 43ewetSpring parity)
44
**Version**: 4.7.0-dev
55

66
---

capability_registry.toml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# NestGate Capability Registry — Machine-Readable Self-Knowledge
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
# Copyright (c) 2025-2026 ecoPrimals Collective
4+
#
5+
# This file is the single source of truth for NestGate's primal identity
6+
# and advertised capabilities. Wire Standard L3 responses and cross-check
7+
# tests derive from these definitions.
8+
9+
[primal]
10+
name = "nestgate"
11+
domain = "storage"
12+
version = "4.7.0-dev"
13+
license = "AGPL-3.0-or-later"
14+
description = "Sovereign storage & permanence primal — filesystem-backed durable key-value, blob, and ZFS orchestration"
15+
transport = ["uds", "http"]
16+
protocol = "jsonrpc-2.0"
17+
18+
[capabilities.storage]
19+
domain = "storage"
20+
description = "Filesystem-backed durable key-value and blob storage"
21+
methods = [
22+
"storage.store", "storage.retrieve", "storage.exists",
23+
"storage.delete", "storage.list", "storage.stats",
24+
"storage.store_blob", "storage.retrieve_blob", "storage.fetch_external",
25+
]
26+
27+
[capabilities.model]
28+
domain = "model"
29+
description = "AI model cache — registration, lookup, metadata"
30+
methods = ["model.register", "model.exists", "model.locate", "model.metadata"]
31+
32+
[capabilities.templates]
33+
domain = "templates"
34+
description = "Template persistence and community ranking"
35+
methods = ["templates.store", "templates.retrieve", "templates.list", "templates.community_top"]
36+
37+
[capabilities.session]
38+
domain = "session"
39+
description = "Game session persistence (convenience over storage.*)"
40+
methods = ["session.save", "session.load"]
41+
42+
[capabilities.audit]
43+
domain = "audit"
44+
description = "Execution audit trail persistence"
45+
methods = ["audit.store_execution"]
46+
47+
[capabilities.nat]
48+
domain = "nat"
49+
description = "NAT traversal endpoint persistence"
50+
methods = ["nat.store_traversal_info", "nat.retrieve_traversal_info"]
51+
52+
[capabilities.beacon]
53+
domain = "beacon"
54+
description = "Known beacon persistence for mesh discovery"
55+
methods = ["beacon.store", "beacon.retrieve", "beacon.list", "beacon.delete"]
56+
57+
[capabilities.data]
58+
domain = "data"
59+
description = "External data feed proxying (NCBI, NOAA, IRIS)"
60+
methods = ["data.ncbi_search", "data.ncbi_fetch", "data.noaa_ghcnd", "data.iris_stations", "data.iris_events"]
61+
62+
[capabilities.zfs]
63+
domain = "zfs"
64+
description = "ZFS storage management — pools, datasets, snapshots"
65+
methods = [
66+
"zfs.pool.list", "zfs.pool.get", "zfs.pool.health",
67+
"zfs.dataset.list", "zfs.dataset.get",
68+
"zfs.snapshot.list", "zfs.health",
69+
]
70+
71+
[capabilities.health]
72+
domain = "health"
73+
description = "Liveness, readiness, and health check endpoints"
74+
methods = ["health.liveness", "health.readiness", "health.check"]
75+
76+
[capabilities.identity]
77+
domain = "identity"
78+
description = "Primal identity and self-knowledge"
79+
methods = ["identity.get"]
80+
81+
[capabilities.discovery]
82+
domain = "discovery"
83+
description = "Capability advertisement and listing"
84+
methods = ["capabilities.list", "discover.capabilities"]
85+
86+
# Consumed capabilities — what NestGate needs from other primals
87+
[consumed_capabilities.security]
88+
reason = "BTSP handshake crypto delegation"
89+
required = false
90+
91+
[consumed_capabilities.discovery_mesh]
92+
reason = "Songbird-style service mesh registration and heartbeat"
93+
required = false
94+
95+
[consumed_capabilities.crypto]
96+
reason = "Content-addressed hashing, signature verification (delegated via IPC)"
97+
required = false

clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
too-many-lines-threshold = 150

code/crates/nestgate-api/src/handlers/workspace_management/lifecycle/backup.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use nestgate_core::error::utilities::safe_env_var_or_default;
1111
use super::types::BackupConfig;
1212

1313
/// Backup workspace with ZFS snapshots
14-
#[expect(clippy::too_many_lines)]
1514
pub async fn backup_workspace(
1615
Path(workspace_id): Path<String>,
1716
Json(config): Json<BackupConfig>,

code/crates/nestgate-api/src/handlers/workspace_management/lifecycle/restore.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use nestgate_core::error::utilities::safe_env_var_or_default;
1111
use super::types::RestoreConfig;
1212

1313
/// Restore workspace from backup
14-
#[expect(clippy::too_many_lines)]
1514
pub async fn restore_workspace(
1615
Path(workspace_id): Path<String>,
1716
Json(config): Json<RestoreConfig>,

code/crates/nestgate-bin/src/cli/run.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use crate::error::BinErrorHelper;
99

1010
impl Cli {
1111
/// Run the CLI application
12-
#[expect(clippy::too_many_lines)]
1312
pub async fn run(self) -> crate::error::BinResult<()> {
1413
// Setup logging
1514
setup_logging(self.verbose);

code/crates/nestgate-config/src/config/canonical_primary/domains/storage_canonical/backends/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ mod tests {
399399
}
400400

401401
#[test]
402-
#[expect(clippy::too_many_lines)]
403402
fn full_serde_roundtrip() {
404403
let distributed_node = DistributedStorageNode {
405404
id: "n1".to_string(),

code/crates/nestgate-installer/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
clippy::unnecessary_wraps,
2626
dead_code,
2727
clippy::struct_field_names,
28-
clippy::trivially_copy_pass_by_ref,
29-
clippy::too_many_lines
28+
clippy::trivially_copy_pass_by_ref
3029
)]
3130

3231
//! Main module

0 commit comments

Comments
 (0)