From 6938dbed3aeab0dab41028496bae1ff266ebfa86 Mon Sep 17 00:00:00 2001 From: faumaray Date: Tue, 27 Oct 2026 21:03:05 +0300 Subject: [PATCH] Pin VoelinProtocol at the tag v0.2.0 The three entries of [workspace.dependencies] (voelin-identity, voelin-proto, voelin-model) were pinned by rev c5bb6b9 and are now { git, tag = "v0.2.0" } (a45c154), and so is voelin-model in spikes/gpui. Cargo.lock of both workspaces changes in those packages only: the three sources, and voelin-model 0.1.0 -> 0.2.0 (the crates' manifests are otherwise the same at both revisions, so the lock was edited by hand and checked with --locked; `cargo update -p` also moved eleven unrelated edges, such as windows-sys 0.61.2 -> 0.52.0, and was discarded). One revision of each crate in both locks. THIRD_PARTY_NOTICES.md is unchanged (scripts/notices.sh --check is clean). What "For consumers" of the protocol's CHANGELOG lists for this pin: - KeyStore::sign_out lists a device key once. The test that unbinds a device key whose row carries a device-only binding counted it with `contains`; it now counts one entry in `unbound` and none in `removed`, and a new test does the same for Forget (one entry in `removed`, none in `unbound`). Both fail with the pin at c5bb6b9. - Debug of Hello, Welcome, Server and others prints : no test of the client compares a Debug text of a protocol message. - The conformance suite still has 17 cases; the two places that named the old rev in a string or a comment name the tag. Co-Authored-By: Claude Sonnet 5.5 --- Cargo.lock | 8 +-- Cargo.toml | 17 ++++--- crates/voelin-core/src/link/fake_tests.rs | 2 +- .../src/ts/ts_session/live_tests.rs | 2 +- crates/voelin-store/tests/keystore.rs | 50 ++++++++++++++++++- spikes/gpui/Cargo.lock | 8 +-- spikes/gpui/Cargo.toml | 4 +- 7 files changed, 70 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e48078..9255212 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12597,7 +12597,7 @@ dependencies = [ [[package]] name = "voelin-identity" version = "0.2.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "aws-lc-rs", "base64 0.23.1", @@ -12655,8 +12655,8 @@ dependencies = [ [[package]] name = "voelin-model" -version = "0.1.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +version = "0.2.0" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "prost", "serde", @@ -12695,7 +12695,7 @@ dependencies = [ [[package]] name = "voelin-proto" version = "0.2.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "bytes", "prost", diff --git a/Cargo.toml b/Cargo.toml index f8fb442..cfef35d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,15 +59,18 @@ publish = false # The protocol repository is private (VoelinProtocol). This is the SSH URL its # docs/development.md names, so that a per-developer .cargo/config.toml [patch] # can point it at a sibling checkout (docs/building.md, "Working with a sibling -# VoelinProtocol checkout"). Pinned by commit until the protocol tags a release: -# the three crates below are at one revision (main c5bb6b9: the account-bound -# KeyStore whose sign-out keeps every device key and the release of a device key, -# Phase 2 task 34; the account types of the session seam). -voelin-identity = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" } +# VoelinProtocol checkout"). Pinned by the release tag (v0.2.0 is the first with the +# protocol crates; its README, "Releases", says how): the three crates below are at +# one tag, so the lock has one revision of each, and moving to a newer release means +# changing the `tag` of all three together (docs/building.md, "Depending on +# VoelinProtocol"). The account-bound KeyStore whose sign-out keeps every device key +# and the release of a device key, Phase 2 task 34, and the account types of the +# session seam are in it. +voelin-identity = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", tag = "v0.2.0" } # The backend-neutral session seam (`voelin_proto::link`) and the v1 messages. -voelin-proto = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" } +voelin-proto = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", tag = "v0.2.0" } # The UI-facing domain model and the client's replica of v1 entities. -voelin-model = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" } +voelin-model = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", tag = "v0.2.0" } # GPUI, gpui-component and their assets for the GPUI front end (voelin-gpui). Pre-1.0: # pinned exactly (it pins its `gpui-pre` snapshot exactly too), upgraded in commits of # their own after rebuilding spikes/gpui on the new release (docs/design/gpui-spikes.md, diff --git a/crates/voelin-core/src/link/fake_tests.rs b/crates/voelin-core/src/link/fake_tests.rs index a04b9ee..e2d4171 100644 --- a/crates/voelin-core/src/link/fake_tests.rs +++ b/crates/voelin-core/src/link/fake_tests.rs @@ -313,7 +313,7 @@ async fn the_conformance_suite_passes_on_a_session_of_the_registry() { } let report = conformance::run(&through_the_registry).await; assert_eq!(report.cases.len(), conformance::CASES.len()); - assert_eq!(report.cases.len(), 17, "the suite of c5bb6b9 has 17 cases"); + assert_eq!(report.cases.len(), 17, "the suite of v0.2.0 has 17 cases"); assert!( report.cases.iter().all(|(_, verdict)| *verdict == Verdict::Passed), "{:?}", diff --git a/crates/voelin-core/src/ts/ts_session/live_tests.rs b/crates/voelin-core/src/ts/ts_session/live_tests.rs index ba51e9a..cbf578e 100644 --- a/crates/voelin-core/src/ts/ts_session/live_tests.rs +++ b/crates/voelin-core/src/ts/ts_session/live_tests.rs @@ -333,7 +333,7 @@ enum Expect { } use Expect::{NotRun, Passes, Skipped}; -/// Every case of the suite of the protocol repository at `c5bb6b9`, in its +/// Every case of the suite of the protocol repository at `v0.2.0`, in its /// order, with what a TeamSpeak session does with it. A case the suite gains /// fails `the_suite_is_known` until it is listed here. /// diff --git a/crates/voelin-store/tests/keystore.rs b/crates/voelin-store/tests/keystore.rs index cb1b595..3b4600f 100644 --- a/crates/voelin-store/tests/keystore.rs +++ b/crates/voelin-store/tests/keystore.rs @@ -791,6 +791,11 @@ fn pair(blob: &IdentityBlob) -> (String, String) { (blob.kind.clone(), blob.uid.clone()) } +/// How many times a sign-out's list names the identity `key` (by kind and uid). +fn times_listed(infos: &[IdentityInfo], key: &IdentityInfo) -> usize { + infos.iter().filter(|info| info.kind == key.kind && info.uid == key.uid).count() +} + /// The record of the install replaced by damaged JSON. fn damage_the_record(store: &SqliteKeyStore, json: &str) { let mut damaged = store.get(KIND_ACCOUNT, &record().blob_uid()).unwrap().unwrap(); @@ -1887,9 +1892,19 @@ fn a_device_key_that_carries_a_binding_is_unbound_and_keeps_the_rest_of_its_row( }; assert!(bound(&before), "the setup binds the key"); + // It is listed once, as kept: VoelinProtocol before v0.2.0 listed a key whose + // row carried the binding twice in `unbound`. let done = install.store.sign_out(&binding().account, DeviceKeyChoice::Auto).unwrap(); - assert!(done.unbound.contains(&device_key_info()), "{bound_existing_key}: {done:?}"); - assert!(!done.removed.contains(&device_key_info()), "{bound_existing_key}: {done:?}"); + assert_eq!( + times_listed(&done.unbound, &device_key_info()), + 1, + "{bound_existing_key}: {done:?}" + ); + assert_eq!( + times_listed(&done.removed, &device_key_info()), + 0, + "{bound_existing_key}: {done:?}" + ); let after = named_row(&db, KIND_VOELIN, &uid); assert!(!bound(&after), "{bound_existing_key}: unbound"); @@ -1905,6 +1920,37 @@ fn a_device_key_that_carries_a_binding_is_unbound_and_keeps_the_rest_of_its_row( } } +#[test] +fn a_device_key_that_carries_a_binding_is_listed_once_as_deleted_when_it_is_forgotten() { + // The same row, named by `Forget`: the sign-out unbinds it in its loop over + // the account's identities and deletes it after. It is listed once, as + // deleted; VoelinProtocol before v0.2.0 also left it in `unbound`. + for bound_existing_key in [true, false] { + let Install { store, .. } = signed_in_install(bound_existing_key); + let device_only = AccountBinding { synced: false, ..binding() }; + store.put(&IdentityBlob::voelin(&key()).unwrap().with_binding(device_only)).unwrap(); + + let done = + store.sign_out(&binding().account, DeviceKeyChoice::Forget(key().uid())).unwrap(); + assert_eq!( + times_listed(&done.removed, &device_key_info()), + 1, + "{bound_existing_key}: {done:?}" + ); + assert_eq!( + times_listed(&done.unbound, &device_key_info()), + 0, + "{bound_existing_key}: {done:?}" + ); + assert!(store.voelin_key(&key().uid()).unwrap().is_none(), "the key is deleted"); + assert_eq!(store.account_record().unwrap(), None); + assert_eq!( + store.sign_out(&binding().account, DeviceKeyChoice::Auto).unwrap(), + SignOut::default() + ); + } +} + #[test] fn a_sign_out_scrubs_the_copies_it_deletes_and_leaves_the_kept_keys_in_the_file() { // What a sign-out still deletes is a synced copy (a private key, which diff --git a/spikes/gpui/Cargo.lock b/spikes/gpui/Cargo.lock index 12a6d55..78c6180 100644 --- a/spikes/gpui/Cargo.lock +++ b/spikes/gpui/Cargo.lock @@ -9723,7 +9723,7 @@ dependencies = [ [[package]] name = "voelin-identity" version = "0.2.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "aws-lc-rs", "base64 0.23.1", @@ -9766,8 +9766,8 @@ dependencies = [ [[package]] name = "voelin-model" -version = "0.1.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +version = "0.2.0" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "prost", "serde", @@ -9802,7 +9802,7 @@ dependencies = [ [[package]] name = "voelin-proto" version = "0.2.0" -source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?rev=c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562#c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" +source = "git+ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git?tag=v0.2.0#a45c1541b76dcccd23137a357a1e78dfccddc833" dependencies = [ "bytes", "prost", diff --git a/spikes/gpui/Cargo.toml b/spikes/gpui/Cargo.toml index 2a17413..c81dc51 100644 --- a/spikes/gpui/Cargo.toml +++ b/spikes/gpui/Cargo.toml @@ -28,8 +28,8 @@ voelin-core = { path = "../../crates/voelin-core", default-features = false, fea voelin-media = { path = "../../crates/voelin-media", default-features = false, features = ["vpx", "openh264", "ffmpeg", "av1", "x11"] } voelin-platform = { path = "../../crates/voelin-platform", default-features = false, features = ["x11"] } voelin-ui-vm = { path = "../../crates/voelin-ui-vm" } -# The revision the root workspace pins (chat messages for voelin-ui-vm). -voelin-model = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", rev = "c5bb6b914bdab86eb36f6e32a1a5bc9ac4785562" } +# The tag the root workspace pins (chat messages for voelin-ui-vm). +voelin-model = { git = "ssh://gitea@git.faumaray.com/Voelin/VoelinProtocol.git", tag = "v0.2.0" } # Logs of GPUI (the adapter it picked) and of the client's crates. env_logger = { version = "0.11", default-features = false, features = ["auto-color", "humantime"] } log = "0.4"