Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Commits on main

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-Mind committed 2 months ago
733f824
fix(channels): let integration tests build DispatchHarnessOptions again, without widening a production type\n\n`f0e898a45` added `workspace_dir` and `system_prompt` to `DispatchHarnessOptions`\nas `pub(crate)`. Every other field on that `pub struct` is `pub`, and the\nintegration tests under `tests/` are a **separate crate** — a struct-update\nexpression (`..DispatchHarnessOptions::default()`) requires every field to be\nvisible, including the ones the caller never names. So\n`tests/raw_coverage/channels_web_startup_raw_coverage_e2e.rs` stopped compiling\nwith E0451 and `main`'s `Rust Core Coverage` has been red since.\n\n`workspace_dir` is simply `pub`: `Option<PathBuf>` is a public type.\n\n`system_prompt` could not be, and that is the interesting half. Making it `pub`\nputs `pub(crate) enum ChannelSystemPrompt` in a public interface, which\n`private_interfaces` reports and `-D warnings` turns into a clippy error — the\nfirst version of this PR did exactly that and went red on `Rust Quality`.\nWidening the enum instead would cascade: its `Refreshing` variant wraps\n`pub(crate) struct RefreshingInner`, whose constructor takes `pub(crate) struct\nChannelPromptInputs`. That is three production types with real invariants\n(`RefreshingInner` holds a `Mutex`-backed render cache) widened to satisfy a\ntest harness.\n\nSo the prompt is wrapped in `pub struct HarnessSystemPrompt(Option<ChannelSystemPrompt>)`\n— a public newtype with a **private** field. The field on the options struct is\nvisible, the type inside it is not, and `private_interfaces` has nothing to\nreport. An out-of-crate caller can only obtain the default (no prompt), which is\nall those tests want; in-crate tests set one with `HarnessSystemPrompt::new`\n(three call sites in `channels/tests/personality.rs`).\n\nVerified against both lanes, because they see different halves of this and\nneither alone is sufficient:\n\n cargo clippy -p openhuman --features "$(bash scripts/ci/product-features.sh)" \\n --no-default-features -- -D warnings # the lane the first attempt broke\n cargo check -p openhuman --tests --features "$(bash scripts/ci/product-features.sh)"\n # the lane clippy cannot see\n
M3gA-Mind committed 2 months ago
8e6ebe1
fix(task-sources): mark the dead agent tools, and test the gate through the scheduler\n\nTwo review findings on #6135, both correct.\n\nThe scheduler test asserted on `ProviderSlug::can_fetch()` and never on\n`run_one_tick`, so deleting the guard from the loop would have left it\ngreen — the exact regression the PR exists to prevent. The original\nrevert-check could not see this: inverting `can_fetch()` breaks a\npredicate assertion whether or not the loop consults it.\n\n`a_tick_over_an_unfetchable_source_records_nothing` replaces it. It\npersists a real enabled source, asserts the preconditions (enabled, due,\ncannot fetch) so the gate is provably the only thing in the way, drives\nthe real `run_one_tick()`, and asserts `last_fetch_at` and `last_status`\nare both still None. Those are the columns `store::record_fetch` writes\nfrom the failure arm of `run_source_once`, so both staying None is proof\nthe source was skipped before that arm could run. The config is scoped\nthrough `CoreContext::for_test_with_config` — the seam\n`load_config_with_timeout()` prefers — so the tick reads a temp\nworkspace with no HOME mutation and no race with parallel lib tests.\n\nSeparately, `Tool::description()` is an independent hard-coded string,\nso the ControllerSchema descriptions amended in the first commit never\nreached the agent surface: a model choosing a tool still read a\nrecommendation to call something that always fails. TaskSourceFetchTool\nand TaskSourcePreviewFilterTool now carry the same UNAVAILABLE marker\n(there is no agent tool for sync or list_databases, so 2 of the 4).\nTests pin both directions, so this cannot become "the whole domain is\ndead".\n\nThe frontend buttons in TaskSourceControls.tsx are still offered and\nstill fail. Closing that needs an availability signal the RPC surface\ndoes not expose — a `canFetch` field on `task_sources_status` is the\nnatural shape — which is a wire change plus React and i18n work, and\ndoes not belong in a containment PR that changes no shapes. Raised as a\nfollow-up on the thread.\n\nVerified by removing the guard from run_one_tick with can_fetch() left\nreturning false: the new test fails with "the tick must not have stamped\na fetch time: Some(2026-09-08T16:41:43Z)". 68 tests pass restored.\n
M3gA-Mind committed 2 months ago
b3be95b
fix(task-sources): stop polling a source whose provider cannot fetch\n\nThe fetch step has been an unconditional Err for every toolkit since\ntinymemory v1.13.4 removed ComposioProvider::fetch_tasks. The scheduler\npolls every enabled source anyway, on its interval_secs, and each pass\ntakes the failure arm — which writes a store::record_fetch row and\npublishes TaskSourceFetchFailed. Unbounded growth for something nobody\nasked for and nobody can act on. (It is a warn!, not an error!, and carries\nno capture, so none of it reaches Sentry; what accumulates is rows and a\nrepeating UI error.)\n\nAdds ProviderSlug::can_fetch() — a per-variant match, every variant false\ntoday — and skips such a source in run_one_tick's loop with a debug!,\nbefore run_source_once can record anything.\n\nThe predicate lives in types.rs rather than periodic.rs because it is a\nfact about a provider that more than the scheduler must read, and because\npipeline.rs is being changed by #5521. The gate is in the loop rather than\nin run_source_once because the manual task_sources_fetch RPC shares that\nentry point and must keep explaining itself — a user who presses Fetch is\nowed the reason; a background timer writing rows is the part that is wrong.\nIt is a per-variant match rather than a blanket false because the\nrestoration lands one toolkit at a time.\n\nAlso marks the four controllers that cannot succeed — fetch, sync,\npreview_filter, list_databases — UNAVAILABLE in their schema description,\nso the picker and the source list stop offering flows that cannot complete.\nDescription-only: input and output shapes stay, so the controllers come\nback without a second wire change. The seven working controllers are\nuntouched, and none of the four appears in app/schema.json, so no snapshot\nupdate is needed.\n\nFive tests pin both halves of the distinction — the timer skips, the manual\npath does not — and both halves are revert-checked.\n\nCloses #6118\n
M3gA-Mind committed 2 months ago
b139f13