Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion pkgs/id/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions pkgs/id/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ categories = ["command-line-utilities", "network-programming"]
# id-core sub-crate under crates/; this package is the workspace root.

[workspace]
members = ["crates/id-core", "crates/id-caps", "crates/id-store", "crates/id-events", "crates/id-sync", "crates/id-native-shell"]
members = ["crates/id-core", "crates/id-caps", "crates/id-store", "crates/id-events", "crates/id-groups", "crates/id-sync", "crates/id-native-shell"]
# The vendored crates stay OUT of the workspace: as path dependencies inside
# this directory Cargo would otherwise treat them as members, and a member's
# feature graph joins the lock resolve — p2panda-sync's `test_utils` feature
# forwards to `p2panda-store/test_utils`, whose `sqlite` feature pulls sqlx
# into Cargo.lock even though no build here enables it (see vendor/README.md).
exclude = ["vendor/p2panda-sync", "vendor/p2panda-encryption"]
default-members = [".", "crates/id-core", "crates/id-caps", "crates/id-store", "crates/id-events", "crates/id-sync"]
default-members = [".", "crates/id-core", "crates/id-caps", "crates/id-store", "crates/id-events", "crates/id-groups", "crates/id-sync"]

# =============================================================================
# Features
Expand Down Expand Up @@ -80,6 +80,9 @@ id-events = { path = "crates/id-events", default-features = false }
# Sync-family modules extracted in step 3 of the crate split (#4406).
# Re-exported at their historical crate:: paths in src/lib.rs.
id-sync = { path = "crates/id-sync", default-features = false }
# Groups-family modules extracted in step 4 of the crate split (#4407).
# Re-exported at their historical crate:: paths in src/lib.rs.
id-groups = { path = "crates/id-groups", default-features = false }
anyhow = "1"
cbor-core = { version = "=0.10.1", features = ["serde"] }
# Calendar arithmetic and the IANA time-zone database for the did-it tracker's
Expand Down Expand Up @@ -111,11 +114,9 @@ p2panda-sync = { path = "vendor/p2panda-sync" }
p2panda-auth = { git = "https://github.com/p2panda/p2panda", rev = "da80c05b95269926bf58121cf6a2d3dd5ca41dfc", features = [
"serde",
] }
# DataScheme group encryption (P4.1, src/encryption/). `data_scheme` is on because the adapter is the
# scheme. `test_utils` and `message_scheme` stay off: the adapter brings its own orderer and membership.
p2panda-encryption = { path = "vendor/p2panda-encryption", default-features = false, features = [
"data_scheme",
] }
# DataScheme group encryption (P4.1) moved to id-groups in step 4 of the
# crate split (#4407): the vendored p2panda-encryption dependency is
# declared there now, with the same features.
postcard = { version = "1", features = ["alloc"] }
rand = "0.10"
redb = "=4.3.0"
Expand Down
134 changes: 134 additions & 0 deletions pkgs/id/crates/id-groups/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
[package]
name = "id-groups"
version = "0.1.0"
edition = "2024"
rust-version = "1.96"
description = "Groups layer of the id crate: group actions and log, local warnings, blob gate and group encryption (pkgs/id crate split step 4, #4407)"
license = "MIT OR Apache-2.0"

# Step 4 of the pkgs/id crate split (#3447 umbrella, #4407): the
# policy/enforcement remainder of the group layer lives here, over the
# group model and fold in id-events (step 2b ruling on #4405: the model
# does not move again). Contents: the groups remainder (`groups`:
# actions, the group log, local warnings), the blob gate's enforcement
# logic (`blob_gate`; the `FoldedWorlds` adapter over `groups::worlds`
# stays in the facade with worlds.rs until step 5 extracts id-worlds),
# and the DataScheme group encryption (`encryption`). Dependencies per
# the design map: id-core, id-store, id-events.

[features]
default = []

[dependencies]
anyhow = "1"
id-core = { path = "../id-core", default-features = false }
id-events = { path = "../id-events", default-features = false }
id-store = { path = "../id-store", default-features = false }
iroh-base = "1"
iroh-blobs = "0.103"
p2panda-core = { git = "https://github.com/p2panda/p2panda", rev = "da80c05b95269926bf58121cf6a2d3dd5ca41dfc" }
p2panda-encryption = { path = "../../vendor/p2panda-encryption", default-features = false, features = [
"data_scheme",
] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
tokio = { version = "1", features = ["full"] }
tracing = "0.1"

[dev-dependencies]
postcard = { version = "1", features = ["alloc"] }
proptest = "1.12"
tempfile = "3"
tokio = { version = "1", features = ["test-util"] }

[lints.rust]
# Rust compiler lints
unsafe_code = "warn"
rust_2018_idioms = { level = "warn", priority = -1 }
rust_2024_compatibility = { level = "warn", priority = -1 }
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unused_lifetimes = "warn"
unused_qualifications = "warn"
# Treat some warnings as errors in CI
# dead_code = "deny"
# unused_imports = "deny"

[lints.clippy]
# Enable standard lint groups
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }

# Deny critical issues - these indicate bugs or serious problems
# Test modules should add: #[allow(clippy::unwrap_used, clippy::expect_used)]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
unimplemented = "deny"
todo = "deny"
dbg_macro = "deny"
# Allow print macros - this is a CLI application
print_stdout = "allow"
print_stderr = "allow"

# Restriction lints - selectively enable valuable checks
clone_on_ref_ptr = "warn"
create_dir = "warn"
deref_by_slicing = "warn"
empty_structs_with_brackets = "warn"
filetype_is_file = "warn"
float_cmp_const = "warn"
fn_to_numeric_cast_any = "warn"
format_push_string = "warn"
get_unwrap = "warn"
if_then_some_else_none = "warn"
lossy_float_literal = "warn"
map_err_ignore = "warn"
mem_forget = "warn"
mixed_read_write_in_expression = "warn"
mutex_atomic = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_type_annotations = "warn"
rest_pat_in_fully_bound_structs = "warn"
same_name_method = "warn"
self_named_module_files = "warn"
str_to_string = "warn"
string_add = "warn"
# string_to_string removed - clippy::implicit_clone covers it
suspicious_xor_used_as_pow = "warn"
try_err = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unneeded_field_pattern = "warn"
verbose_file_reads = "warn"

# Allow specific lints - too noisy or conflict with project style
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
redundant_pub_crate = "allow"
significant_drop_tightening = "allow"
option_if_let_else = "allow"
multiple_crate_versions = "allow"
cargo_common_metadata = "allow"
too_many_lines = "allow"
# Allow these - they're reasonable for CLI app complexity
too_many_arguments = "allow"
fn_params_excessive_bools = "allow"
struct_excessive_bools = "allow"
cognitive_complexity = "allow"
future_not_send = "allow"
# TODO(P8.8): Clippy 1.99 fires these on about 50 `assert!(x.is_empty())` sites
# and 2 `chunks_exact` sites. Allowed until the lints review in plan step P8.8
# (doc/2026-10-11T11-08-42Z_design_remaining_work/plan-phases.md).
assert_is_empty = "allow"
chunks_exact_to_as_chunks = "allow"
Loading
Loading