From e26fae836be9c78967aa50cf2cba1ba304e78a12 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 05:41:58 +0000 Subject: [PATCH] Fix the laptop build: fleet's lock gains blake3, id-store's SQLite guard allows dev-only SQLite f9e2d616 (atlas plain-tree change detection, #9980) added blake3 to atlas-core, which fleet builds by path, without updating pkgs/fleet/Cargo.lock; the offline vendored fleet build then fails with "no matching package named `blake3`". `cargo update -p atlas-core` adds blake3 1.8.7 and its two dependencies, nothing else. a1295a2b (graph encoding bake-off, #11984) gave id-store a rusqlite dev-dependency. Cargo.lock records dev edges, so test_the_lock_has_no_sqlite_with_logsync_wired failed with "id-store depends on rusqlite". The guard now lets id-store through the lock check once its own manifest shows SQLite only under dev-dependencies, the same allowance the facade package already has; the cargo tree check of the shipped graph is unchanged. Co-Authored-By: Claude Opus 5.5 --- pkgs/fleet/Cargo.lock | 26 +++++++++++++++++++ pkgs/id/crates/id-store/tests/store_traits.rs | 15 +++++++++++ 2 files changed, 41 insertions(+) diff --git a/pkgs/fleet/Cargo.lock b/pkgs/fleet/Cargo.lock index 79011d7125..210edc41cd 100644 --- a/pkgs/fleet/Cargo.lock +++ b/pkgs/fleet/Cargo.lock @@ -31,6 +31,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + [[package]] name = "ascii" version = "1.1.0" @@ -44,6 +50,7 @@ dependencies = [ "atlas-embed", "atlas-proto", "base64 0.23.1", + "blake3", "rusqlite", "serde", "serde_json", @@ -137,6 +144,19 @@ version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +[[package]] +name = "blake3" +version = "1.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9e454fc11f76977dc803893aff6304ed33d6a26efae8696573bea74baa27ae" +dependencies = [ + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "cpufeatures", +] + [[package]] name = "block-buffer" version = "0.12.1" @@ -266,6 +286,12 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + [[package]] name = "cookie" version = "0.18.2" diff --git a/pkgs/id/crates/id-store/tests/store_traits.rs b/pkgs/id/crates/id-store/tests/store_traits.rs index bb350e0416..932fc99e43 100644 --- a/pkgs/id/crates/id-store/tests/store_traits.rs +++ b/pkgs/id/crates/id-store/tests/store_traits.rs @@ -182,6 +182,20 @@ fn test_the_lock_has_no_sqlite_with_logsync_wired() { shipped build (see vendor/README.md)" ); } + // This crate may also declare SQLite names only as dev-dependencies: the graph + // encoding bake-off (#10219) measures real SQLite. Cargo.lock records dev edges + // too, so the lock check below lets this crate through once its manifest shows + // SQLite stays out of its shipped dependencies; cargo tree below checks the graph. + let own_manifest = std::fs::read_to_string(format!("{manifest_dir}/Cargo.toml")).unwrap(); + let own = manifest_package_name(&own_manifest).unwrap(); + let own_shipped = manifest_dep_names(&own_manifest, false); + for name in SQLITE { + assert!( + !own_shipped.iter().any(|declared| declared.as_str() == name), + "{own}/Cargo.toml declares {name} outside dev-dependencies: SQLite is back in \ + the shipped build (see vendor/README.md)" + ); + } // Cargo.lock includes optional dependency edges. p2panda-store declares optional `sqlx`, // which is inactive in the shipped default-feature graph checked below. for (name, deps) in &packages { @@ -190,6 +204,7 @@ fn test_the_lock_has_no_sqlite_with_logsync_wired() { assert!( SQLITE.contains(&name.as_str()) || name == &root + || name == &own || (name == "p2panda-store" && dep == "sqlx") // Cargo.lock records sqlx-sqlite's optional backend edge even // when it is inactive; cargo tree below checks the shipped graph.