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
fix(about): drop settings paths for a panel that no longer exists
M3gA-Mind82bc3f7f693e
diff --git a/crates/openhuman-core/src/config/ops/local_ai_presets.rs b/crates/openhuman-core/src/config/ops/local_ai_presets.rsindex ddde5e42e3..a4fd32acce 100644--- a/crates/openhuman-core/src/config/ops/local_ai_presets.rs+++ b/crates/openhuman-core/src/config/ops/local_ai_presets.rs@@ -77,3 +77,7 @@ fn preset_matches_config(&& vision_matches&& config.embedding_model_id == preset.embedding_model_id}++#[cfg(test)]+#[path = "local_ai_presets_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs b/crates/openhuman-core/src/config/ops/local_ai_presets_tests.rsnew file mode 100644index 0000000000..94e2a9e9e2--- /dev/null+++ b/crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs@@ -0,0 +1,261 @@+//! RAM-driven local-model tier selection, asserted from OpenHuman's own seam.+//!+//! # Why these live here and not upstream+//!+//! The thresholds these tests pin (`MIN_RAM_GB_FOR_LOCAL_AI`, the `recommend_tier`+//! bands) belong to `tinyinference_local::presets`, which has its own unit tests+//! in `presets_test.rs` / `presets_device_test.rs`. **No OpenHuman lane runs+//! them.** `vendor` is listed in the root `[workspace] exclude`, both Rust lanes+//! invoke `cargo test --manifest-path Cargo.toml --workspace` or a named+//! `--test <target>`, and no CI step names `tinyinference-local`. The crate sits+//! two submodule hops down, under `vendor/tinyagents/vendor/tinyinference/`.+//!+//! OpenHuman *consumes* those thresholds — `inference_apply_preset` and+//! `inference_presets` are built on `apply_preset_to_config` and+//! `current_tier_from_config` in this module, and `inference/ops.rs` calls+//! `detect_device_profile` and `presets::recommend_tier` directly. So an+//! upstream change to a band silently changes what OpenHuman recommends, and+//! nothing that runs would notice.+//!+//! These are therefore **consumer contract tests**: they assert the behaviour+//! OpenHuman depends on, at the version OpenHuman has pinned. They are not a+//! second copy of the upstream suite — they cover only the values this repo's+//! own RPC surface hands to users.+//!+//! # What is NOT covered here, and cannot be+//!+//! `inference_device_profile` reports the *real host's* RAM, so the RPC layer+//! can only assert `total_ram_bytes > 0` (which `tests/json_rpc_e2e.rs` already+//! does). OpenHuman exposes no seam that injects a synthetic device profile, so+//! the threshold behaviour is reachable only by constructing a `DeviceProfile`+//! in-process, as below. An end-to-end "this 4 GB machine defaulted to cloud"+//! assertion would need that injection seam and is not written.++use super::*;+use tinyinference_local::device::DeviceProfile;+use tinyinference_local::presets::{+ device_supports_local_ai, recommend_tier, should_default_to_cloud_fallback,+ MIN_RAM_GB_FOR_LOCAL_AI, MVP_MAX_TIER,+};++/// A synthetic host with `ram_gb` of physical memory and nothing else notable.+///+/// Every other field is fixed so a test that fails names the RAM band and not+/// an incidental difference.+fn device_with_ram_gb(ram_gb: u64) -> DeviceProfile {+ DeviceProfile {+ total_ram_bytes: ram_gb * 1024 * 1024 * 1024,+ cpu_count: 8,+ cpu_brand: "test-cpu".to_string(),+ os_name: "test-os".to_string(),+ os_version: "0.0".to_string(),+ has_gpu: false,+ gpu_description: None,+ }+}++/// Matrix 3.3.1.3 — over-allocation prevention.+///+/// A host below the floor must not be told to run local inference. The floor is+/// read from the constant rather than hard-coded to 8, so a deliberate upstream+/// move changes one number here and an accidental one still fails the band+/// assertions below.+#[test]+fn a_host_below_the_ram_floor_is_not_offered_local_inference() {+ let below = device_with_ram_gb(MIN_RAM_GB_FOR_LOCAL_AI - 1);++ assert!(+ !device_supports_local_ai(&below),+ "a {} GB host is below the {MIN_RAM_GB_FOR_LOCAL_AI} GB floor and must not \+ be offered local inference by default",+ below.total_ram_gb()+ );+ assert!(+ should_default_to_cloud_fallback(&below),+ "below the floor the recommendation must be cloud fallback"+ );+}++/// Matrix 3.3.1.4 — under-allocation handling.+///+/// The mirror of the case above: a host *at* the floor must be offered local+/// inference, and must not be pushed to cloud. Written as a separate test so a+/// regression that refuses everything fails here and passes above, rather than+/// both assertions agreeing inside one test that only proves the guard is+/// reachable.+#[test]+fn a_host_at_the_ram_floor_is_offered_local_inference() {+ let at_floor = device_with_ram_gb(MIN_RAM_GB_FOR_LOCAL_AI);++ assert!(+ device_supports_local_ai(&at_floor),+ "the floor is inclusive: a {MIN_RAM_GB_FOR_LOCAL_AI} GB host qualifies"+ );+ assert!(+ !should_default_to_cloud_fallback(&at_floor),+ "at or above the floor the recommendation must not be cloud fallback"+ );+}++/// Matrix 3.3.2.2 — model switching based on memory.+///+/// Pins every band of `recommend_tier`, including both sides of each boundary.+/// A band that silently widens or shifts by one gigabyte changes which model a+/// user's machine downloads, which is not something a smoke test would catch.+#[test]+fn recommended_tier_tracks_host_ram_at_every_band_boundary() {+ let cases: &[(u64, ModelTier)] = &[+ (0, ModelTier::Ram1Gb),+ (1, ModelTier::Ram1Gb),+ (2, ModelTier::Ram2To4Gb),+ (3, ModelTier::Ram2To4Gb),+ (4, ModelTier::Ram4To8Gb),+ (7, ModelTier::Ram4To8Gb),+ (8, ModelTier::Ram8To16Gb),+ (15, ModelTier::Ram8To16Gb),+ (16, ModelTier::Ram16PlusGb),+ (128, ModelTier::Ram16PlusGb),+ ];++ for (ram_gb, expected) in cases {+ let actual = recommend_tier(&device_with_ram_gb(*ram_gb));+ assert_eq!(+ actual, *expected,+ "a {ram_gb} GB host should be recommended {expected:?}, got {actual:?}"+ );+ }+}++/// The MVP ceiling is a product decision, not an accident of the band table.+///+/// `MVP_MAX_TIER` blocks larger local models "to keep summarization lightweight+/// and battery-friendly", so a 128 GB workstation is still *recommended*+/// `Ram16PlusGb` while only `Ram2To4Gb` is `is_mvp_allowed`. Those two facts+/// disagreeing is the shape of a bug, so pin both together: the recommendation+/// is about the hardware, the ceiling is about what ships.+#[test]+fn the_mvp_ceiling_is_independent_of_what_the_hardware_can_run() {+ let workstation = device_with_ram_gb(128);++ assert_eq!(recommend_tier(&workstation), ModelTier::Ram16PlusGb);+ assert!(+ !ModelTier::Ram16PlusGb.is_mvp_allowed(),+ "the recommendation is not itself an allow-list entry"+ );+ assert!(+ MVP_MAX_TIER.is_mvp_allowed(),+ "the declared MVP ceiling must be allowed by the predicate that enforces it"+ );+}++/// Matrix 3.3.3.1 — saving a RAM-tier selection, through OpenHuman's own seam.+///+/// `inference_apply_preset` is `apply_preset_to_config`, and `inference_presets`+/// reports `current_tier_from_config`. The RPC round-trip is covered in+/// `tests/json_rpc_e2e.rs`; what is asserted here is the part that RPC test+/// cannot see — that the config fields the preset writes are the ones+/// `current_tier_from_config` reads back, for *every* real tier rather than the+/// single `ram_2_4gb` the RPC test exercises.+#[test]+fn applying_a_preset_round_trips_through_the_config_for_every_real_tier() {+ for tier in [+ ModelTier::Ram1Gb,+ ModelTier::Ram2To4Gb,+ ModelTier::Ram4To8Gb,+ ModelTier::Ram8To16Gb,+ ModelTier::Ram16PlusGb,+ ] {+ let mut config = LocalAiConfig::default();+ apply_preset_to_config(&mut config, tier);++ assert_eq!(+ config.selected_tier.as_deref(),+ Some(tier.as_str()),+ "applying {tier:?} must record its canonical id"+ );+ assert!(+ config.runtime_enabled,+ "applying {tier:?} must enable the local runtime"+ );+ assert_eq!(+ current_tier_from_config(&config),+ tier,+ "{tier:?} must read back as itself; if it does not, the preset writes \+ fields that preset_matches_config does not compare"+ );+ }+}++/// `Custom` is not a preset, and applying it must not silently rewrite the+/// user's model choices.+///+/// `apply_preset_to_config` no-ops for `Custom` (`preset_for_tier` returns+/// `None`). Without this, a future refactor that gave `Custom` a preset row+/// would clobber a hand-configured local setup on any code path that applies+/// the "current" tier back.+#[test]+fn applying_the_custom_tier_leaves_a_hand_configured_setup_untouched() {+ let mut config = LocalAiConfig::default();+ config.chat_model_id = "my-own-model".to_string();+ config.vision_model_id = "my-own-vision".to_string();+ let before = config.clone();++ apply_preset_to_config(&mut config, ModelTier::Custom);++ assert_eq!(+ config.chat_model_id, before.chat_model_id,+ "applying Custom must not rewrite the chat model"+ );+ assert_eq!(+ config.vision_model_id, before.vision_model_id,+ "applying Custom must not rewrite the vision model"+ );+ assert_eq!(+ current_tier_from_config(&config),+ ModelTier::Custom,+ "a config matching no preset reads back as Custom"+ );+}++/// Matrix 3.3.3.3 — returning to the default.+///+/// There is no "reset to default" control in the product (see `e2e-gaps-w4.md`);+/// what exists is `LocalAiConfig::default()`, which is the state a fresh install+/// and a full data reset both land on.+///+/// The non-obvious part, and the reason this is worth pinning: **a fresh config+/// already sits on a real preset tier it was never given.** `selected_tier` is+/// `None`, but the defaults (`gemma3:1b-it-qat`, no vision model, `bge-m3`) are+/// byte-identical to the `Ram2To4Gb` preset, so `current_tier_from_config` falls+/// through its `all_presets()` scan and reports `Ram2To4Gb` — which is also+/// `MVP_MAX_TIER`. A "reset to default" built on the assumption that a fresh+/// config is `Custom` would therefore be wrong, and so was this test's first+/// draft.+///+/// If a default model id changes upstream without the matching preset changing,+/// this flips to `Custom` and every new install silently stops matching a+/// preset. That is the regression this catches.+#[test]+fn the_default_local_ai_config_already_matches_the_mvp_preset_tier() {+ let config = LocalAiConfig::default();++ assert!(+ config.selected_tier.is_none(),+ "a fresh config must not claim a tier it was never given"+ );+ assert_eq!(+ current_tier_from_config(&config),+ ModelTier::Ram2To4Gb,+ "the default model ids are the Ram2To4Gb preset, so a fresh config \+ resolves to that tier despite selected_tier being None"+ );+ assert_eq!(+ current_tier_from_config(&config),+ MVP_MAX_TIER,+ "the tier a fresh install lands on must be the one the MVP ceiling allows"+ );+ assert!(+ !supports_screen_summary(&config),+ "the default preset disables vision, so no screen summary"+ );+}diff --git a/crates/openhuman-core/src/cron/scheduler_tests.rs b/crates/openhuman-core/src/cron/scheduler_tests.rsindex 831bf48eb8..09be1458ae 100644--- a/crates/openhuman-core/src/cron/scheduler_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_tests.rs@@ -108,3 +108,141 @@ mod frequency_tests;mod halt_and_persist_tests;#[path = "scheduler_transcript_isolation_tests.rs"]mod transcript_isolation_tests;++// ── A6: the retry loop must honour its own permanent-failure classifiers ─────+//+// Matrix 9.3.3 "Retry Handling" was 🟡 with the note "Backoff branches partial".+// What existed were classifier tests — `agent_error_to_user_message_classifies_+// provider_retryable` / `_non_retryable`, `is_local_provider_unreachable_failure_+// keeps_short_loopback_send_error_retryable` — which assert the *predicate* in+// isolation. None of them asserts that `execute_job_with_retry` ACTS on the+// predicate.+//+// That gap is the dangerous half. If a permanent classifier stops being+// consulted, every predicate test stays green while an insufficient-credits job+// retries its whole budget against a wallet that cannot pay, and a+// security-policy block is re-attempted instead of halting. The loop's own+// comments state the intent ("permanent across the backoff loop") and nothing+// enforced it.+//+// These two tests observe the loop from outside, with no mocking: a shell job+// whose command appends one line per execution turns "how many attempts did the+// loop make" into a number on disk.++/// Shell command that records one line per execution and then fails.+///+/// `sh -c` so the append and the exit status are one command string, which is+/// what `CronJob::command` carries.+#[cfg(not(windows))]+fn counting_failure_command(counter: &std::path::Path) -> String {+ format!("echo attempt >> {} ; exit 1", counter.display())+}++#[cfg(not(windows))]+fn attempt_count(counter: &std::path::Path) -> usize {+ match std::fs::read_to_string(counter) {+ Ok(body) => body.lines().filter(|line| !line.is_empty()).count(),+ // The command never ran, so the file was never created.+ Err(_) => 0,+ }+}++/// A retryable shell failure is attempted exactly `scheduler_retries + 1` times.+///+/// This is the control for the test below: it proves the retry budget is real+/// and is spent, so a later assertion that a permanent failure spends *none* of+/// it cannot pass merely because retries never happen at all.+#[cfg(not(windows))]+#[tokio::test]+async fn retryable_shell_failure_consumes_the_whole_retry_budget() {+ let tmp = TempDir::new().unwrap();+ let mut config = test_config(&tmp).await;+ config.reliability.scheduler_retries = 2;+ // The floor is 200 ms (`backoff_ms.max(200)`), so two sleeps plus jitter+ // keep this well under a second.+ config.reliability.provider_backoff_ms = 200;++ let counter = tmp.path().join("retryable-attempts.log");+ let job = test_job(&counting_failure_command(&counter));+ let security =+ SecurityPolicy::from_config(&config.autonomy, &config.workspace_dir, &config.action_dir);++ let (success, output) = execute_job_with_retry(&config, &security, &job).await;++ assert!(+ !success,+ "the fixture command exits 1; got success with {output}"+ );+ assert_eq!(+ attempt_count(&counter),+ 3,+ "scheduler_retries = 2 means one initial attempt plus two retries. Got {} executions \+ of the job command — the retry budget is not being spent as configured.",+ attempt_count(&counter)+ );+}++/// A security-policy block halts on the first attempt and spends none of the+/// retry budget.+///+/// `run_job_command_with_timeout` refuses before spawning anything when+/// `can_act()` is false, and `execute_job_with_retry` returns immediately on the+/// `blocked by security policy:` prefix rather than looping. A deterministic+/// policy refusal cannot become allowed by waiting, so retrying it only delays+/// the user's error by the whole backoff curve.+///+/// The command never executes under a read-only policy, so an attempt counter+/// cannot distinguish one refused attempt from three. The observable that can+/// is elapsed time, and the margin here is deliberately enormous rather than+/// tight: the backoff is set to 2 s with two retries, so a loop that retried+/// would sleep about 4 s, while the correct early return does no sleeping at+/// all. The bound asserted is 1 s — four times the correct path's cost and a+/// quarter of the faulty path's, so neither fleet load nor jitter can move the+/// verdict.+#[cfg(not(windows))]+#[tokio::test]+async fn security_policy_block_halts_without_spending_the_retry_budget() {+ use crate::security::AutonomyLevel;++ let tmp = TempDir::new().unwrap();+ let mut config = test_config(&tmp).await;+ config.reliability.scheduler_retries = 2;+ config.reliability.provider_backoff_ms = 2_000;+ // Read-only autonomy: `can_act()` is false, so the shell runner refuses.+ config.autonomy.enabled = true;+ config.autonomy.level = AutonomyLevel::ReadOnly;++ let counter = tmp.path().join("blocked-attempts.log");+ let job = test_job(&counting_failure_command(&counter));+ let security =+ SecurityPolicy::from_config(&config.autonomy, &config.workspace_dir, &config.action_dir);+ // Fixture guard: if the policy still permits acting, the command would run+ // and this test would be measuring the retryable path instead of the+ // blocked one — passing for entirely the wrong reason.+ assert!(+ !security.can_act(),+ "fixture must be read-only, or this test does not exercise the blocked path"+ );++ let started = std::time::Instant::now();+ let (success, output) = execute_job_with_retry(&config, &security, &job).await;+ let elapsed = started.elapsed();++ assert!(!success, "a blocked job cannot succeed; got {output}");+ assert!(+ output.starts_with("blocked by security policy:"),+ "expected the security-policy refusal that the loop keys on, got {output}"+ );+ assert_eq!(+ attempt_count(&counter),+ 0,+ "a read-only policy must refuse before the command is spawned; the command ran {} times",+ attempt_count(&counter)+ );+ assert!(+ elapsed < std::time::Duration::from_secs(1),+ "the loop slept for {elapsed:?} on a deterministic policy refusal. A security block is \+ permanent across the backoff curve and must return on the first attempt; retrying it \+ only delays the user's error by the full retry budget (here about 4 s)."+ );+}diff --git a/crates/openhuman-core/src/desktop/accessibility/permissions_tests.rs b/crates/openhuman-core/src/desktop/accessibility/permissions_tests.rsindex 365be6a279..753a3206ae 100644--- a/crates/openhuman-core/src/desktop/accessibility/permissions_tests.rs+++ b/crates/openhuman-core/src/desktop/accessibility/permissions_tests.rs@@ -130,6 +130,106 @@ fn permission_state_serde_round_trip() {assert_eq!(back.microphone, PermissionState::Unsupported);}+/// Partial permission state must survive as three independent fields on the+/// wire, spelled exactly as the renderer reads them (matrix 2.2.4).+///+/// `permission_state_serde_round_trip` above proves Rust -> JSON -> Rust, which+/// passes even if the keys were `a`/`b`/`c` and the variants `V1`/`V2`: both+/// sides of that round trip use the same `derive`. Nothing pinned the *wire+/// spelling*, and the renderer does not go through `serde` — it indexes the+/// JSON by name. A `rename_all` change or a renamed field would leave every+/// lookup `undefined`, which renders as "not granted" indefinitely and looks+/// exactly like a permission the user never gave.+///+/// The three states here are deliberately all different: a status that+/// collapsed to one verdict, or grew a fourth field, fails the shape check+/// rather than silently reporting the first field for all three.+#[test]+fn partial_permission_status_serializes_three_distinct_snake_case_fields() {+ use crate::desktop::accessibility::types::{PermissionState, PermissionStatus};++ let status = PermissionStatus {+ accessibility: PermissionState::Granted,+ input_monitoring: PermissionState::Denied,+ microphone: PermissionState::Unsupported,+ };++ let json = serde_json::to_value(&status).expect("serialize PermissionStatus");+ let object = json+ .as_object()+ .expect("PermissionStatus must serialize to a JSON object");++ assert_eq!(+ object.len(),+ 3,+ "PermissionStatus gained or lost a field; the renderer reads exactly \+ accessibility/input_monitoring/microphone: {json}"+ );+ assert_eq!(+ object.get("accessibility").and_then(|v| v.as_str()),+ Some("granted"),+ "accessibility must serialize as snake_case `granted`: {json}"+ );+ assert_eq!(+ object.get("input_monitoring").and_then(|v| v.as_str()),+ Some("denied"),+ "input_monitoring must keep its own value, not the accessibility one: {json}"+ );+ assert_eq!(+ object.get("microphone").and_then(|v| v.as_str()),+ Some("unsupported"),+ "microphone must keep its own value: {json}"+ );+}++/// `Unsupported` is not `Granted`, and a caller cannot get away with treating+/// "not denied" as "granted" (matrix 2.2.4).+///+/// On a non-macOS build `detect_permissions` reports accessibility and+/// input_monitoring as `Unsupported` while microphone is a real CPAL probe, so+/// the struct is genuinely mixed-provenance in production. Any consumer that+/// reduces it to one boolean is wrong on at least one field; this pins the+/// three-way distinction the reduction would erase.+#[test]+fn unsupported_is_distinguishable_from_granted_and_denied() {+ use crate::desktop::accessibility::types::PermissionState;++ let states = [+ PermissionState::Granted,+ PermissionState::Denied,+ PermissionState::Unknown,+ PermissionState::Unsupported,+ ];++ let wire: Vec<String> = states+ .iter()+ .map(|state| {+ serde_json::to_value(state)+ .expect("serialize PermissionState")+ .as_str()+ .expect("PermissionState serializes to a string")+ .to_string()+ })+ .collect();++ assert_eq!(+ wire,+ vec!["granted", "denied", "unknown", "unsupported"],+ "PermissionState wire spelling changed; the renderer compares these \+ strings literally"+ );++ let mut unique = wire.clone();+ unique.sort();+ unique.dedup();+ assert_eq!(+ unique.len(),+ states.len(),+ "two PermissionState variants collapsed to the same wire value, so a \+ partial permission state cannot be told apart: {wire:?}"+ );+}+// ── No stale denied cache across restart (automation_state) ───────────────//// The `automation_state` module exposes a process-local atomic flag. Thediff --git a/crates/openhuman-core/src/memory/goals/enrich_tests.rs b/crates/openhuman-core/src/memory/goals/enrich_tests.rsindex ffa934d9e1..703094aa55 100644--- a/crates/openhuman-core/src/memory/goals/enrich_tests.rs+++ b/crates/openhuman-core/src/memory/goals/enrich_tests.rs@@ -15,3 +15,61 @@ fn maintenance_prompt_requests_minimal_changes() {assert!(!p.contains("first run"));assert!(p.contains("user finished onboarding"));}++// ── A7: an empty goals store is not a storage failure ───────────────────────+//+// Matrix 8.5.2 "Goals enrichment (reflect)" was 🟡. The two tests above assert+// `build_prompt` given a `first_run` bool; nothing asserted how that bool is+// DERIVED, and that derivation is where the interesting failure lives.+//+// `enrich_goals` calls `read_goals()` and takes `doc.is_empty()` as `first_run`.+// The function's comment states the invariant from the failure side:+//+// Surface real storage failures instead of masking them as an empty+// first-run doc. The distinction still holds through the family: a driver+// with no goals yet answers an empty `GoalsDoc` rather than `NotFound`, so+// an `Err` here is a real backend failure and never "the file is missing".+//+// That sentence has two halves. This test pins the half that is reachable+// without a fault-injection seam: **an empty store must not be reported as a+// load failure**. If `read_goals` ever started mapping "no goals yet" onto+// `Err`, enrichment would refuse to run for exactly the users it exists to+// help — everyone who has not set a goal yet — and the two prompt tests above+// would stay green, because they never call `read_goals` at all.+//+// The other half (a REAL backend failure must propagate rather than becoming a+// first run) is deliberately NOT asserted here. Reaching it needs a goals+// driver that errors on demand, and no such seam exists in this module today;+// an `is_err()` assertion would pass on the unrelated model-provider error this+// fixture actually produces and would prove nothing. Recorded as a gap rather+// than written vacuously.++/// An empty goals store drives the first-run path, not a load error.+#[tokio::test]+async fn an_empty_goals_store_is_not_reported_as_a_load_failure() {+ let tmp = tempfile::tempdir().expect("tempdir");+ let config = crate::config::Config {+ workspace_dir: tmp.path().to_path_buf(),+ action_dir: tmp.path().to_path_buf(),+ config_path: tmp.path().join("config.toml"),+ ..crate::config::Config::default()+ };++ // No model is configured, so the run cannot complete — that is fine and is+ // not what is under test. What matters is WHERE it stops: past `read_goals`+ // (an empty store was accepted) rather than at it.+ let error = match enrich_goals(&config, tmp.path(), "a session recap").await {+ Err(error) => error,+ // If a future fixture does let the turn complete, the invariant still+ // held — it got past the read.+ Ok(_) => return,+ };++ assert!(+ !error.starts_with("goals load failed:"),+ "an empty goals store was reported as a storage failure ({error:?}). A driver with no \+ goals yet answers an empty GoalsDoc rather than NotFound, so enrichment must treat it \+ as a first run. Mapping it to Err refuses enrichment for every user who has not set a \+ goal yet — the exact population the feature exists for."+ );+}diff --git a/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs b/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rsindex 546f439c22..efad5a1383 100644--- a/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs+++ b/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs@@ -9,7 +9,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Download and bootstrap local AI runtimes and model bundles.",- how_to: "Settings > Local AI Model",+ how_to: "Downloaded by the core local-runtime module; progress surfaces in the download snackbar. No settings control exposes it since the local-model panel was removed (0ec68613af).",status: CapabilityStatus::Beta,privacy: MODEL_DOWNLOAD,},@@ -29,7 +29,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Inspect asset status and download specific chat, vision, embedding, STT, or TTS assets.",- how_to: "Settings > Local AI Model > Advanced > Capability Assets",+ how_to: "Served by the core `inference_assets_status` / `inference_download_asset` methods; no settings control exposes it since the local-model panel was removed (0ec68613af).",status: CapabilityStatus::Beta,privacy: None,},@@ -39,7 +39,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Diagnostics report each installed Ollama model's native context window and reject any model below the minimum the memory layer requires (so short-context models can't silently truncate and corrupt recall).",- how_to: "Settings > Local AI Model > Run Diagnostics",+ how_to: "Reported by the core `inference_diagnostics` method; no settings control exposes it since the local-model panel was removed (0ec68613af).",status: CapabilityStatus::Beta,privacy: None,},@@ -49,7 +49,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Create local vector embeddings for text input.",- how_to: "Settings > Local AI Model > Advanced > Test Embeddings",+ how_to: "Connections → API keys → Embeddings, or the core `inference_embed` method.",status: CapabilityStatus::Beta,privacy: LOCAL_RAW,},@@ -72,7 +72,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Run vision prompts against images using a local multimodal model.",- how_to: "Settings > Local AI Model > Advanced > Test Vision Prompt",+ how_to: "Served by the core `inference_vision_prompt` method; no settings control exposes it since the local-model panel was removed (0ec68613af).",status: CapabilityStatus::Beta,privacy: None,},@@ -82,7 +82,7 @@ Capability {domain: "local_ai",category: CapabilityCategory::LocalAI,description: "Send a direct prompt to the local model without using the cloud API.",- how_to: "Settings > Local AI Model > Advanced > Test Custom Prompt",+ how_to: "Served by the core `inference_prompt` method; no settings control exposes it since the local-model panel was removed (0ec68613af).",status: CapabilityStatus::Beta,privacy: None,},diff --git a/crates/openhuman-core/src/platform/about_app/catalog_tests.rs b/crates/openhuman-core/src/platform/about_app/catalog_tests.rsindex 085fdf3818..1289cccb88 100644--- a/crates/openhuman-core/src/platform/about_app/catalog_tests.rs+++ b/crates/openhuman-core/src/platform/about_app/catalog_tests.rs@@ -490,3 +490,80 @@ fn catalog_how_to_uses_connections_nav_not_legacy_settings_paths() {);assert_eq!(how_to("workflows.connect_google"), "Connections > OAuth");}++/// The `Settings > Local AI Model` panel no longer exists, and six `local_ai`+/// entries still send users to it.+///+/// `0ec68613af` removed the local-model debug panel. Its route is now a+/// redirect — `app/src/components/settings/settingsRouteElements.tsx` maps+/// `local-model-debug` to `<Navigate to="/connections?tab=llm" replace />` —+/// and no settings surface renders the string "Local AI Model" any more (the+/// only remaining occurrence in the app is a dead i18n key, `voice.openLocalAiModel`,+/// which nothing mounts).+///+/// These entries are user-visible: the Privacy panel renders whatever+/// `about_app.list` returns, so a stale breadcrumb is a user following a+/// navigation path that silently lands somewhere else. That is the same defect+/// #6464 reported for `conversation.suggested_questions`, and the guard written+/// for it (`suggested_questions_stays_coming_soon_until_a_producer_exists`,+/// above) asserts exactly this shape — it just does not cover the `local_ai`+/// domain.+///+/// This assertion is a ratchet, not a description. Two ways to satisfy it, and+/// whoever lands either reads this comment on the way past:+///+/// 1. The panel comes back — then the breadcrumb is true again and naming the+/// real route satisfies the check.+/// 2. The panel stays gone — then each entry either points at the surface that+/// actually serves it, or states in prose that the capability has no user+/// control yet. `local_ai.python_runtime_installer` in the same table is+/// the in-repo precedent for the second shape: no breadcrumb, status+/// unchanged, the `how_to` says where the behaviour lives instead.+///+/// What this cannot assert: that the route named by a breadcrumb resolves in+/// the React router. That tie is cross-language and belongs to a VU or PW case.+/// This is the part that can be pinned from Rust — that no `local_ai` entry+/// names a panel title this repo no longer contains.+#[test]+fn local_ai_capabilities_do_not_point_at_the_removed_local_ai_model_panel() {+ const REMOVED_PANEL: &str = "Local AI Model";++ let stale: Vec<&Capability> = all_capabilities()+ .iter()+ .filter(|capability| capability.domain == "local_ai")+ .filter(|capability| capability.how_to.contains(REMOVED_PANEL))+ .collect();++ assert!(+ stale.is_empty(),+ "{} local_ai capabilit{} advertise the removed `{REMOVED_PANEL}` panel while \+ /settings/local-model-debug redirects to /connections: {}",+ stale.len(),+ if stale.len() == 1 { "y" } else { "ies" },+ stale+ .iter()+ .map(|capability| format!("{} -> {:?}", capability.id, capability.how_to))+ .collect::<Vec<_>>()+ .join(", ")+ );+}++/// The `local_ai` domain must not be empty, or the check above passes vacuously.+///+/// Written because the assertion it guards is a filter over a const table: a+/// refactor that renamed the domain, moved these entries to another catalog+/// file, or dropped them would make the stale-breadcrumb check scan zero rows+/// and report clean. A filter that matches nothing reports `ok`.+#[test]+fn local_ai_domain_is_populated_so_the_breadcrumb_check_is_not_vacuous() {+ let count = all_capabilities()+ .iter()+ .filter(|capability| capability.domain == "local_ai")+ .count();++ assert!(+ count >= 6,+ "expected the local_ai domain to carry at least the six entries the \+ breadcrumb check exists for, found {count}"+ );+}diff --git a/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs b/crates/openhuman-core/src/security/credentials/ops_credential_tests.rsindex 9d350806de..a0a309d640 100644--- a/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs+++ b/crates/openhuman-core/src/security/credentials/ops_credential_tests.rs@@ -591,6 +591,62 @@ async fn auth_create_channel_link_token_401_stays_classifiable_as_session_expiry);}+/// Duplicate-account collision: the channel is already linked to a different+/// OpenHuman user, so the backend answers 409. That must NOT be classified as+/// session expiry (matrix 1.2.3).+///+/// The sibling test above pins the 401 -> `SESSION_EXPIRED:` mapping, and+/// `core::jsonrpc::invoke_method` keys a `DomainEvent::SessionExpired` publish+/// off that sentinel — which signs the user out. If a 409 fell into the same+/// bucket, discovering that someone else had already linked your Telegram+/// account would log you out of OpenHuman, and the real reason for the failure+/// would never reach the UI. `auth_create_channel_link_token`'s own comment+/// states the contract this pins: *"Keeps the typed 401 classifiable as session+/// expiry while non-401s keep their full anyhow chain."*+///+/// Asserting the *absence* of the sentinel rather than an exact message: the+/// anyhow chain's wording is not a contract, but "this is not session expiry"+/// is.+#[tokio::test]+async fn auth_create_channel_link_token_409_is_not_classified_as_session_expiry() {+ let _env_guard = crate::config::TEST_ENV_LOCK+ .lock()+ .unwrap_or_else(|e| e.into_inner());+ let tmp = TempDir::new().unwrap();+ let _home = EnvVarGuard::set_to_path("HOME", tmp.path());+ let mut config = store_live_session("user-duplicate-link");+ let app = Router::new().route(+ "/auth/channels/telegram/link-token",+ axum::routing::post(|| async {+ (+ StatusCode::CONFLICT,+ "Telegram account already linked to another user",+ )+ }),+ );+ let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();+ let addr = listener.local_addr().unwrap();+ tokio::spawn(async move {+ axum::serve(listener, app).await.unwrap();+ });+ config.api_url = Some(format!("http://{addr}"));++ let err = auth_create_channel_link_token(&config, "telegram")+ .await+ .expect_err("a 409 must surface as an error, not a successful link token");++ assert!(+ !err.starts_with("SESSION_EXPIRED:"),+ "a 409 collision must not be reported as session expiry — that would \+ sign the user out because another account already owns the channel. \+ Got: {err}"+ );+ assert!(+ !err.is_empty(),+ "a 409 must carry a reason the UI can show, got an empty error"+ );+}+// ── set_credential (local session) ─────────────────────────────/// A local session token requires a non-empty user payload — the backenddiff --git a/crates/openhuman-tinyhumans/src/session/manager_tests.rs b/crates/openhuman-tinyhumans/src/session/manager_tests.rsindex ea0633cacb..b767e54363 100644--- a/crates/openhuman-tinyhumans/src/session/manager_tests.rs+++ b/crates/openhuman-tinyhumans/src/session/manager_tests.rs@@ -302,6 +302,130 @@ async fn current_user_rejection_signs_out_and_emits_expired() {assert!(!state.core.is_authenticated);}+/// Linking a second provider to the same account is a session refresh, not a+/// different user (matrix 1.2.2).+///+/// Nothing the client can see says *which* provider logged you in: `/auth/me`+/// returns no provider field and this crate models none, so "signing in with+/// GitHub when you already signed in with Google" arrives here as nothing more+/// than a second login token that redeems to a **different JWT for the same+/// backend user id**. That is the whole of multi-provider linking as far as the+/// desktop app is concerned, and it is the only part of matrix 1.2.2 that is+/// testable client-side.+///+/// It matters because `store_session_token` signs the previous user out when+/// the user id changes. If a same-user re-login were ever treated as a user+/// change, linking a second provider would wipe the first provider's session+/// state on every login.+#[tokio::test]+async fn relinking_the_same_user_with_a_new_token_refreshes_rather_than_switches_user() {+ let _global = ENV_LOCK.lock().await;+ let backend = Backend::start(vec![MeAnswer::Ok(me_user()), MeAnswer::Ok(me_user())]).await;+ let core = FakeCore::new(&backend.url);+ let m = manager(&core);++ m.login_with_token("via-google").await.unwrap();+ assert_eq!(core.session().unwrap().token, *LIVE_JWT);+ assert_eq!(identity::peek_user_id().as_deref(), Some("user-123"));++ // The second provider's login redeems to a different JWT. Same claims —+ // same `sub`, same `exp` — so the same backend user; only the signature+ // differs, exactly as a freshly issued session would.+ let second_jwt = format!("{}x", *LIVE_JWT);+ *backend.state.consume_jwt.lock().unwrap() = Some(second_jwt.clone());++ let mut rx = m.subscribe();+ let state = m.login_with_token("via-github").await.unwrap();++ assert!(state.core.is_authenticated);+ assert_eq!(+ state.core.user_id.as_deref(),+ Some("user-123"),+ "a second provider for the same account must not change the user id"+ );+ assert_eq!(+ core.session().unwrap().token,+ second_jwt,+ "the newly issued session token should have replaced the old one"+ );+ assert_eq!(+ identity::peek_user_id().as_deref(),+ Some("user-123"),+ "the identity slot must survive a same-user re-login"+ );++ // No sign-out anywhere in the transition. `SessionEvent::Expired` or a+ // `Changed` carrying `!is_authenticated` would mean the app bounced the+ // user to Welcome midway through linking a provider.+ let events = drain(&mut rx).await;+ assert!(+ !events.iter().any(|e| matches!(e, SessionEvent::Expired { .. })),+ "same-user re-login emitted an Expired event: {events:?}"+ );+ assert!(+ !events+ .iter()+ .any(|e| matches!(e, SessionEvent::Changed(s) if !s.core.is_authenticated)),+ "same-user re-login emitted a signed-out state: {events:?}"+ );+}++/// Server-side revocation must clear the identity slot and the user cache, not+/// just the core credential (matrix 1.4.3).+///+/// `current_user_rejection_signs_out_and_emits_expired` above covers the+/// credential and the events; it does not look at `identity::peek_user_id()`+/// or `cache().peek()`. `logout_clears_the_session_and_identity` checks both,+/// but only for an *explicit* logout — so a revocation path that forgot either+/// one would pass the whole suite.+///+/// Both matter, for different reasons:+/// * the identity slot is the process-global `Sentry before_send` reads+/// (`session/identity.rs` — *"Only the id is kept"*), so a stale id there+/// attributes every later event to a user who was signed out, silently and+/// for the life of the process.+/// * a surviving `CurrentUserCache` entry lets `current_user(false)` serve+/// the revoked user's profile from memory after the backend already+/// refused it.+#[tokio::test]+async fn current_user_rejection_also_clears_identity_and_cache() {+ let backend = Backend::start(vec![MeAnswer::Ok(me_user()), MeAnswer::Status(401)]).await;+ let core = FakeCore::new(&backend.url);+ let m = manager(&core);+ m.login_with_token("tok").await.unwrap();++ // Precondition, asserted rather than assumed: a rejection test that starts+ // from an already-empty identity slot proves nothing about clearing it.+ assert!(+ identity::peek_user_id().is_some(),+ "login should have populated the identity slot; without that this test \+ cannot show the rejection cleared it"+ );+ assert!(+ m.cache().peek().is_some(),+ "login should have populated the user cache; without that this test \+ cannot show the rejection cleared it"+ );++ assert!(matches!(+ m.current_user(true).await,+ Err(SessionError::Rejected(_))+ ));++ assert_eq!(+ identity::peek_user_id(),+ None,+ "a revoked session left its user id in the process-global identity \+ slot; Sentry would keep attributing events to a signed-out user"+ );+ assert_eq!(+ m.cache().peek(),+ None,+ "a revoked session left its profile in the current-user cache; a later \+ current_user(false) would serve it from memory"+ );+}+#[tokio::test]async fn clearing_a_rejected_session_reports_a_surviving_api_key() {let backend = Backend::start(vec![]).await;diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.mdindex 5ffc348836..712465477f 100644--- a/docs/TEST-COVERAGE-MATRIX.md+++ b/docs/TEST-COVERAGE-MATRIX.md@@ -123,19 +123,19 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil| ID | Feature | Layer | Test path(s) | Status | Notes || ----- | ------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------- |-| 3.1.1 | Model Detection | RU+WD | `crates/openhuman-core/src/inference/local/`, `local-model-runtime.spec.ts` | ✅ | |-| 3.1.2 | Model Download & Installation | WD | `local-model-runtime.spec.ts` | ✅ | |+| 3.1.1 | Model Detection | RU+RI | `tests/json_rpc_e2e.rs` (`json_rpc_local_ai_lm_studio_config_diagnostics_and_prompt`), `tests/ollama_lifecycle_e2e.rs`, `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/models.rs` | 🟡 | Was ✅ citing `local-model-runtime.spec.ts`. **That citation was false**: the spec was `describe.skip`ped and drove a panel deleted by `0ec68613af`; it now asserts only the route redirect. Detection itself is covered at RI; the model-list UI it used to drive no longer exists. ⚠️ **`tinyinference-local` is not built by any OpenHuman lane** — `vendor` is in the root `[workspace] exclude` and no CI step names the package, so its unit tests are cited history, not executed coverage. |+| 3.1.2 | Model Download \& Installation | RI | `tests/raw_coverage/inference_local_services_round21_raw_coverage_e2e.rs` (`local_ai_download_asset`, `local_ai_downloads_progress`) | 🟡 | Was ✅ citing `local-model-runtime.spec.ts`, which never ran an assertion. The download RPCs are covered over loopback mocks at RI; **there is no user-facing download control** since `0ec68613af`, only `LocalAIDownloadSnackbar`. || 3.1.3 | Model Version Handling | RU | `crates/openhuman-core/src/inference/model_ids.rs` | ✅ | || 3.1.4 | LM Studio Model Discovery | RU+RI | `crates/openhuman-core/src/inference/local/service/ollama_admin_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | Uses LM Studio's OpenAI-compatible `/v1/models` surface |-| 3.1.5 | Model Context-Window Requirement Gate | RU | `crates/openhuman-core/src/inference/local/model_requirements.rs`, `crates/openhuman-core/src/inference/local/ollama.rs`, `crates/openhuman-core/src/inference/local/service/ollama_admin_tests.rs` | 🟡 | Rejects Ollama models whose native context window is below the memory-layer minimum (`local_ai.model_context_check`); the frontend unit test (`ModelStatusSection.test.tsx`) was removed with the local-model debug panel (commit 0ec68613af) and has no VU replacement |+| 3.1.5 | Model Context-Window Requirement Gate | RU | `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/model_requirements.rs`, `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/ollama.rs`, `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/service/ollama_admin_tests.rs` | 🟡 | Rejects Ollama models whose native context window is below the memory-layer minimum (`local_ai.model_context_check`). **Paths corrected**: the previous `crates/openhuman-core/src/inference/local/...` citations have not existed since the runtime was extracted upstream. ⚠️ **`tinyinference-local` is not built by any OpenHuman lane** — `vendor` is in the root `[workspace] exclude` and no CI step names the package, so its unit tests are cited history, not executed coverage. The frontend unit test (`ModelStatusSection.test.tsx`) was removed with the local-model debug panel (`0ec68613af`) and has no VU replacement — and the panel it tested is gone, so a VU replacement is not the right fix. |### 3.2 Runtime Execution| ID | Feature | Layer | Test path(s) | Status | Notes || ----- | ---------------------------------- | ----- | ------------------------------------------------------------------------------- | ------ | -------------------------------------------------------- |-| 3.2.1 | Local Inference Execution | RU+WD | `local-model-runtime.spec.ts`, `crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs`, `crates/openhuman-core/src/flows/ops_agent_binding_tests.rs` | ✅ | Caller-owned model construction and local agent-flow readiness work without an OpenHuman session; cloud session refusal is retained. Harness readiness shares runtime role selection and tests local/cloud routes against an opposing summarization route. |-| 3.2.2 | Resource Handling (CPU/GPU/Memory) | RU | `crates/openhuman-core/src/inference/device.rs` | 🟡 | Detection unit; runtime constraint manual |-| 3.2.3 | Runtime Failure Handling | RU+WD | `local-model-runtime.spec.ts` | ✅ | |+| 3.2.1 | Local Inference Execution | RU+RI | `crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs`, `crates/openhuman-core/src/flows/ops_agent_binding_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | Caller-owned model construction and local agent-flow readiness work without an OpenHuman session; cloud session refusal is retained. **`local-model-runtime.spec.ts` dropped from the citation** — it was skipped and asserted nothing; the remaining RU+RI evidence carries the row on its own. |+| 3.2.2 | Resource Handling (CPU/GPU/Memory) | RU | `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/device.rs`, `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` | 🟡 | **Path corrected** (was `crates/openhuman-core/src/inference/device.rs`, which does not exist). ⚠️ **`tinyinference-local` is not built by any OpenHuman lane** — `vendor` is in the root `[workspace] exclude` and no CI step names the package, so its unit tests are cited history, not executed coverage. OpenHuman-side consumption is now covered by `local_ai_presets_tests.rs`; runtime constraint enforcement remains manual. |+| 3.2.3 | Runtime Failure Handling | RU+RI | `tests/ollama_lifecycle_e2e.rs` (owned-spawn shutdown, external adoption, stale-marker crash recovery) | 🟡 | Was ✅ citing `local-model-runtime.spec.ts`, which was skipped. `ollama_lifecycle_e2e.rs` covers the daemon-ownership failure modes; the UI-level "runtime unavailable" guidance it used to assert has no surface left to assert against. || 3.2.4 | LM Studio Chat Completions | RU+RI | `crates/openhuman-core/src/inference/local/service/public_infer_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | Covers prompt/chat success and non-success status errors |### 3.3 Runtime Configuration@@ -144,25 +144,25 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil| ID | Feature | Layer | Test path(s) | Status | Notes || ------- | -------------------------- | ----- | -------------------------------------------- | ------ | ----------------------------------- |-| 3.3.1.1 | RAM Limit Selection | VU | `app/src/components/settings/` (panel-level) | 🟡 | UI present; assertion shallow |-| 3.3.1.2 | RAM Availability Detection | RU | `crates/openhuman-core/src/inference/device.rs` | ✅ | |-| 3.3.1.3 | Over-Allocation Prevention | RU | `crates/openhuman-core/src/inference/local/ops.rs` | 🟡 | Guard exists; explicit test pending |-| 3.3.1.4 | Under-Allocation Handling | RU | `crates/openhuman-core/src/inference/local/ops.rs` | 🟡 | Same |+| 3.3.1.1 | RAM Limit Selection | RU | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` (`recommended_tier_tracks_host_ram_at_every_band_boundary`) | 🟡 | Was VU/🟡 "UI present; assertion shallow" citing `app/src/components/settings/`. **There is no RAM-limit control in the product** — no `ram_limit`/`max_ram` field exists in `crates/` or `app/src/`. What a user actually selects is a *model tier*, and every band boundary of the RAM→tier mapping is now pinned. |+| 3.3.1.2 | RAM Availability Detection | RU+RI | `vendor/tinyagents/vendor/tinyinference/crates/tinyinference-local/src/device.rs`, `tests/json_rpc_e2e.rs` (`inference_device_profile` asserts `total_ram_bytes > 0`) | 🟡 | Was ✅ citing `crates/openhuman-core/src/inference/device.rs`, **which does not exist**. ⚠️ **`tinyinference-local` is not built by any OpenHuman lane** — `vendor` is in the root `[workspace] exclude` and no CI step names the package, so its unit tests are cited history, not executed coverage. The RPC asserts only that detection returns a positive figure — it reads the real host, so no threshold can be exercised there. |+| 3.3.1.3 | Over-Allocation Prevention | RU | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` (`a_host_below_the_ram_floor_is_not_offered_local_inference`) | ✅ | Was 🟡 "guard exists; explicit test pending" at a dead path. A synthetic sub-floor `DeviceProfile` must fail `device_supports_local_ai` and select cloud fallback; the floor is read from `MIN_RAM_GB_FOR_LOCAL_AI`, not hard-coded. |+| 3.3.1.4 | Under-Allocation Handling | RU | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` (`a_host_at_the_ram_floor_is_offered_local_inference`) | ✅ | Was 🟡 at a dead path. The mirror case: a host **at** the inclusive floor qualifies and must not be pushed to cloud. Kept as a separate test so a regression that refuses every host fails one and passes the other. |#### 3.3.2 Dynamic Resource Adjustment| ID | Feature | Layer | Test path(s) | Status | Notes || ------- | ------------------------------- | ----- | ------------ | ------ | ------------------ |-| 3.3.2.1 | Runtime Scaling Based on Load | RU | _missing_ | ❌ | Track in follow-up |-| 3.3.2.2 | Model Switching Based on Memory | RU | _missing_ | ❌ | Track in follow-up |+| 3.3.2.1 | Runtime Scaling Based on Load | RU | _not implemented_ | 🚫 | Was ❌ "track in follow-up". **No load-driven scaling exists anywhere in the tree** — nothing reads load to size a runtime. Catalog residue, not a coverage gap; reinstate as ❌ if the feature is built. |+| 3.3.2.2 | Model Switching Based on Memory | RU+RI | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs`, `tests/json_rpc_e2e.rs` (`inference_apply_preset` → `inference_presets` round-trip) | ✅ | Was ❌ "_missing_". **It was implemented and covered, at paths this matrix did not cite**: RAM → `recommend_tier` → `apply_preset_to_config`, reachable over RPC. Every band boundary and the invalid-tier rejection are now pinned. |#### 3.3.3 Configuration Persistence| ID | Feature | Layer | Test path(s) | Status | Notes || ------- | ------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------ |-| 3.3.3.1 | Save RAM Settings | VU | _missing_ | ❌ | Settings slice |-| 3.3.3.2 | Apply on Restart | WD | `local-model-runtime.spec.ts` | 🟡 | Restart not exercised |-| 3.3.3.3 | Reset to Default | VU | _missing_ | ❌ | |+| 3.3.3.1 | Save RAM Settings | RU+RI | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` (`applying_a_preset_round_trips_through_the_config_for_every_real_tier`), `tests/json_rpc_e2e.rs` | ✅ | Was ❌ "_missing_, settings slice". There is no RAM setting to save; what persists is the **tier preset**. The RPC round-trip was already covered for one tier; all five real tiers now round-trip through `apply_preset_to_config` → `current_tier_from_config`. |+| 3.3.3.2 | Apply on Restart | RI (needed) | _not written — see notes_ | 🟡 | Was 🟡 WD citing `local-model-runtime.spec.ts` ("restart not exercised"). **No current runner can restart the app mid-spec**: WDIO shares one Appium session and wipes in place (`app/test/e2e/helpers/reset-app.ts:5`), and the Playwright lane starts one core per shard. Only an RI target can hold two core lifetimes, and none does today — this needs harness support before a spec can be written honestly. |+| 3.3.3.3 | Reset to Default | RU | `crates/openhuman-core/src/config/ops/local_ai_presets_tests.rs` (`the_default_local_ai_config_already_matches_the_mvp_preset_tier`) | 🟡 | Was ❌. There is no per-setting reset control; the reachable default is `LocalAiConfig::default()`, which a fresh install and a full data reset both land on. Pinned — and it is **not** `Custom`: the default ids match the `Ram2To4Gb` preset exactly, which is also `MVP_MAX_TIER`. || 3.3.3.4 | Provider Selection Persistence | RU+RI+VU | `crates/openhuman-core/src/config/ops_tests.rs`, `tests/json_rpc_e2e.rs`, `app/src/utils/tauriCommands/config.test.ts` | ✅ | Covers `lm_studio` normalization and config round-trip |---@@ -278,7 +278,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ------ | ---------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || 6.3.1 | Steer a running sub-agent | RU | `crates/openhuman-core/src/agent/orchestration/running_subagents.rs`, `crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs` | ✅ | `steer_subagent` injects a steer/collect message into a running async sub-agent's run-queue; registry enforces parent ownership + terminal guard. || 6.3.2 | Wait for a sub-agent result | RU | `crates/openhuman-core/src/agent/orchestration/running_subagents.rs`, `crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs` | ✅ | `wait_subagent` blocks on the completion `watch` with a timeout; prunes terminal entries, leaves entries intact on timeout. |-| 6.3.3 | Steer lands in child history | RU | `crates/openhuman-core/src/agent/subagent_host/ops_tests.rs::run_queue_steer_lands_in_subagent_history` | 🟡 | Migration coverage: the direct host adapter retains the child queue/history assertion while Phase 6 completes its lifecycle and persistence cutover. |+| 6.3.3 | Steer lands in child history | RU | `crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs::run_queue_steer_lands_in_subagent_history` | 🟡 | Migration coverage: the direct host adapter retains the child queue/history assertion while Phase 6 completes its lifecycle and persistence cutover. || 6.3.9 | Vision sub-agent reads attached images | RU | `crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs::vision_agent_loads_on_vision_hint`, `crates/openhuman-core/src/inference/model_context_tests.rs::oh_tier_vision_map_is_exhaustively_pinned`, `crates/openhuman-core/src/agent/tinyagents/routes_tests.rs::turn_required_capabilities_gates_only_vision`, `crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs::extract_image_placeholders_pulls_att_tokens_in_order` | ✅ | Orchestrator keeps the image as a placeholder, delegates to `vision_agent` on the `vision` route, which rehydrates the on-disk attachment and reads it. Engine gate prefers per-tier `current_model_vision`; turn placeholders forwarded into the sub-agent prompt. || 6.3.11 | Async-by-default archetype delegation (durable ref) | RU | `crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs::archetype_delegation_defaults_to_async_with_durable_session_e2e`, `crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rs::parameters_schema_advertises_async_default_blocking_opt_in` | ✅ | `delegate_*` / `build_workflow` with a parent turn + chat thread return `[async_subagent_ref]` (task_id + subagent_session_id) immediately, persist a durable reusable session, and queue the result for background delivery as a new turn; `blocking: true` opts back into inline dispatch, and no-thread contexts fall back automatically. |@@ -286,7 +286,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| 6.3.13 | continue_subagent durable resume (no pause checkpoint) | RU | `crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs::{continue_subagent_resumes_idle_durable_session_e2e,continue_subagent_without_checkpoint_or_durable_session_names_the_roster}` | ✅ | With no `ask_user_clarification` checkpoint, `continue_subagent` resolves the durable session by subagent_session_id / task id, resumes it via the reusable async path seeded with persisted history, and keeps the same durable id; missing sessions error with a pointer at the roster. || 6.3.14 | Workflow proposal durability (async builder → chat card) | RU+VU | `crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs::{extract_workflow_proposal_finds_last_proposal_tool_result,attach_workflow_proposal_persists_thread_message_and_extends_summary,attach_workflow_proposal_without_proposal_returns_summary_unchanged}`, `app/src/lib/workflows/workflowProposal.test.ts` | ✅ | A `workflow_proposal` payload in a finished async child's history is persisted as a parent-thread message (metadata scope `workflow_proposal`) and embedded in the delivery notice; the frontend rehydrates the newest unconsumed proposal into the card on thread load, and Save/Dismiss mark the source message consumed. || 6.3.15 | Background reply persisted once (core-owned id, idempotent append) | RU+VU | `crates/openhuman-core/src/agent/orchestration/background_delivery.rs::run_system_turn_on_thread`, `crates/openhuman-core/src/memory/conversations/store/store_tests.rs::append_message_is_idempotent_by_message_id`, `crates/openhuman-core/src/web_chat/presentation_tests.rs::single_bubble_delivery_emits_one_unsegmented_chat_done_without_reaction`, `app/src/providers/__tests__/ChatRuntimeProvider.test.tsx` (system `chat_done`/`chat_error` reuse the core id), `app/src/services/api/threadApi.test.ts` (legacy `assistant` sender folded onto `agent`), `app/src/store/__tests__/threadSlice.test.ts` (same-id cache upsert) | ✅ | #5933 — background delivery persists a reply FIRST as `agent:<run_id>` (`sender: agent`, `extraMetadata.requestId`), then announces one unsegmented `chat_done`; the frontend reuses that id so the id-idempotent store keeps one row. |-| 6.3.16 | Sub-agent spawn/delegate tool refusal (#4452 invariant) | RU | `crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs::{a_sub_agent_cannot_reach_a_spawn_tool_and_the_healthy_run_is_quiet,an_allowlist_that_readmits_a_spawn_tool_is_refused_loudly}`, `crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs::{dynamic_tools_keep_ordinary_actions_and_lose_spawn_tools,dynamic_tools_lose_unprefixed_delegate_name_overrides,a_dynamic_tool_list_without_spawn_tools_is_untouched}` | 🟡 | Migration coverage: the host still fail-closes `spawn_subagent`/`delegate_*`/`agent_prepare_context`/`spawn_worker_thread` while Phase 6 moves lifecycle ownership to TinyAgents. Completion requires the direct-driver and durable-resume checks in the extraction plan. |+| 6.3.16 | Sub-agent spawn/delegate tool refusal (#4452 invariant) | RU | `crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs::{a_sub_agent_cannot_reach_a_spawn_tool_and_the_healthy_run_is_quiet,an_allowlist_that_readmits_a_spawn_tool_is_refused_loudly}`, `crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs::{dynamic_tools_keep_ordinary_actions_and_lose_spawn_tools,dynamic_tools_lose_unprefixed_delegate_name_overrides,a_dynamic_tool_list_without_spawn_tools_is_untouched}` | 🟡 | Migration coverage: the host still fail-closes `spawn_subagent`/`delegate_*`/`agent_prepare_context`/`spawn_worker_thread` while Phase 6 moves lifecycle ownership to TinyAgents. Completion requires the direct-driver and durable-resume checks in the extraction plan. || 6.3.17 | Host-authored turns run on the thread's cached session (no competing root transcript) | RU | `crates/openhuman-core/src/web_chat/session_checkout_tests.rs::{checkout_cold_boots_from_the_thread_transcript_and_checkin_keeps_it_warm,checkin_if_vacant_yields_to_a_turn_that_re_cached_meanwhile,a_system_turn_adopts_the_cached_agent_and_its_fingerprint,a_fork_never_takes_or_returns_the_cached_agent}` | ✅ | Background delivery and goal continuation go through `web_chat::run_system_turn_on_thread` → `checkout_session_agent`, so they see the conversation and append to the thread's transcript. A throwaway host bound to the thread used to write a competing root transcript that the next cold-boot resume preferred (newest `created`), dropping every earlier turn after a restart. `checkin_session_agent_if_vacant` never clobbers a user turn that re-cached meanwhile; forks stay isolated. || 6.3.18 | Mid-conversation availability notes are status, not instructions | RU | `crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs::availability_notes_are_status_not_instructions` | ✅ | `[integration update]` / `[MCP update]` / `[skills update]` prepended to the next user message no longer say "act on them immediately" (which sent the orchestrator to the integrations agent mid-conversation); they defer to the user's message and only forbid the "reconnect/restart" reply. || 6.3.19 | `use_skill` dispatches packed delegates with the live parent | RU | `crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs::use_skill_dispatch_reaches_live_parent_for_packed_archetype_delegate` | ✅ | `use_skill {skill, tool:"create_image"}` routes through the typed delegation dispatch with the real parent `RunContext` instead of failing with "delegation requires a live harness run context"; disclosure and not-found paths unchanged. |@@ -316,7 +316,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ----- | ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ || 7.2.1 | HTTP / API Requests | RU+WD | `service-connectivity-flow.spec.ts` | ✅ | |-| 7.2.2 | Web Search Execution | WD | `skill-execution-flow.spec.ts` | 🟡 | Generic skill path |+| 7.2.2 | Web Search Execution | WD | `harness-search-tool-flow.spec.ts::S3.2` | ✅ | **Citation corrected 2026-09-24:** the row cited `skill-execution-flow.spec.ts`, whose three tests are login-shell / core.ping / installed-tools and touch no search path. `harness-search-tool-flow.spec.ts::S3.2` drives `web_search_tool` end to end and asserts the final reply cites results; it runs in the `webhooks` suite || 7.2.3 | TinyFish Integration Tools | RU | `crates/openhuman-core/src/search/tools/tinyfish_tests.rs`, `crates/openhuman-core/src/tools/ops_tests_domain_family_tests.rs::all_tools_executes_tinyfish_family_against_fake_backend` | ✅ | Backend-proxied Search, Fetch, and Agent run tools covered with fake backend || 7.2.4 | Exa BYOK search (direct API) | RU+RI+VU | `crates/openhuman-core/src/search/tools/exa_tests.rs`, `crates/openhuman-core/src/search/registry.rs`, `crates/openhuman-core/src/config/schema/tools/search.rs`, `tests/config_auth_app_state_connectivity_e2e.rs`, `app/src/components/settings/panels/SearchPanel.test.tsx` (#5137) | ✅ | `exa_search` / `exa_find_similar` / `exa_get_contents` post straight to api.exa.ai against a local stand-in; missing and 401 keys give distinct errors without echoing the response body; keyless Exa falls back to managed; key round-trips through the config RPC, secret encryption, and env overlay; panel asserts the needs-key badge and the exa.ai key link || 7.2.5 | Tavily BYOK search + extract (direct API) | RU+RI+VU | `crates/openhuman-core/src/search/tools/tavily_tests.rs`, `crates/openhuman-core/src/search/registry.rs`, `crates/openhuman-core/src/config/schema/tools/search.rs`, `crates/openhuman-core/src/config/ops_tests.rs` (`apply_search_settings_stores_and_clears_tavily_key`), `tests/config_auth_app_state_connectivity_e2e.rs`, `app/src/components/settings/panels/SearchPanel.test.tsx`, `app/src/utils/__tests__/toolTimelineFormatting.test.ts` | ✅ | `web_search_tool` / `tavily_search` / `tavily_extract` post straight to api.tavily.com with a Bearer key against a local stand-in; raw content, images, and the LLM answer render in markdown; missing and 401 keys give distinct errors without echoing the response body; batches over 20 URLs and keyless Tavily are rejected/fall back to managed; the `(via Tavily)` timeline marker is pinned; the panel asserts the needs-key badge and the tavily.com key link |@@ -351,10 +351,10 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ----- | ------------------------------------ | ----- | ----------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- || 8.3.2 | Cross-Chat Entity Discoverability | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_cross_chat_entity_discoverable` | ✅ | Verifies entity canonicalisation across multiple chats |-| 8.3.3 | Citation Bundle Provenance | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_citation_bundle_provenance` | ✅ | Verifies source_ref and tree_scope are populated in retrieval hits |+| 8.3.3 | Citation Bundle Provenance | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_citation_bundle_provenance` | 🟡 | Verifies source_ref and tree_scope are populated in retrieval hits **Vacuity risk, 2026-09-24.** `bench_config()` sets `embedding_endpoint`/`embedding_model` to `None`, and this benchmark guards every assertion behind `if source_resp.total == 0 { return; }`. A test that returns before its assertions reports PASS, so it cannot distinguish "this works" from "the fixture produced nothing", and reverting the feature would not turn it red. Whether the guard actually fires on a default run is UNRESOLVED — it needs one `cargo test` inside `vendor/tinymemory`, which was deliberately not run because dirtying a submodule risks a pin rewind in the parent. Fix is a tinymemory PR: assert `total > 0` as a fixture precondition, then the real claim. || 8.3.4 | Citation Fetch Leaves Hydration | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_citation_fetch_leaves_hydrates` | ✅ | Verifies fetch_leaves returns content for exact chunk IDs |-| 8.3.7 | Long-Source Exact Leaf Retrieval | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_long_source_retrieves_exact_leaf` | 🟡 | Embedder required for seal + chunking; test runs in inert mode but assertions are conditional |-| 8.3.9 | Scale Ingest 20 Sources No Real Data | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_scale_ingest_20_sources_no_real_data` | ✅ | Verifies retrieval correctness at scale with synthetic data |+| 8.3.7 | Long-Source Exact Leaf Retrieval | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_long_source_retrieves_exact_leaf` | 🟡 | Embedder required for seal + chunking; test runs in inert mode but assertions are conditional **Vacuity risk, 2026-09-24.** `bench_config()` sets `embedding_endpoint`/`embedding_model` to `None`, and this benchmark guards every assertion behind `if source_resp.total == 0 { return; }`. A test that returns before its assertions reports PASS, so it cannot distinguish "this works" from "the fixture produced nothing", and reverting the feature would not turn it red. Whether the guard actually fires on a default run is UNRESOLVED — it needs one `cargo test` inside `vendor/tinymemory`, which was deliberately not run because dirtying a submodule risks a pin rewind in the parent. Fix is a tinymemory PR: assert `total > 0` as a fixture precondition, then the real claim. |+| 8.3.9 | Scale Ingest 20 Sources No Real Data | RU | `vendor/tinymemory/crates/tinymemory-core/src/tree/retrieval/benchmarks.rs::bench_scale_ingest_20_sources_no_real_data` | 🟡 | Verifies retrieval correctness at scale with synthetic data **Vacuity risk, 2026-09-24.** `bench_config()` sets `embedding_endpoint`/`embedding_model` to `None`, and this benchmark guards every assertion behind `if source_resp.total == 0 { return; }`. A test that returns before its assertions reports PASS, so it cannot distinguish "this works" from "the fixture produced nothing", and reverting the feature would not turn it red. Whether the guard actually fires on a default run is UNRESOLVED — it needs one `cargo test` inside `vendor/tinymemory`, which was deliberately not run because dirtying a submodule risks a pin rewind in the parent. Fix is a tinymemory PR: assert `total > 0` as a fixture precondition, then the real claim. |### 8.4 Explicit User Preferences (Two-Lane)@@ -403,7 +403,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ----- | ----------------------- | ----- | ------------------------ | ------ | ------------------------ |-| 9.3.1 | Remote Agent Scheduling | RI | `tests/json_rpc_e2e.rs` | 🟡 | Coverage thin |+| 9.3.1 | Remote Agent Scheduling | RI | `tests/domain_modules_e2e.rs::cron_update_applies_a_partial_patch_without_clobbering_unset_fields` (CRUD only); execution + history (`cron_run`/`cron_runs`) sit in `tests/raw_coverage/automation_scheduling_e2e.rs`, which is `#![cfg(any())]` and compiles to nothing pending #6382 | ❌ | **Evidence corrected 2026-09-24.** This row cited `tests/json_rpc_e2e.rs`, which contains **zero** occurrences of `cron` (verified with a positive control: 425 `openhuman.` matches in the same file). So "Coverage thin" was assessed against a file with no scheduling coverage at all. What is live is CRUD; nothing live asserts a scheduled agent job actually RUNS on its schedule. || 9.3.2 | Execution Trigger | WD | `cron-jobs-flow.spec.ts` | ✅ | || 9.3.3 | Retry Handling | RU | `crates/openhuman-core/src/cron/` | 🟡 | Backoff branches partial |@@ -430,11 +430,11 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ------ | ---------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || 10.1.1 | Telegram Connection | WD | `telegram-flow.spec.ts` | ✅ | |-| 10.1.2 | WhatsApp Connection | WD | `app/test/e2e/specs/whatsapp-flow.spec.ts` | ✅ | Was ❌ |+| 10.1.2 | WhatsApp Connection | WD | `app/test/e2e/specs/whatsapp-flow.spec.ts` | 🚫 | **Corrected 2026-09-24 — this row was ✅ on evidence that does not support it.** WhatsApp has no entry in `all_channel_definitions()`, is not a Composio toolkit, and its provider sits behind the non-default `whatsapp-web` feature, which is absent from `scripts/ci/product-features.txt` — so there is no WhatsApp connect flow in the shipped build to test. The cited `whatsapp-flow.spec.ts` correctly asserts that the retired `/accounts` route redirects; it never connects anything. Manual-only until the feature ships || 10.1.3 | Gmail Connection | WD | `gmail-flow.spec.ts` | ✅ | |-| 10.1.4 | Slack Connection | WD | `app/test/e2e/specs/slack-flow.spec.ts` | ✅ | Was ❌ |-| 10.1.5 | Yuanbao Connection | RU | `vendor/tinychannels/src/providers/yuanbao/` (vendored `tinychannels`), `crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs::connect_yuanbao_*`, `crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs::connect_yuanbao_rejects_invalid_credentials`, `crates/openhuman-core/src/channels/runtime/startup_yuanbao_secret_tests_tests.rs` | 🟡 | New API-key channel for Tencent Yuanbao. RU covers sign-token preflight (valid/invalid creds, env-override cluster routing), credentials store hydration (incl. stale app_key guard), and WS reconnect/shutdown. No WDIO spec yet — connect-flow UI is rendered via the generic `ChannelSetupModal` already exercised by other channel flow specs. |-| 10.1.6 | Email (IMAP/SMTP) Connection | RU+VU | `crates/openhuman-core/src/channels/controllers/ops/connect_email_config_tests_tests.rs`, `crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs::{persist_email_config_*,disconnect_email_*,connect_email_rejects_invalid_port_*,test_channel_email_rejects_invalid_port_*}`, `app/src/components/channels/CredentialChannelConfig.test.tsx`, `app/src/components/channels/ChannelConfigPanel.test.tsx` | 🟡 | #4280 — native IMAP/SMTP for non-Gmail/Outlook mailboxes surfacing the existing `EmailChannel`. RU covers credentials→`EmailConfig` mapping/defaults, port/sender parsing, definition/validation, config persist + disconnect, and pre-network invalid-port rejection. VU covers the connect form rendering/submit + panel routing. Live IMAP verify + WDIO connect-flow are follow-ups. |+| 10.1.4 | Slack Connection | WD | `app/test/e2e/specs/connector-composio-contract.spec.ts` (Slack row) | ✅ | **Evidence corrected 2026-09-24:** Slack is a Composio toolkit, not a native channel — it has no entry in `all_channel_definitions()`, so `channels_connect` cannot reach it. Real coverage is the 10-case connector contract (`connector-contract.ts`), which runs Slack in the gated `connectors` suite. The previously cited `slack-flow.spec.ts` is a 26-line surface smoke whose `run()` call is commented out at `e2e-run-all-flows.sh:343`, so no lane executes it Was ❌ |+| 10.1.5 | Yuanbao Connection | RU+WD | `vendor/tinychannels/src/providers/yuanbao/` (vendored `tinychannels`), `crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs::connect_yuanbao_*`, `crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs::connect_yuanbao_rejects_invalid_credentials`, `crates/openhuman-core/src/channels/runtime/startup_yuanbao_secret_tests_tests.rs`, `app/test/e2e/specs/credential-channels-flow.spec.ts` | ✅ | New API-key channel for Tencent Yuanbao. RU covers sign-token preflight (valid/invalid creds, env-override cluster routing), credentials store hydration (incl. stale app_key guard), and WS reconnect/shutdown. WDIO connect-flow added 2026-09-24 (`credential-channels-flow.spec.ts`, suite `providers`): definition presence in `channels_list`, the `api_key` field set `channels_describe` serves, connect/status/disconnect round trip, and rejection of credentials missing a required field. Previously: no WDIO spec — connect-flow UI is rendered via the generic `ChannelSetupModal` already exercised by other channel flow specs. |+| 10.1.6 | Email (IMAP/SMTP) Connection | RU+VU+WD | `crates/openhuman-core/src/channels/controllers/ops/connect_email_config_tests_tests.rs`, `crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs::{persist_email_config_*,disconnect_email_*,connect_email_rejects_invalid_port_*,test_channel_email_rejects_invalid_port_*}`, `app/src/components/channels/CredentialChannelConfig.test.tsx`, `app/src/components/channels/ChannelConfigPanel.test.tsx`, `app/test/e2e/specs/credential-channels-flow.spec.ts` | ✅ | #4280 — native IMAP/SMTP for non-Gmail/Outlook mailboxes surfacing the existing `EmailChannel`. RU covers credentials→`EmailConfig` mapping/defaults, port/sender parsing, definition/validation, config persist + disconnect, and pre-network invalid-port rejection. VU covers the connect form rendering/submit + panel routing. WDIO connect-flow added 2026-09-24 (`credential-channels-flow.spec.ts`). Live IMAP verify remains a follow-up and is deliberately out of scope for E2E — it would be a real third-party call. |### 10.2 Authentication & Authorization@@ -484,7 +484,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ------ | ---------------------- | ----- | ----------------------------------------------------- | ------ | ------------------------------------------------------------------- || 10.7.1 | Integration Disconnect | WD+RI | `gmail-flow.spec.ts`, `tests/worker_c_modules_e2e.rs` | ✅ | RI covers `channels_disconnect` clearing config-only iMessage state || 10.7.2 | Token Revocation | RU | `crates/openhuman-core/src/security/credentials/` | ✅ | |-| 10.7.3 | Re-Authorization Flow | WD | `skill-oauth.spec.ts` | 🟡 | Re-auth post-revoke not asserted |+| 10.7.3 | Re-Authorization Flow | WD | `connector-contract.ts` (all contract toolkits) | ✅ | Re-auth post-revoke asserted 2026-09-24 in `connector-contract.ts` ('pressing Reconnect after expiry re-authorizes and restores the connection'): the expired modal's Reconnect button is clicked, a POST to `/composio/authorize` must follow, and the connection must read ACTIVE afterwards. Inherited by all 11 contract toolkits plus GitHub/Jira/Gmail/Discord || 10.7.4 | Permission Re-Sync | WD | _missing_ — tracked #968 | ❌ | |---@@ -495,7 +495,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ------- | ------------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| 11.1.1 | Multi-Source Analysis | RI | `tests/memory_sources_e2e.rs` | 🟡 | the former graph-sync E2E was removed; frontend trigger untested |+| 11.1.1 | Multi-Source Analysis | RI | `tests/memory_sources_e2e.rs`, `tests/memory_graph_roundtrip_e2e.rs` | ✅ | the graph half of the removed `memory_graph_sync_e2e.rs` (deleted in `cc99ba9c67`) is replaced by `tests/memory_graph_roundtrip_e2e.rs`: JSON-RPC round trip, namespace isolation, and the unfiltered-superset invariant. **Frontend trigger remains untested and is not writable** — see 11.1.3 || 11.1.2 | Actionable Item Extraction | VU | `app/src/components/intelligence/__tests__/utils.test.ts` | ✅ | Was ❌ || 11.1.3 | Analyze Trigger | WD | `app/test/e2e/specs/insights-dashboard.spec.ts` mounts the route; explicit analyze-handler invocation TBD | 🟡 | Route mounts and search/filter UI assert — full analyze trigger flow tracked as follow-up || 11.1.4 | MCP server (stdio + HTTP) | RU | `crates/openhuman-core/src/mcp/server/` | ✅ | Stdio framing plus Streamable HTTP/SSE session lifecycle; `McpHttpClient` round-trip tests |@@ -556,7 +556,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ------ | ----------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| 13.1.1 | Profile Management | VU | `app/src/components/settings/panels/__tests__/PrivacyPanel.test.tsx` | 🟡 | |+| 13.1.1 | Profile Management | VU | `app/src/components/settings/panels/AccountPanel.test.tsx` | 🟡 | **Citation corrected**: the previous `PrivacyPanel.test.tsx` covers the analytics toggle and capability rendering and asserts nothing about profiles. `AccountPanel.test.tsx` is the real evidence (avatar initial + full name, username fallback, no-user omission). Stays 🟡 for a reason the old note hid: `AccountPanel.tsx` is 49 lines and **read-only** — identity summary plus logout/clear, no editing. There is no profile *management* to cover; a case asserting one would test a feature that does not exist. || 13.1.2 | Linked Accounts | WD | `auth-access-control.spec.ts` | 🟡 | UI surface unasserted || 13.1.4 | Wallet Balances Panel | VU | `app/src/components/settings/panels/__tests__/WalletBalancesPanel.test.tsx`, `app/src/services/walletApi.test.ts` | ✅ | Loading/error/empty/loaded states; Retry + Refresh re-invocation; chain badges; truncated address; providerStatus chip || 13.1.5 | Approval History | VU | `app/src/components/settings/panels/__tests__/ApprovalHistoryPanel.test.tsx`, `app/src/services/api/approvalApi.test.ts` | ✅ | Was ❌ — read-only audit surface over `approval_list_recent_decisions`; covers loaded/empty/error/refresh states, per-decision badge, and the bare-array vs `{result,logs}` envelope normalization |@@ -574,7 +574,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| ID | Feature | Layer | Test path(s) | Status | Notes || ------ | -------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| 13.3.1 | Model Configuration | WD | `app/test/e2e/specs/settings-ai-skills.spec.ts` | 🟡 | AI-model-switch covered by E2E; the previously-cited `AutocompletePanel.test.tsx` unit test belonged to the now-removed autocomplete feature (#5125) and never covered model configuration |+| 13.3.1 | Model Configuration | WD+PW | `app/test/e2e/specs/settings-ai-skills.spec.ts`, `app/test/playwright/specs/settings-ai-skills.spec.ts` (`the routing page shows the core-pinned default model and keeps it across a reload`) | ✅ | Was 🟡: both layers asserted only that the LLM tab mounts, so nothing configured anything. The PW case now pins the contract — what the core holds in `default_model` is what the routing page shows, before and after a reload, with no write-back on render. Driven over `inference_update_model_settings` rather than through the picker dialog on purpose: the picker is being rebuilt under #6395, so a click-through spec would be rewritten with it and meanwhile cover nothing. The picker → core direction stays at VU (`AIPanel.test.tsx`). || 13.3.2 | Skill Toggle | WD | `skill-lifecycle.spec.ts`, `app/test/e2e/specs/settings-ai-skills.spec.ts` | ✅ | || 13.3.3 | Azure deployment name (off-catalog model id) | VU | `app/src/components/settings/panels/__tests__/azureDeployment.test.ts`, `app/src/components/settings/panels/__tests__/ModelEntryField.test.tsx`, `app/src/components/settings/panels/__tests__/AIPanel.test.tsx` | ✅ | Azure routes by deployment name, not the base model id its `/models` catalog lists (#5213). Covers endpoint-host detection (incl. dot-boundary lookalikes and the excluded Foundry serverless hosts), `/openai/v1` base-URL detection and its inline nudge, the shared entry-mode field used by both pickers (free text, catalog, loading, probe-error branches), no auto-seeding of a catalog id for Azure, the deployment name surviving verbatim into persisted routing, and a provider staying creatable when the live `/models` probe fails || 13.3.4 | ChatGPT sign-in in AI settings | VU | `app/src/components/settings/oauth/__tests__/OpenAiOAuthConnect.test.tsx`, `app/src/components/settings/panels/__tests__/AIPanel.test.tsx` | ✅ | Mocked core RPCs cover sign-in, disconnect, provider/routing persistence, failure paths, and delayed initial status. Live desktop OAuth remains a release smoke check. |@@ -584,7 +584,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| 13.3.8 | Managed default model (one OpenRouter model for every managed workload) | RU+RI | `crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs` (`resolve_model_for_hint_maps_every_managed_hint_to_the_default_model`, `resolve_model_for_hint_uses_the_pinned_managed_default`, `resolve_model_for_hint_treats_retired_tier_slugs_as_role_aliases`), `crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs`, `crates/openhuman-core/src/agent/triage/routing_tests.rs`, `crates/openhuman-core/src/agent/cost_tests.rs`, `crates/openhuman-core/src/platform/cost/route_tests.rs`, `crates/openhuman-core/src/config/migrations/retire_managed_tier_slugs_tests.rs`, `crates/openhuman-core/src/config/migrations/mod_tests.rs` (`run_pending_v12_to_v13_*`), `tests/json_rpc_e2e.rs` (routing cases, flows arc) | ✅ | The `chat-v1`/`agentic-v1`/… tier endpoints are retired: every managed workload role resolves to `config.default_model` when it names a catalog model, else `openrouter/deepseek/deepseek-v4-flash`; `hint:*` and retired slugs stay role aliases; migration 12→13 rewrites persisted slugs; cost classification and the flash price row || 13.3.9 | Routing page: Default model row + per-workload tables always shown; providers header action | VU | `app/src/components/settings/panels/__tests__/AIPanel.test.tsx` (`shows the per-workload routing tables directly, with no mode selector`, `pins a managed default model from the routing page`), `app/src/services/api/__tests__/aiSettingsApi.test.ts` (`sends default_model only when the pinned default model changed`), `app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsx` | ✅ | No Managed / Own / Advanced selector; the Default model row opens the managed catalog picker (list, alphabetical, search filters models) and persists `default_model`; "Add provider" lives in the page header |-| 13.3.10 | Composer model pick is the global default | WD | `app/test/playwright/specs/chat-model-managed-catalog.spec.ts` (`a composer pick is the global default and survives a fresh page`) | ✅ | The chat pill writes `default_model` through the core; a fresh page resolves and shows the pinned model |+| 13.3.10 | Composer model pick is the global default | PW | `app/test/playwright/specs/chat-model-managed-catalog.spec.ts` (`a composer pick is the global default and survives a fresh page`) | 🟡 | **Was ✅ against a spec that does not run**: `chat-model-managed-catalog.spec.ts:142` is `test.describe.skip` with `TODO(#6395): rebuild these assertions around the picker’s native model select`. The claim is unasserted at every layer until #6395 lands. Partially backstopped meanwhile by 13.3.1’s new PW case, which pins the same `default_model` contract from the settings route rather than the composer pill. || 13.3.11 | Skills page (Installed → Registry) with run/edit/remove controls | VU | `app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx` | ✅ | Page-owned header + tabs in the MCP page's shape: installed rows with Run / Edit / Remove icon controls, Install from URL and New skill; registry rows with search, source filter and Install |### 13.4 Developer Options