From 2023f7dd50094e98afe70b4eacc5bca90b346b17 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Mon, 12 Oct 2026 14:23:33 +1100 Subject: [PATCH] =?UTF-8?q?chore(identity):=20DO=20NOT=20MERGE=20=E2=80=94?= =?UTF-8?q?=20give=20onboarding-flow=20its=20own=20debug=20Keychain=20slot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every debug build of buzz-app, from any worktree, stores the human key in the same Keychain item (service `dev.local.buzz.foundation.identity.debug`, account `human`). That item already holds the real key from another worktree, so on this branch "Creating keys…" fails with -25299 and the first-run flow cannot be exercised without deleting that key. This changes the debug slot name returned by `human_service(true)` in crates/credential-store/src/lib.rs to `dev.local.buzz.foundation.identity.debug.onboarding`. Everything that restores, creates, imports, deletes or sign-out-marks the human key goes through `HUMAN_SERVICE`, so this branch's dev identity is isolated and can be reset safely: security delete-generic-password \ -s dev.local.buzz.foundation.identity.debug.onboarding -a human The release slot is unchanged. The two tests that pin the exact debug string (`human_identity_slots_stay_separate`, `development_and_release_items_are_separate`) move with it so CI stays green. No TypeScript, fixture or script references the string; docs/identity.md is left describing the real slot. Revert or drop this commit before merging. Validation: `cargo test -p buzz-credential-store human_identity_slots` and `cargo test --manifest-path src-tauri/Cargo.toml development_and_release_items_are_separate` pass; `cargo fmt --check` clean. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Matt Toohey --- crates/credential-store/src/lib.rs | 4 ++-- crates/credential-store/src/tests.rs | 7 +++++-- src-tauri/src/identity/tests.rs | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/credential-store/src/lib.rs b/crates/credential-store/src/lib.rs index d8d05b9773..a490391d3a 100644 --- a/crates/credential-store/src/lib.rs +++ b/crates/credential-store/src/lib.rs @@ -26,7 +26,7 @@ pub const HUMAN_STORE: &str = human_store(cfg!(debug_assertions)); pub const fn human_service(debug: bool) -> &'static str { if debug { - "xyz.block.buzz.desktop.identity.debug" + "xyz.block.buzz.desktop.identity.debug.onboarding" // DO NOT MERGE } else { "xyz.block.buzz.desktop.identity" } @@ -34,7 +34,7 @@ pub const fn human_service(debug: bool) -> &'static str { pub const fn human_store(debug: bool) -> &'static str { if debug { - "dev.local.buzz.foundation.identity.debug" + "dev.local.buzz.foundation.identity.debug.onboarding" // DO NOT MERGE } else { "dev.local.buzz.foundation.identity" } diff --git a/crates/credential-store/src/tests.rs b/crates/credential-store/src/tests.rs index 53b90ff6ed..64cafe7593 100644 --- a/crates/credential-store/src/tests.rs +++ b/crates/credential-store/src/tests.rs @@ -289,12 +289,15 @@ fn home_child() { #[test] fn human_identity_slots_stay_separate() { assert_eq!(HUMAN_ACCOUNT, "human"); - assert_eq!(human_service(true), "xyz.block.buzz.desktop.identity.debug"); + assert_eq!( + human_service(true), + "xyz.block.buzz.desktop.identity.debug.onboarding" + ); assert_eq!(human_service(false), "xyz.block.buzz.desktop.identity"); assert_eq!(HUMAN_SERVICE, human_service(cfg!(debug_assertions))); assert_eq!( human_store(true), - "dev.local.buzz.foundation.identity.debug" + "dev.local.buzz.foundation.identity.debug.onboarding" ); assert_eq!(human_store(false), "dev.local.buzz.foundation.identity"); assert_eq!(HUMAN_STORE, human_store(cfg!(debug_assertions))); diff --git a/src-tauri/src/identity/tests.rs b/src-tauri/src/identity/tests.rs index 2318eca334..c03c032be4 100644 --- a/src-tauri/src/identity/tests.rs +++ b/src-tauri/src/identity/tests.rs @@ -278,7 +278,7 @@ fn development_and_release_items_are_separate() { assert_eq!( credentials::HUMAN_SERVICE, if cfg!(debug_assertions) { - "xyz.block.buzz.desktop.identity.debug" + "xyz.block.buzz.desktop.identity.debug.onboarding" } else { "xyz.block.buzz.desktop.identity" }