The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(security): follow #6096's StorageMode split in the keyring e2e\n\n`keyring_consent_status_decide_and_retry_probe` was written beside #6076 —\n`activeMode` reporting `os_keyring` for the file backend — and pinned the\npre-fix vocabulary in three places. #6096 fixed the defect by making\n`activeMode` name the backend actually in use, which added\n`local_encrypted_file` and `local_plaintext_file` to `StorageMode`. The test\nthen failed on `main` with:\n\n activeMode must be one of the four documented storage modes;\n got "local_plaintext_file"\n\nThree assertions updated, all against `StorageMode`'s `Display` impl\n(`security/keyring_consent/types.rs`) rather than a remembered list:\n\n- the accepted-mode set now enumerates the whole enum, so a future variant\n fails here rather than silently widening what the RPC may return;\n- the `available` branch no longer asserts `mode == "os_keyring"`. That\n assertion *was* the #6076 defect: it required every usable backend to claim\n it was the OS keyring. What a usable backend implies is that no consent\n decision is outstanding, not which backend it is;\n- the retry-probe's mode check gets the same six-variant list.\n\nThe doc comment describing the old behaviour as current is reworded to past\ntense with a pointer to #6096.\n\nVerified: `cargo test --test raw_coverage_all --features "$(bash\nscripts/ci/product-features.sh)" -- secrets_devices_e2e::` → 8 passed,\n0 failed, 1 ignored (the ignored one is the unrelated #6076-adjacent\nautonomy-migration finding).\n
M3gA-Mind733f824b6000
diff --git a/tests/raw_coverage/secrets_devices_e2e.rs b/tests/raw_coverage/secrets_devices_e2e.rsindex 574b825a70..644ce0b49c 100644--- a/tests/raw_coverage/secrets_devices_e2e.rs+++ b/tests/raw_coverage/secrets_devices_e2e.rs@@ -305,7 +305,8 @@ allowed_commands = ["ls", "cat"]/// All three keyring-consent controllers.////// The anchor is the **persisted file**, not `activeMode`. `policy::current_status`-/// reports `os_keyring` whenever *any* backend probes as available — and the+/// reported `os_keyring` whenever *any* backend probes as available (fixed by+/// #6096; `activeMode` now names the backend actually in use) — and the/// `file` dev backend always does — so `activeMode` cannot witness a consent/// decision in a test process. `ops::keyring_consent_decide` documents that the/// in-memory cache is only updated *after* a successful persist, so proving the@@ -341,9 +342,22 @@ async fn keyring_consent_status_decide_and_retry_probe() {.get("activeMode").and_then(Value::as_str).unwrap_or_else(|| panic!("status must report an `activeMode`: {status}"));+ // Mirrors `StorageMode`'s `Display` impl (`security/keyring_consent/types.rs`),+ // which is the source of truth. #6096 added the two `*_file` variants when it+ // stopped the file backends reporting themselves as `os_keyring` (#6076) — this+ // list is the whole enum, so a new variant fails here rather than silently+ // widening what the RPC may return.assert!(- ["os_keyring", "local_encrypted", "consent_pending", "declined"].contains(&mode),- "activeMode must be one of the four documented storage modes; got {mode:?}"+ [+ "os_keyring",+ "local_encrypted",+ "local_encrypted_file",+ "local_plaintext_file",+ "consent_pending",+ "declined",+ ]+ .contains(&mode),+ "activeMode must be one of the six documented storage modes; got {mode:?}");assert!(status@@ -353,10 +367,17 @@ async fn keyring_consent_status_decide_and_retry_probe() {"the backend must be named so the settings panel can show it: {status}");if available {- assert_eq!(- mode, "os_keyring",- "with a working backend no consent is needed, so the mode must be \- `os_keyring` and no failure reason may be attached: {status}"+ // NOT `== "os_keyring"`. That was the #6076 defect this test was written+ // beside: every working backend reported itself as the OS keyring, so a+ // plaintext dev-keychain looked like the OS credential store. #6096 made+ // `activeMode` describe the backend that is actually in use, and the+ // schema now documents `available` as "the active backend is usable,+ // which is true for the file backends". What a usable backend implies is+ // that no consent decision is outstanding — not which backend it is.+ assert!(+ !matches!(mode, "consent_pending" | "declined"),+ "a usable backend means no consent decision is outstanding; \+ got {mode:?}: {status}");assert!(status.get("failureReason").is_none(),@@ -500,8 +521,15 @@ async fn keyring_consent_status_decide_and_retry_probe() {probe.get("activeMode").and_then(Value::as_str)- .is_some_and(|m| ["os_keyring", "local_encrypted", "consent_pending", "declined"]- .contains(&m)),+ .is_some_and(|m| [+ "os_keyring",+ "local_encrypted",+ "local_encrypted_file",+ "local_plaintext_file",+ "consent_pending",+ "declined",+ ]+ .contains(&m)),"the probe must return a valid storage mode: {probe}");}